First steps to extend dynamic profiles for Pixel Shift and HDR images
This commit is contained in:
parent
69d362e3ba
commit
15794cc1ba
@ -60,6 +60,7 @@ EXIFFILTER_ISO;ISO
|
|||||||
EXIFFILTER_LENS;Lens
|
EXIFFILTER_LENS;Lens
|
||||||
EXIFFILTER_METADATAFILTER;Enable metadata filters
|
EXIFFILTER_METADATAFILTER;Enable metadata filters
|
||||||
EXIFFILTER_SHUTTER;Shutter
|
EXIFFILTER_SHUTTER;Shutter
|
||||||
|
EXIFFILTER_RAWTYPE;Raw type
|
||||||
EXIFPANEL_ADDEDIT;Add/Edit
|
EXIFPANEL_ADDEDIT;Add/Edit
|
||||||
EXIFPANEL_ADDEDITHINT;Add new tag or edit tag.
|
EXIFPANEL_ADDEDITHINT;Add new tag or edit tag.
|
||||||
EXIFPANEL_ADDTAGDLG_ENTERVALUE;Enter value
|
EXIFPANEL_ADDTAGDLG_ENTERVALUE;Enter value
|
||||||
|
@ -80,7 +80,8 @@ bool DynamicProfileRule::matches (const rtengine::FramesMetaData *im) const
|
|||||||
&& shutterspeed (im->getShutterSpeed())
|
&& shutterspeed (im->getShutterSpeed())
|
||||||
&& expcomp (im->getExpComp())
|
&& expcomp (im->getExpComp())
|
||||||
&& camera (im->getCamera())
|
&& camera (im->getCamera())
|
||||||
&& lens (im->getLens()));
|
&& lens (im->getLens())
|
||||||
|
&& rawType(im->getRawType(0)));
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
@ -208,6 +209,7 @@ bool DynamicProfileRules::loadRules()
|
|||||||
get_double_range (rule.expcomp, kf, group, "expcomp");
|
get_double_range (rule.expcomp, kf, group, "expcomp");
|
||||||
get_optional (rule.camera, kf, group, "camera");
|
get_optional (rule.camera, kf, group, "camera");
|
||||||
get_optional (rule.lens, kf, group, "lens");
|
get_optional (rule.lens, kf, group, "lens");
|
||||||
|
get_optional (rule.rawType, kf, group, "rawtype");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
rule.profilepath = kf.get_string (group, "profilepath");
|
rule.profilepath = kf.get_string (group, "profilepath");
|
||||||
@ -240,6 +242,7 @@ bool DynamicProfileRules::storeRules()
|
|||||||
set_double_range (kf, group, "expcomp", rule.expcomp);
|
set_double_range (kf, group, "expcomp", rule.expcomp);
|
||||||
set_optional (kf, group, "camera", rule.camera);
|
set_optional (kf, group, "camera", rule.camera);
|
||||||
set_optional (kf, group, "lens", rule.lens);
|
set_optional (kf, group, "lens", rule.lens);
|
||||||
|
set_optional (kf, group, "rawtype", rule.rawType);
|
||||||
kf.set_string (group, "profilepath", rule.profilepath);
|
kf.set_string (group, "profilepath", rule.profilepath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,6 +59,7 @@ public:
|
|||||||
Range<double> expcomp;
|
Range<double> expcomp;
|
||||||
Optional camera;
|
Optional camera;
|
||||||
Optional lens;
|
Optional lens;
|
||||||
|
Optional rawType;
|
||||||
Glib::ustring profilepath;
|
Glib::ustring profilepath;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -692,6 +692,10 @@ bool FrameData::getHDR () const
|
|||||||
{
|
{
|
||||||
return isHDR;
|
return isHDR;
|
||||||
}
|
}
|
||||||
|
std::string FrameData::getRawType () const
|
||||||
|
{
|
||||||
|
return isPixelShift ? "PS" : isHDR ? "HDR" : "STD";
|
||||||
|
}
|
||||||
IIOSampleFormat FrameData::getSampleFormat () const
|
IIOSampleFormat FrameData::getSampleFormat () const
|
||||||
{
|
{
|
||||||
return sampleFormat;
|
return sampleFormat;
|
||||||
@ -808,6 +812,11 @@ bool FramesData::getHDR (unsigned int frame) const
|
|||||||
return frames.empty() || frame >= frames.size() ? false : frames.at(0)->getHDR ();
|
return frames.empty() || frame >= frames.size() ? false : frames.at(0)->getHDR ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string FramesData::getRawType (unsigned int frame) const
|
||||||
|
{
|
||||||
|
return frames.empty() || frame >= frames.size() ? "STD" : frames.at(0)->getRawType();
|
||||||
|
}
|
||||||
|
|
||||||
IIOSampleFormat FramesData::getSampleFormat (unsigned int frame) const
|
IIOSampleFormat FramesData::getSampleFormat (unsigned int frame) const
|
||||||
{
|
{
|
||||||
return frames.empty() || frame >= frames.size() ? IIOSF_UNKNOWN : frames.at(frame)->getSampleFormat ();
|
return frames.empty() || frame >= frames.size() ? IIOSF_UNKNOWN : frames.at(frame)->getSampleFormat ();
|
||||||
|
@ -63,6 +63,7 @@ public:
|
|||||||
|
|
||||||
bool getPixelShift () const;
|
bool getPixelShift () const;
|
||||||
bool getHDR () const;
|
bool getHDR () const;
|
||||||
|
std::string getRawType () const;
|
||||||
IIOSampleFormat getSampleFormat () const;
|
IIOSampleFormat getSampleFormat () const;
|
||||||
rtexif::TagDirectory* getExifData () const;
|
rtexif::TagDirectory* getExifData () const;
|
||||||
procparams::IPTCPairs getIPTCData () const;
|
procparams::IPTCPairs getIPTCData () const;
|
||||||
@ -104,6 +105,7 @@ public:
|
|||||||
FrameData *getFrameData (unsigned int frame) const;
|
FrameData *getFrameData (unsigned int frame) const;
|
||||||
bool getPixelShift (unsigned int frame = 0) const;
|
bool getPixelShift (unsigned int frame = 0) const;
|
||||||
bool getHDR (unsigned int frame = 0) const;
|
bool getHDR (unsigned int frame = 0) const;
|
||||||
|
std::string getRawType (unsigned int frame) const;
|
||||||
IIOSampleFormat getSampleFormat (unsigned int frame = 0) const;
|
IIOSampleFormat getSampleFormat (unsigned int frame = 0) const;
|
||||||
rtexif::TagDirectory* getFrameExifData (unsigned int frame = 0) const;
|
rtexif::TagDirectory* getFrameExifData (unsigned int frame = 0) const;
|
||||||
rtexif::TagDirectory* getRootExifData (unsigned int root = 0) const;
|
rtexif::TagDirectory* getRootExifData (unsigned int root = 0) const;
|
||||||
|
@ -123,6 +123,9 @@ public:
|
|||||||
virtual bool getPixelShift (unsigned int frame = 0) const = 0;
|
virtual bool getPixelShift (unsigned int frame = 0) const = 0;
|
||||||
/** @return false: not an HDR file ; true: single or multi-frame HDR file (e.g. Pentax HDR raw file or 32 bit float DNG file or Log compressed) */
|
/** @return false: not an HDR file ; true: single or multi-frame HDR file (e.g. Pentax HDR raw file or 32 bit float DNG file or Log compressed) */
|
||||||
virtual bool getHDR (unsigned int frame = 0) const = 0;
|
virtual bool getHDR (unsigned int frame = 0) const = 0;
|
||||||
|
|
||||||
|
/** @return false: not an HDR file ; true: single or multi-frame HDR file (e.g. Pentax HDR raw file or 32 bit float DNG file or Log compressed) */
|
||||||
|
virtual std::string getRawType (unsigned int frame) const = 0;
|
||||||
/** @return the sample format based on MetaData */
|
/** @return the sample format based on MetaData */
|
||||||
virtual IIOSampleFormat getSampleFormat (unsigned int frame = 0) const = 0;
|
virtual IIOSampleFormat getSampleFormat (unsigned int frame = 0) const = 0;
|
||||||
|
|
||||||
|
@ -110,6 +110,7 @@ public:
|
|||||||
std::string getOrientation (unsigned int frame = 0) const { return ""; } // TODO
|
std::string getOrientation (unsigned int frame = 0) const { return ""; } // TODO
|
||||||
bool getPixelShift (unsigned int frame = 0) const { return isPixelShift; }
|
bool getPixelShift (unsigned int frame = 0) const { return isPixelShift; }
|
||||||
bool getHDR (unsigned int frame = 0) const { return isHDR; }
|
bool getHDR (unsigned int frame = 0) const { return isHDR; }
|
||||||
|
std::string getRawType (unsigned int frame) const { return isPixelShift ? "PS" : isHDR ? "HDR" : "STD"; }
|
||||||
rtengine::IIOSampleFormat getSampleFormat (unsigned int frame = 0) const { return sampleFormat; }
|
rtengine::IIOSampleFormat getSampleFormat (unsigned int frame = 0) const { return sampleFormat; }
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@ -41,6 +41,7 @@ DynamicProfilePanel::EditDialog::EditDialog (const Glib::ustring &title, Gtk::Wi
|
|||||||
|
|
||||||
add_optional (M ("EXIFFILTER_CAMERA"), has_camera_, camera_);
|
add_optional (M ("EXIFFILTER_CAMERA"), has_camera_, camera_);
|
||||||
add_optional (M ("EXIFFILTER_LENS"), has_lens_, lens_);
|
add_optional (M ("EXIFFILTER_LENS"), has_lens_, lens_);
|
||||||
|
add_optional (M ("EXIFFILTER_RAWTYPE"), has_rawtype_, rawtype_);
|
||||||
|
|
||||||
add_range (M ("EXIFFILTER_ISO"), iso_min_, iso_max_);
|
add_range (M ("EXIFFILTER_ISO"), iso_min_, iso_max_);
|
||||||
add_range (M ("EXIFFILTER_APERTURE"), fnumber_min_, fnumber_max_);
|
add_range (M ("EXIFFILTER_APERTURE"), fnumber_min_, fnumber_max_);
|
||||||
@ -81,6 +82,9 @@ void DynamicProfilePanel::EditDialog::set_rule (
|
|||||||
has_lens_->set_active (rule.lens.enabled);
|
has_lens_->set_active (rule.lens.enabled);
|
||||||
lens_->set_text (rule.lens.value);
|
lens_->set_text (rule.lens.value);
|
||||||
|
|
||||||
|
has_rawtype_->set_active (rule.rawType.enabled);
|
||||||
|
rawtype_->set_text (rule.rawType.value);
|
||||||
|
|
||||||
profilepath_->updateProfileList();
|
profilepath_->updateProfileList();
|
||||||
|
|
||||||
if (!profilepath_->setActiveRowFromFullPath (rule.profilepath)) {
|
if (!profilepath_->setActiveRowFromFullPath (rule.profilepath)) {
|
||||||
@ -112,6 +116,9 @@ DynamicProfileRule DynamicProfilePanel::EditDialog::get_rule()
|
|||||||
ret.lens.enabled = has_lens_->get_active();
|
ret.lens.enabled = has_lens_->get_active();
|
||||||
ret.lens.value = lens_->get_text();
|
ret.lens.value = lens_->get_text();
|
||||||
|
|
||||||
|
ret.rawType.enabled = has_rawtype_->get_active();
|
||||||
|
ret.rawType.value = rawtype_->get_text();
|
||||||
|
|
||||||
ret.profilepath = profilepath_->getFullPathFromActiveRow();
|
ret.profilepath = profilepath_->getFullPathFromActiveRow();
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -109,6 +109,9 @@ private:
|
|||||||
Gtk::CheckButton *has_lens_;
|
Gtk::CheckButton *has_lens_;
|
||||||
Gtk::Entry *lens_;
|
Gtk::Entry *lens_;
|
||||||
|
|
||||||
|
Gtk::CheckButton *has_rawtype_;
|
||||||
|
Gtk::Entry *rawtype_;
|
||||||
|
|
||||||
ProfileStoreComboBox *profilepath_;
|
ProfileStoreComboBox *profilepath_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user