merge with dev

This commit is contained in:
U-PC-BUREAU\jacques
2018-10-19 19:26:14 +02:00
198 changed files with 2052 additions and 1128 deletions

View File

@@ -155,21 +155,20 @@ public:
/** This listener interface is used to indicate the progress of time consuming operations */
class ProgressListener
{
public:
virtual ~ProgressListener() {}
virtual ~ProgressListener() = default;
/** This member function is called when the percentage of the progress has been changed.
* @param p is a number between 0 and 1 */
virtual void setProgress (double p) {}
virtual void setProgress(double p) = 0;
/** This member function is called when a textual information corresponding to the progress has been changed.
* @param str is the textual information corresponding to the progress */
virtual void setProgressStr (Glib::ustring str) {}
virtual void setProgressStr(const Glib::ustring& str) = 0;
/** This member function is called when the state of the processing has been changed.
* @param inProcessing =true if the processing has been started, =false if it has been stopped */
virtual void setProgressState (bool inProcessing) {}
virtual void setProgressState(bool inProcessing) = 0;
/** This member function is called when an error occurs during the operation.
* @param descr is the error message */
virtual void error (Glib::ustring descr) {}
virtual void error(const Glib::ustring& descr) = 0;
};
class ImageSource;
@@ -220,20 +219,20 @@ public:
class PreviewImageListener
{
public:
virtual ~PreviewImageListener() {}
virtual ~PreviewImageListener() = default;
/** With this member function the staged processor notifies the listener that it allocated a new
* image to store the end result of the processing. It can be used in a shared manner.
* @param img is a pointer to the image
* @param scale describes the current scaling applied compared to the 100% size (preview scale)
* @param cp holds the coordinates of the current crop rectangle */
virtual void setImage (IImage8* img, double scale, procparams::CropParams cp) {}
virtual void setImage(IImage8* img, double scale, const procparams::CropParams& cp) = 0;
/** With this member function the staged processor notifies the listener that the image passed as parameter
* will be deleted, and no longer used to store the preview image.
* @param img the pointer to the image to be destroyed. The listener has to free the image! */
virtual void delImage (IImage8* img) {}
virtual void delImage(IImage8* img) = 0;
/** With this member function the staged processor notifies the listener that the preview image has been updated.
* @param cp holds the coordinates of the current crop rectangle */
virtual void imageReady (procparams::CropParams cp) {}
virtual void imageReady(const procparams::CropParams& cp) = 0;
};
/** When the detailed crop image is ready for display during staged processing (thus the changes have been updated),
@@ -243,52 +242,70 @@ public:
class DetailedCropListener
{
public:
virtual ~DetailedCropListener() {}
virtual ~DetailedCropListener() = default;
/** With this member function the staged processor notifies the listener that the detailed crop image has been updated.
* @param img is a pointer to the detailed crop image */
virtual void setDetailedCrop (IImage8* img, IImage8* imgtrue, procparams::ColorManagementParams cmp,
procparams::CropParams cp, int cx, int cy, int cw, int ch, int skip) {}
virtual bool getWindow (int& cx, int& cy, int& cw, int& ch, int& skip)
{
return false;
}
// virtual void setPosition (int x, int y, bool update=true) {}
virtual void setDetailedCrop(
IImage8* img,
IImage8* imgtrue,
const procparams::ColorManagementParams& cmp,
const procparams::CropParams& cp,
int cx,
int cy,
int cw,
int ch,
int skip
) = 0;
virtual void getWindow(int& cx, int& cy, int& cw, int& ch, int& skip) = 0;
};
/** This listener is used when the full size of the final image has been changed (e.g. rotated by 90 deg.) */
class SizeListener
{
public:
virtual ~SizeListener() {}
virtual ~SizeListener() = default;
/** This member function is called when the size of the final image has been changed
* @param w is the width of the final image (without cropping)
* @param h is the height of the final image (without cropping)
* @param ow is the width of the final image (without resizing and cropping)
* @param oh is the height of the final image (without resizing and cropping) */
virtual void sizeChanged (int w, int h, int ow, int oh) {}
virtual void sizeChanged(int w, int h, int ow, int oh) = 0;
};
/** This listener is used when the histogram of the final image has changed. */
class HistogramListener
{
public:
virtual ~HistogramListener() {}
virtual ~HistogramListener() = default;
/** This member function is called when the histogram of the final image has changed.
* @param histRed is the array of size 256 containing the histogram of the red channel
* @param histGreen is the array of size 256 containing the histogram of the green channel
* @param histBlue is the array of size 256 containing the histogram of the blue channel
* @param histLuma is the array of size 256 containing the histogram of the luminance channel
* other for curves backgrounds, histRAW is RAW without colors */
virtual void histogramChanged (LUTu & histRed, LUTu & histGreen, LUTu & histBlue, LUTu & histLuma, LUTu & histToneCurve, LUTu & histLCurve, LUTu & histCCurve,/* LUTu & histCLurve,LUTu & histLLCurve, */LUTu & histLCAM, LUTu & histCCAM,
LUTu & histRedRaw, LUTu & histGreenRaw, LUTu & histBlueRaw, LUTu & histChroma, LUTu & histLRETI) {}
virtual void histogramChanged(
const LUTu& histRed,
const LUTu& histGreen,
const LUTu& histBlue,
const LUTu& histLuma,
const LUTu& histToneCurve,
const LUTu& histLCurve,
const LUTu& histCCurve,
const LUTu& histLCAM,
const LUTu& histCCAM,
const LUTu& histRedRaw,
const LUTu& histGreenRaw,
const LUTu& histBlueRaw,
const LUTu& histChroma,
const LUTu& histLRETI
) = 0;
};
/** This listener is used when the auto exposure has been recomputed (e.g. when the clipping ratio changed). */
class AutoExpListener
{
public:
virtual ~AutoExpListener() {}
virtual ~AutoExpListener() = default;
/** This member function is called when the auto exposure has been recomputed.
* @param brightness is the new brightness value (in logarithmic scale)
* @param bright is the new ...
@@ -297,84 +314,79 @@ public:
* @param hlcompr is the new highlight recovery amount
* @param hlcomprthresh is the new threshold for hlcompr
* @param hlrecons set to true if HighLight Reconstruction is enabled */
virtual void autoExpChanged (double brightness, int bright, int contrast, int black, int hlcompr, int hlcomprthresh, bool hlrecons) {}
virtual void autoExpChanged(double brightness, int bright, int contrast, int black, int hlcompr, int hlcomprthresh, bool hlrecons) = 0;
virtual void autoMatchedToneCurveChanged(procparams::ToneCurveParams::TcMode curveMode, const std::vector<double> &curve) {}
virtual void autoMatchedToneCurveChanged(procparams::ToneCurveParams::TcMode curveMode, const std::vector<double>& curve) = 0;
};
class AutoCamListener
{
public :
virtual ~AutoCamListener() {}
virtual void autoCamChanged (double ccam, double ccamout) {}
virtual void adapCamChanged (double cadap) {}
virtual void ybCamChanged (int yb) {}
virtual ~AutoCamListener() = default;
virtual void autoCamChanged(double ccam, double ccamout) = 0;
virtual void adapCamChanged(double cadap) = 0;
virtual void ybCamChanged(int yb) = 0;
};
class AutoChromaListener
{
public :
virtual ~AutoChromaListener() {}
virtual void chromaChanged (double autchroma, double autred, double autblue) {}
virtual void noiseChanged (double nresid, double highresid) {}
virtual void noiseTilePrev (int tileX, int tileY, int prevX, int prevY, int sizeT, int sizeP) {}
virtual ~AutoChromaListener() = default;
virtual void chromaChanged(double autchroma, double autred, double autblue) = 0;
virtual void noiseChanged(double nresid, double highresid) = 0;
virtual void noiseTilePrev(int tileX, int tileY, int prevX, int prevY, int sizeT, int sizeP) = 0;
};
class RetinexListener
{
public :
virtual ~RetinexListener() {}
virtual void minmaxChanged (double cdma, double cdmin, double mini, double maxi, double Tmean, double Tsigma, double Tmin, double Tmax) {}
public:
virtual ~RetinexListener() = default;
virtual void minmaxChanged(double cdma, double cdmin, double mini, double maxi, double Tmean, double Tsigma, double Tmin, double Tmax) = 0;
};
class AutoColorTonListener
{
public :
virtual ~AutoColorTonListener() {}
virtual void autoColorTonChanged (int bwct, int satthres, int satprot) {}
public:
virtual ~AutoColorTonListener() = default;
virtual void autoColorTonChanged(int bwct, int satthres, int satprot) = 0;
};
class AutoBWListener
{
public :
virtual ~AutoBWListener() {}
virtual void BWChanged (double redbw, double greenbw, double bluebw) {}
public:
virtual ~AutoBWListener() = default;
virtual void BWChanged(double redbw, double greenbw, double bluebw) = 0;
};
class AutoWBListener
{
public :
public:
virtual ~AutoWBListener() = default;
virtual void WBChanged (double temp, double green) = 0;
virtual void WBChanged(double temp, double green) = 0;
};
class FrameCountListener
{
public :
public:
virtual ~FrameCountListener() = default;
virtual void FrameCountChanged (int n, int frameNum) = 0;
virtual void FrameCountChanged(int n, int frameNum) = 0;
};
class ImageTypeListener
{
public :
public:
virtual ~ImageTypeListener() = default;
virtual void imageTypeChanged (bool isRaw, bool isBayer, bool isXtrans, bool is_Mono = false) = 0;
virtual void imageTypeChanged(bool isRaw, bool isBayer, bool isXtrans, bool is_Mono = false) = 0;
};
class WaveletListener
{
public :
virtual ~WaveletListener() {}
virtual void wavChanged (double nlevel) {}
public:
virtual ~WaveletListener() = default;
virtual void wavChanged(double nlevel) = 0;
};
/** This class represents a detailed part of the image (looking through a kind of window).
* It can be created and destroyed with the appropriate members of StagedImageProcessor.
* Several crops can be assigned to the same image. */
@@ -555,8 +567,7 @@ public:
* there is no jobs left.
* @param img is the result of the last ProcessingJob
* @return the next ProcessingJob to process */
virtual ProcessingJob* imageReady (IImagefloat* img) = 0;
virtual void error (Glib::ustring message) = 0;
virtual ProcessingJob* imageReady(IImagefloat* img) = 0;
};
/** This function performs all the image processing steps corresponding to the given ProcessingJob. It runs in the background, thus it returns immediately,
* When it finishes, it calls the BatchProcessingListener with the resulting image and asks for the next job. It the listener gives a new job, it goes on