improvements to documentation of image plots

better function hiding in derived image plot classes that use columns
This commit is contained in:
jkriege2 2019-05-19 16:40:02 +02:00
parent 5a4a778faf
commit 0daa30cd45
4 changed files with 577 additions and 109 deletions

View File

@ -889,18 +889,13 @@ JKQTPMathImage::JKQTPMathImage(JKQTBasePlotter *parent):
JKQTPMathImage::JKQTPMathImage(double x, double y, double width, double height, DataType datatype, void* data, int Nx, int Ny, JKQTPMathImageColorPalette palette, JKQTPlotter* parent): JKQTPMathImage::JKQTPMathImage(double x, double y, double width, double height, DataType datatype, void* data, int Nx, int Ny, JKQTPMathImageColorPalette palette, JKQTPlotter* parent):
JKQTPMathImageBase(x, y, width, height, datatype, data, Nx, Ny, parent) JKQTPMathImage(x, y, width, height, datatype, data, Nx, Ny, palette, parent->getPlotter())
{ {
initJKQTPMathImage();
this->palette=palette;
} }
JKQTPMathImage::JKQTPMathImage(JKQTPlotter *parent): JKQTPMathImage::JKQTPMathImage(JKQTPlotter *parent):
JKQTPMathImageBase(0, 0, 1, 1, JKQTPMathImageBase::UInt8Array, nullptr, 0, 0, parent) JKQTPMathImage(parent->getPlotter())
{ {
initJKQTPMathImage();
if (parent) this->palette=parent->getPlotter()->getCurrentPlotterStyle().defaultPalette;
} }
void JKQTPMathImage::setParent(JKQTBasePlotter* parent) { void JKQTPMathImage::setParent(JKQTBasePlotter* parent) {
@ -1661,19 +1656,23 @@ JKQTPColumnMathImage::JKQTPColumnMathImage(JKQTBasePlotter *parent):
this->datatype=JKQTPMathImageBase::DoubleArray; this->datatype=JKQTPMathImageBase::DoubleArray;
} }
JKQTPColumnMathImage::JKQTPColumnMathImage(double x, double y, double width, double height, int Nx, int Ny, JKQTBasePlotter *parent): JKQTPColumnMathImage::JKQTPColumnMathImage(double x, double y, double width, double height, JKQTBasePlotter *parent):
JKQTPMathImage(x,y,width,height,JKQTPMathImageBase::DoubleArray,nullptr,Nx,Ny,JKQTPMathImageGRAY,parent) JKQTPMathImage(x,y,width,height,JKQTPMathImageBase::DoubleArray,nullptr,0,0,JKQTPMathImageGRAY,parent)
{ {
this->modifierColumn=-1; this->modifierColumn=-1;
this->imageColumn=-1; this->imageColumn=-1;
this->datatype=JKQTPMathImageBase::DoubleArray; this->datatype=JKQTPMathImageBase::DoubleArray;
} }
JKQTPColumnMathImage::JKQTPColumnMathImage(double x, double y, double width, double height, int imageColumn, int Nx, int Ny, JKQTPMathImageColorPalette palette, JKQTBasePlotter *parent): JKQTPColumnMathImage::JKQTPColumnMathImage(double x, double y, double width, double height, int imageColumn, JKQTPMathImageColorPalette palette, JKQTBasePlotter *parent):
JKQTPMathImage(x,y,width,height,JKQTPMathImageBase::DoubleArray,nullptr,Nx,Ny,palette,parent) JKQTPMathImage(x,y,width,height,JKQTPMathImageBase::DoubleArray,nullptr,0,0,palette,parent)
{ {
this->modifierColumn=-1; this->modifierColumn=-1;
this->imageColumn=imageColumn; this->imageColumn=imageColumn;
if (parent && imageColumn>=0 && parent->getDatastore()) {
Nx=parent->getDatastore()->getColumnImageWidth(imageColumn);
Ny=parent->getDatastore()->getColumnImageHeight(imageColumn);
}
this->datatype=JKQTPMathImageBase::DoubleArray; this->datatype=JKQTPMathImageBase::DoubleArray;
} }
@ -1682,27 +1681,19 @@ JKQTPColumnMathImage::JKQTPColumnMathImage(JKQTPlotter *parent):
{ {
} }
JKQTPColumnMathImage::JKQTPColumnMathImage(double x, double y, double width, double height, int Nx, int Ny, JKQTPlotter *parent): JKQTPColumnMathImage::JKQTPColumnMathImage(double x, double y, double width, double height, JKQTPlotter *parent):
JKQTPMathImage(x,y,width,height,JKQTPMathImageBase::DoubleArray,nullptr,Nx,Ny,JKQTPMathImageGRAY,parent) JKQTPColumnMathImage(x,y,width,height,parent->getPlotter())
{ {
this->modifierColumn=-1;
this->imageColumn=-1;
this->datatype=JKQTPMathImageBase::DoubleArray;
} }
JKQTPColumnMathImage::JKQTPColumnMathImage(double x, double y, double width, double height, int imageColumn, int Nx, int Ny, JKQTPMathImageColorPalette palette, JKQTPlotter *parent): JKQTPColumnMathImage::JKQTPColumnMathImage(double x, double y, double width, double height, int imageColumn, JKQTPMathImageColorPalette palette, JKQTPlotter *parent):
JKQTPMathImage(x,y,width,height,JKQTPMathImageBase::DoubleArray,nullptr,Nx,Ny,palette,parent) JKQTPColumnMathImage(x,y,width,height,imageColumn,palette,parent->getPlotter())
{ {
this->modifierColumn=-1;
this->imageColumn=imageColumn;
this->datatype=JKQTPMathImageBase::DoubleArray;
} }
JKQTPColumnMathImage::JKQTPColumnMathImage(double x, double y, double width, double height, int imageColumn, int Nx, int Ny, JKQTPlotter *parent):
JKQTPMathImage(x,y,width,height,JKQTPMathImageBase::DoubleArray,nullptr,Nx,Ny,JKQTPMathImageGRAY,parent) JKQTPColumnMathImage::JKQTPColumnMathImage(double x, double y, double width, double height, int imageColumn, JKQTPlotter *parent):
JKQTPColumnMathImage(x,y,width,height,imageColumn,JKQTPMathImageGRAY,parent->getPlotter())
{ {
this->modifierColumn=-1;
this->imageColumn=imageColumn;
this->datatype=JKQTPMathImageBase::DoubleArray;
} }
void JKQTPColumnMathImage::setImageColumn(int __value) void JKQTPColumnMathImage::setImageColumn(int __value)

View File

@ -40,13 +40,35 @@
class JKQTP_LIB_EXPORT JKQTPImageBase: public JKQTPGraph { class JKQTP_LIB_EXPORT JKQTPImageBase: public JKQTPGraph {
Q_OBJECT Q_OBJECT
public: public:
/** \brief class constructor */ /** \brief class constructor
*
* \param parent parent plotter object
*/
JKQTPImageBase(JKQTBasePlotter* parent=nullptr); JKQTPImageBase(JKQTBasePlotter* parent=nullptr);
/** \brief class constructor */ /** \brief class constructor
*
* \param x origin of the image (x-direction) in system coordinates
* \param y origin of the image (y-direction) in system coordinates
* \param width width of the image in system coordinates
* \param height height of the image in system coordinates
* \param parent parent plotter object
*
*/
JKQTPImageBase(double x, double y, double width, double height, JKQTBasePlotter* parent=nullptr); JKQTPImageBase(double x, double y, double width, double height, JKQTBasePlotter* parent=nullptr);
/** \brief class constructor */ /** \brief class constructor
*
* \param parent parent plotter object
*/
JKQTPImageBase(JKQTPlotter* parent); JKQTPImageBase(JKQTPlotter* parent);
/** \brief class constructor */ /** \brief class constructor
*
* \param x origin of the image (x-direction) in system coordinates
* \param y origin of the image (y-direction) in system coordinates
* \param width width of the image in system coordinates
* \param height height of the image in system coordinates
* \param parent parent plotter object
*
*/
JKQTPImageBase(double x, double y, double width, double height, JKQTPlotter* parent); JKQTPImageBase(double x, double y, double width, double height, JKQTPlotter* parent);
/** \brief plots a key marker inside the specified rectangle \a rect */ /** \brief plots a key marker inside the specified rectangle \a rect */
virtual void drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) override; virtual void drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) override;
@ -144,15 +166,65 @@ class JKQTP_LIB_EXPORT JKQTPMathImageBase: public JKQTPImageBase {
/** \brief class constructor */ /** \brief class constructor
*
* \param parent parent plotter object
*/
JKQTPMathImageBase(JKQTBasePlotter* parent=nullptr); JKQTPMathImageBase(JKQTBasePlotter* parent=nullptr);
/** \brief class constructor
*
* \param x origin of the image (x-direction) in system coordinates
* \param y origin of the image (y-direction) in system coordinates
* \param width width of the image in system coordinates
* \param height height of the image in system coordinates
* \param parent parent plotter object
*
*/
JKQTPMathImageBase(double x, double y, double width, double height, JKQTBasePlotter* parent=nullptr); JKQTPMathImageBase(double x, double y, double width, double height, JKQTBasePlotter* parent=nullptr);
/** \brief class constructor
*
* \param x origin of the image (x-direction) in system coordinates
* \param y origin of the image (y-direction) in system coordinates
* \param width width of the image in system coordinates
* \param height height of the image in system coordinates
* \param datatype datatype of the image given in \a data
* \param data points to an image to be plotted (of size \a Nx * \a Ny )
* \param Nx width (in number of pixels) of \a data
* \param Ny height (in number of pixels) of \a data
* \param parent parent plotter object
*
*/
JKQTPMathImageBase(double x, double y, double width, double height, DataType datatype, void* data, int Nx, int Ny, JKQTBasePlotter* parent=nullptr); JKQTPMathImageBase(double x, double y, double width, double height, DataType datatype, void* data, int Nx, int Ny, JKQTBasePlotter* parent=nullptr);
/** \brief class constructor */ /** \brief class constructor
*
* \param parent parent plotter object
*/
JKQTPMathImageBase(JKQTPlotter* parent); JKQTPMathImageBase(JKQTPlotter* parent);
/** \brief class constructor
*
* \param x origin of the image (x-direction) in system coordinates
* \param y origin of the image (y-direction) in system coordinates
* \param width width of the image in system coordinates
* \param height height of the image in system coordinates
* \param parent parent plotter object
*
*/
JKQTPMathImageBase(double x, double y, double width, double height, JKQTPlotter* parent=nullptr); JKQTPMathImageBase(double x, double y, double width, double height, JKQTPlotter* parent=nullptr);
/** \brief class constructor
*
* \param x origin of the image (x-direction) in system coordinates
* \param y origin of the image (y-direction) in system coordinates
* \param width width of the image in system coordinates
* \param height height of the image in system coordinates
* \param datatype datatype of the image given in \a data
* \param data points to an image to be plotted (of size \a Nx * \a Ny )
* \param Nx width (in number of pixels) of \a data
* \param Ny height (in number of pixels) of \a data
* \param parent parent plotter object
*
*/
JKQTPMathImageBase(double x, double y, double width, double height, DataType datatype, void* data, int Nx, int Ny, JKQTPlotter* parent); JKQTPMathImageBase(double x, double y, double width, double height, DataType datatype, void* data, int Nx, int Ny, JKQTPlotter* parent);
/** \brief plots a key marker inside the specified rectangle \a rect */ /** \brief plots a key marker inside the specified rectangle \a rect */
@ -187,15 +259,20 @@ class JKQTP_LIB_EXPORT JKQTPMathImageBase: public JKQTPImageBase {
/*! \copydoc modifierMode */ /*! \copydoc modifierMode */
ModifierMode getModifierMode() const; ModifierMode getModifierMode() const;
/** \brief sets dataModifier (\copybrief dataModifier) and datatypeModifier (\copybrief datatypeModifier) */
virtual void setDataModifier(void* data, DataType datatype); virtual void setDataModifier(void* data, DataType datatype);
/** \brief sets data (\copybrief data) and datatype (\copybrief datatype), as well as the size of data (Nx: \copybrief Nx and Ny: \copybrief Ny) */
virtual void setData(void* data, int Nx, int Ny, DataType datatype); virtual void setData(void* data, int Nx, int Ny, DataType datatype);
/** \brief sets data (\copybrief data), as well as the size of data (Nx: \copybrief Nx and Ny: \copybrief Ny) */
virtual void setData(void* data, int Nx, int Ny); virtual void setData(void* data, int Nx, int Ny);
/** \brief determine min/max data value of the image */ /** \brief determine min/max data value of the image */
virtual void getDataMinMax(double& imin, double& imax); virtual void getDataMinMax(double& imin, double& imax);
/** \brief determine min/max data value of the image */ /** \brief determine min/max data value of the image */
virtual void getModifierMinMax(double& imin, double& imax); virtual void getModifierMinMax(double& imin, double& imax);
/** \brief returns the contents of the internal data image as a QVector<double> */
QVector<double> getDataAsDoubleVector() const; QVector<double> getDataAsDoubleVector() const;
/** \brief returns the contents of the internal modifier image as a QVector<double> */
QVector<double> getDataModifierAsDoubleVector() const; QVector<double> getDataModifierAsDoubleVector() const;
protected: protected:
/** \brief points to the data array, holding the image */ /** \brief points to the data array, holding the image */
@ -212,16 +289,40 @@ class JKQTP_LIB_EXPORT JKQTPMathImageBase: public JKQTPImageBase {
/** \brief datatype of the data array data */ /** \brief datatype of the data array data */
DataType datatypeModifier; DataType datatypeModifier;
/** \brief how to apply the modifier column dataModifier
* \see ModifierMode
*/
ModifierMode modifierMode; ModifierMode modifierMode;
/** \brief internal storage for minimum of the image value range
*
* This is set e.g. when calling drawImage() or draw()
*/
double internalDataMin; double internalDataMin;
/** \brief internal storage for maximum of the image value range
*
* This is set e.g. when calling drawImage() or draw()
*/
double internalDataMax; double internalDataMax;
/** \brief internal storage for minimum of the modifier image value range
*
* This is set e.g. when calling modifyImage() or draw()
*/
double internalModifierMin; double internalModifierMin;
/** \brief internal storage for maximum of the modifier image value range
*
* This is set e.g. when calling modifyImage() or draw()
*/
double internalModifierMax; double internalModifierMax;
/** \brief overwrite this to fill the data poiters before they are accessed (e.g. to load data from a column in the datastore */ /** \brief overwrite this to fill the data poiters before they are accessed (e.g. to load data from a column in the datastore */
virtual void ensureImageData(); virtual void ensureImageData();
/** \brief modify the given image \a img, using the internally set modifier data
* \see dataModifier, datatypeModifier
*/
void modifyImage(QImage& img); void modifyImage(QImage& img);
/** \brief modify the given image \a img, using modifier image \a dataModifier (of type \a datatypeModifier and size \a Nx * \a Ny), using values in the range \a internalModifierMin ... \a internalModifierMax
*/
void modifyImage(QImage& img, void* dataModifier, DataType datatypeModifier, int Nx, int Ny, double internalModifierMin, double internalModifierMax); void modifyImage(QImage& img, void* dataModifier, DataType datatypeModifier, int Nx, int Ny, double internalModifierMin, double internalModifierMax);
@ -238,17 +339,59 @@ class JKQTP_LIB_EXPORT JKQTPImage: public JKQTPImageBase {
Q_OBJECT Q_OBJECT
public: public:
/** \brief class constructor */ /** \brief class constructor
*
* \param parent parent plotter object
*/
JKQTPImage(JKQTBasePlotter* parent=nullptr); JKQTPImage(JKQTBasePlotter* parent=nullptr);
/** \brief class constructor */ /** \brief class constructor
*
* \param parent parent plotter object
*/
JKQTPImage(JKQTPlotter* parent); JKQTPImage(JKQTPlotter* parent);
/** \brief class constructor, which points to an external image (not owned by this object!!!) */ /** \brief class constructor
*
* \param x origin of the image (x-direction) in system coordinates
* \param y origin of the image (y-direction) in system coordinates
* \param width width of the image in system coordinates
* \param height height of the image in system coordinates
* \param image points to a QImage that shall be plotted (the constructed object does not take ownership!)
* \param parent parent plotter object
*
*/
JKQTPImage(double x, double y, double width, double height, QImage* image, JKQTBasePlotter* parent=nullptr); JKQTPImage(double x, double y, double width, double height, QImage* image, JKQTBasePlotter* parent=nullptr);
/** \brief class constructor, which points to an external image (not owned by this object!!!) */ /** \brief class constructor
*
* \param x origin of the image (x-direction) in system coordinates
* \param y origin of the image (y-direction) in system coordinates
* \param width width of the image in system coordinates
* \param height height of the image in system coordinates
* \param image points to a QImage that shall be plotted (the constructed object does not take ownership!)
* \param parent parent plotter object
*
*/
JKQTPImage(double x, double y, double width, double height, QImage* image, JKQTPlotter* parent); JKQTPImage(double x, double y, double width, double height, QImage* image, JKQTPlotter* parent);
/** \brief class constructor, which generates an internal image object, by copying \a image */ /** \brief class constructor
*
* \param x origin of the image (x-direction) in system coordinates
* \param y origin of the image (y-direction) in system coordinates
* \param width width of the image in system coordinates
* \param height height of the image in system coordinates
* \param image a QImage that shall be plotted (the constructed object copies the contents into an internally owned variable)
* \param parent parent plotter object
*
*/
JKQTPImage(double x, double y, double width, double height, const QImage& image, JKQTBasePlotter* parent=nullptr); JKQTPImage(double x, double y, double width, double height, const QImage& image, JKQTBasePlotter* parent=nullptr);
/** \brief class constructor, which generates an internal image object, by copying \a image */ /** \brief class constructor
*
* \param x origin of the image (x-direction) in system coordinates
* \param y origin of the image (y-direction) in system coordinates
* \param width width of the image in system coordinates
* \param height height of the image in system coordinates
* \param image a QImage that shall be plotted (the constructed object copies the contents into an internally owned variable)
* \param parent parent plotter object
*
*/
JKQTPImage(double x, double y, double width, double height, const QImage& image, JKQTPlotter* parent); JKQTPImage(double x, double y, double width, double height, const QImage& image, JKQTPlotter* parent);
virtual ~JKQTPImage() override; virtual ~JKQTPImage() override;
@ -276,16 +419,41 @@ class JKQTP_LIB_EXPORT JKQTPImage: public JKQTPImageBase {
/** \brief indicates that the image \a image is owned by this object (i.e. freed, when the object is destroyed) */ /** \brief indicates that the image \a image is owned by this object (i.e. freed, when the object is destroyed) */
bool image_owned; bool image_owned;
/** \brief create QActions that are shown in the context menu of the JKQTPlotter
*
* \see actSaveImage, actCopyImage, saveImagePlotAsImage(), copyImagePlotAsImage()
*/
void createImageActions(); void createImageActions();
protected: protected:
/** \brief QActions that saves the image (asking the user for a filename)
*
* \see actSaveImage, saveImagePlotAsImage()
*/
QAction* actSaveImage; QAction* actSaveImage;
/** \brief QActions that copies the image into the clipboard
*
* \see actCopyImage, copyImagePlotAsImage()
*/
QAction* actCopyImage; QAction* actCopyImage;
public: public:
/** \copydoc JKQTPImageBase::setParent() */
virtual void setParent(JKQTBasePlotter* parent) override; virtual void setParent(JKQTBasePlotter* parent) override;
/** \copydoc JKQTPImageBase::setTitle() */
virtual void setTitle(const QString& title) override; virtual void setTitle(const QString& title) override;
public slots: public slots:
/** \brief saves the image (asking the user for a filename, if \a filename is empty)
*
* \param filename name of the file that should be create (if empty, a file save dialog is shown)
* \param outputFormat format of the output file, see <a href="https://doc.qt.io/qt-5/qimage.html#save">QImage::save()</a>
*
* \see actSaveImage, saveImagePlotAsImage(), <a href="https://doc.qt.io/qt-5/qimage.html#save">QImage::save()</a>
*/
void saveImagePlotAsImage(const QString &filename=QString(""), const QByteArray &outputFormat=QByteArray()); void saveImagePlotAsImage(const QString &filename=QString(""), const QByteArray &outputFormat=QByteArray());
/** \brief copies the image into the clipboard
*
* \see actCopyImage, copyImagePlotAsImage()
*/
void copyImagePlotAsImage(); void copyImagePlotAsImage();
}; };
@ -304,10 +472,45 @@ class JKQTP_LIB_EXPORT JKQTPMathImage: public JKQTPMathImageBase {
Q_OBJECT Q_OBJECT
public: public:
/** \brief class constructor */ /** \brief class constructor
JKQTPMathImage(double x, double y, double width, double height, DataType datatype, void* data, int Nx, int Ny, JKQTPMathImageColorPalette palette=JKQTPMathImageGRAY, JKQTBasePlotter* parent=nullptr); *
* \param parent parent plotter object
*/
JKQTPMathImage(JKQTBasePlotter* parent=nullptr); JKQTPMathImage(JKQTBasePlotter* parent=nullptr);
/** \brief class constructor
*
* \param x origin of the image (x-direction) in system coordinates
* \param y origin of the image (y-direction) in system coordinates
* \param width width of the image in system coordinates
* \param height height of the image in system coordinates
* \param datatype datatype of the image given in \a data
* \param data points to an image to be plotted (of size \a Nx * \a Ny )
* \param Nx width (in number of pixels) of \a data
* \param Ny height (in number of pixels) of \a data
* \param palette color palette to use for plotting
* \param parent parent plotter object
*
*/
JKQTPMathImage(double x, double y, double width, double height, DataType datatype, void* data, int Nx, int Ny, JKQTPMathImageColorPalette palette=JKQTPMathImageGRAY, JKQTBasePlotter* parent=nullptr);
/** \brief class constructor
*
* \param x origin of the image (x-direction) in system coordinates
* \param y origin of the image (y-direction) in system coordinates
* \param width width of the image in system coordinates
* \param height height of the image in system coordinates
* \param datatype datatype of the image given in \a data
* \param data points to an image to be plotted (of size \a Nx * \a Ny )
* \param Nx width (in number of pixels) of \a data
* \param Ny height (in number of pixels) of \a data
* \param palette color palette to use for plotting
* \param parent parent plotter object
*
*/
JKQTPMathImage(double x, double y, double width, double height, DataType datatype, void* data, int Nx, int Ny, JKQTPMathImageColorPalette palette, JKQTPlotter* parent); JKQTPMathImage(double x, double y, double width, double height, DataType datatype, void* data, int Nx, int Ny, JKQTPMathImageColorPalette palette, JKQTPlotter* parent);
/** \brief class constructor
*
* \param parent parent plotter object
*/
JKQTPMathImage(JKQTPlotter* parent); JKQTPMathImage(JKQTPlotter* parent);
/** \brief plots the graph to the plotter object specified as parent */ /** \brief plots the graph to the plotter object specified as parent */
@ -538,26 +741,77 @@ class JKQTP_LIB_EXPORT JKQTPMathImage: public JKQTPMathImageBase {
QColor infColor; QColor infColor;
/** \brief object used for color bar axes /** \brief object used for color bar axes (right border, image data)
* *
* \note this axis has some kind of a special role. It is used to format color bar axes * \note this axis has some kind of a special role. It is used to format color bar axes
*/ */
JKQTPVerticalIndependentAxis* colorBarRightAxis; JKQTPVerticalIndependentAxis* colorBarRightAxis;
/** \brief object used for color bar axes (top border, image data)
*
* \note this axis has some kind of a special role. It is used to format color bar axes
*/
JKQTPHorizontalIndependentAxis* colorBarTopAxis; JKQTPHorizontalIndependentAxis* colorBarTopAxis;
/** \brief object used for color bar axes (right border, modifier image data)
*
* \note this axis has some kind of a special role. It is used to format color bar axes
*/
JKQTPVerticalIndependentAxis* modifierColorBarTopAxis; JKQTPVerticalIndependentAxis* modifierColorBarTopAxis;
/** \brief object used for color bar axes (top border, modifier image data)
*
* \note this axis has some kind of a special role. It is used to format color bar axes
*/
JKQTPHorizontalIndependentAxis* modifierColorBarRightAxis; JKQTPHorizontalIndependentAxis* modifierColorBarRightAxis;
protected: protected:
/** \brief QActions that saves the image (asking the user for a filename)
*
* \see actSaveImage, saveImagePlotAsImage()
*/
QAction* actSaveImage; QAction* actSaveImage;
/** \brief QActions that copies the image into the clipboard
*
* \see actCopyImage, copyImagePlotAsImage()
*/
QAction* actCopyImage; QAction* actCopyImage;
/** \brief QActions that saves the current palette
*
* \see actSaveImage, saveColorbarPlotAsImage()
*/
QAction* actSavePalette; QAction* actSavePalette;
/** \brief QActions that copies the current palette
*
* \see actCopyImage, copyColorbarPlotAsImage()
*/
QAction* actCopyPalette; QAction* actCopyPalette;
public: public:
/** \copydoc JKQTPImageBase::setTitle() */
virtual void setTitle(const QString& title) override; virtual void setTitle(const QString& title) override;
public slots: public slots:
/** \brief saves the image (asking the user for a filename, if \a filename is empty)
*
* \param filename name of the file that should be create (if empty, a file save dialog is shown)
* \param outputFormat format of the output file, see <a href="https://doc.qt.io/qt-5/qimage.html#save">QImage::save()</a>
*
* \see actSaveImage, saveImagePlotAsImage(), <a href="https://doc.qt.io/qt-5/qimage.html#save">QImage::save()</a>
*/
void saveImagePlotAsImage(const QString &filename=QString(""), const QByteArray &outputFormat=QByteArray()); void saveImagePlotAsImage(const QString &filename=QString(""), const QByteArray &outputFormat=QByteArray());
/** \brief copies the image into the clipboard
*
* \see actCopyImage, copyImagePlotAsImage()
*/
void copyImagePlotAsImage(); void copyImagePlotAsImage();
/** \brief saves an image of the current palette (asking the user for a filename, if \a filename is empty)
*
* \param filename name of the file that should be create (if empty, a file save dialog is shown)
* \param outputFormat format of the output file, see <a href="https://doc.qt.io/qt-5/qimage.html#save">QImage::save()</a>
*
* \see actSavePalette, saveColorbarPlotAsImage(), <a href="https://doc.qt.io/qt-5/qimage.html#save">QImage::save()</a>
*/
void saveColorbarPlotAsImage(const QString &filename=QString(""), const QByteArray &outputFormat=QByteArray()); void saveColorbarPlotAsImage(const QString &filename=QString(""), const QByteArray &outputFormat=QByteArray());
/** \brief copies an image of the current palette into the clipboard
*
* \see actCopyPalette, copyColorbarPlotAsImage()
*/
void copyColorbarPlotAsImage(); void copyColorbarPlotAsImage();
}; };
@ -745,15 +999,71 @@ class JKQTP_LIB_EXPORT JKQTPColumnMathImage: public JKQTPMathImage {
Q_OBJECT Q_OBJECT
public: public:
/** \brief class constructor */ /** \brief class constructor
*
* \param parent parent plotter object
*/
JKQTPColumnMathImage(JKQTBasePlotter* parent=nullptr); JKQTPColumnMathImage(JKQTBasePlotter* parent=nullptr);
JKQTPColumnMathImage(double x, double y, double width, double height, int Nx, int Ny, JKQTBasePlotter* parent=nullptr); /** \brief class constructor
JKQTPColumnMathImage(double x, double y, double width, double height, int imageColumn, int Nx, int Ny, JKQTPMathImageColorPalette palette=JKQTPMathImageGRAY, JKQTBasePlotter* parent=nullptr); *
/** \brief class constructor */ * \param x origin of the image (x-direction) in system coordinates
* \param y origin of the image (y-direction) in system coordinates
* \param width width of the image in system coordinates
* \param height height of the image in system coordinates
* \param parent parent plotter object
*
*/
JKQTPColumnMathImage(double x, double y, double width, double height, JKQTBasePlotter* parent=nullptr);
/** \brief class constructor
*
* \param x origin of the image (x-direction) in system coordinates
* \param y origin of the image (y-direction) in system coordinates
* \param width width of the image in system coordinates
* \param height height of the image in system coordinates
* \param imageColumn column to be plotted
* \param palette color palette to use for the plotting
* \param parent parent plotter object
*
*/
JKQTPColumnMathImage(double x, double y, double width, double height, int imageColumn, JKQTPMathImageColorPalette palette=JKQTPMathImageGRAY, JKQTBasePlotter* parent=nullptr);
/** \brief class constructor
*
* \param parent parent plotter object
*/
JKQTPColumnMathImage(JKQTPlotter* parent); JKQTPColumnMathImage(JKQTPlotter* parent);
JKQTPColumnMathImage(double x, double y, double width, double height, int Nx, int Ny, JKQTPlotter* parent); /** \brief class constructor
JKQTPColumnMathImage(double x, double y, double width, double height, int imageColumn, int Nx, int Ny, JKQTPMathImageColorPalette palette, JKQTPlotter* parent); *
JKQTPColumnMathImage(double x, double y, double width, double height, int imageColumn, int Nx, int Ny, JKQTPlotter* parent); * \param x origin of the image (x-direction) in system coordinates
* \param y origin of the image (y-direction) in system coordinates
* \param width width of the image in system coordinates
* \param height height of the image in system coordinates
* \param parent parent plotter object
*
*/
JKQTPColumnMathImage(double x, double y, double width, double height, JKQTPlotter* parent);
/** \brief class constructor
*
* \param x origin of the image (x-direction) in system coordinates
* \param y origin of the image (y-direction) in system coordinates
* \param width width of the image in system coordinates
* \param height height of the image in system coordinates
* \param imageColumn column to be plotted
* \param palette color palette to use for the plotting
* \param parent parent plotter object
*
*/
JKQTPColumnMathImage(double x, double y, double width, double height, int imageColumn, JKQTPMathImageColorPalette palette, JKQTPlotter* parent);
/** \brief class constructor
*
* \param x origin of the image (x-direction) in system coordinates
* \param y origin of the image (y-direction) in system coordinates
* \param width width of the image in system coordinates
* \param height height of the image in system coordinates
* \param imageColumn column to be plotted
* \param parent parent plotter object
*
*/
JKQTPColumnMathImage(double x, double y, double width, double height, int imageColumn, JKQTPlotter* parent);
/*! \copydoc imageColumn */ /*! \copydoc imageColumn */
virtual void setImageColumn(int __value); virtual void setImageColumn(int __value);
@ -775,7 +1085,14 @@ class JKQTP_LIB_EXPORT JKQTPColumnMathImage: public JKQTPMathImage {
/** \brief column containing the modifier image */ /** \brief column containing the modifier image */
int modifierColumn; int modifierColumn;
/** \copydoc JKQTPMathImage::ensureImageData() */
virtual void ensureImageData() override; virtual void ensureImageData() override;
private:
using JKQTPMathImage::setData;
using JKQTPMathImage::setDatatype;
using JKQTPMathImage::setDataModifier;
using JKQTPMathImage::setDatatypeModifier;
}; };

View File

@ -129,9 +129,8 @@ JKQTPRGBMathImage::JKQTPRGBMathImage(double x, double y, double width, double he
JKQTPRGBMathImage::JKQTPRGBMathImage(double x, double y, double width, double height, DataType datatype, void* data, int Nx, int Ny, JKQTPlotter *parent): JKQTPRGBMathImage::JKQTPRGBMathImage(double x, double y, double width, double height, DataType datatype, void* data, int Nx, int Ny, JKQTPlotter *parent):
JKQTPMathImageBase(x, y, width, height, datatype, data, Nx, Ny, parent) JKQTPRGBMathImage(x, y, width, height, datatype, data, Nx, Ny, parent->getPlotter())
{ {
initObject();
} }
JKQTPRGBMathImage::JKQTPRGBMathImage(JKQTBasePlotter *parent): JKQTPRGBMathImage::JKQTPRGBMathImage(JKQTBasePlotter *parent):
@ -142,9 +141,8 @@ JKQTPRGBMathImage::JKQTPRGBMathImage(JKQTBasePlotter *parent):
JKQTPRGBMathImage::JKQTPRGBMathImage(JKQTPlotter *parent): JKQTPRGBMathImage::JKQTPRGBMathImage(JKQTPlotter *parent):
JKQTPMathImageBase(0,0,0,0, DoubleArray, nullptr, 0, 0, parent) JKQTPRGBMathImage(parent->getPlotter())
{ {
initObject();
} }
void JKQTPRGBMathImage::setParent(JKQTBasePlotter* parent) { void JKQTPRGBMathImage::setParent(JKQTBasePlotter* parent) {
@ -1150,7 +1148,7 @@ JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(JKQTBasePlotter *parent):
this->datatype=JKQTPMathImageBase::DoubleArray; this->datatype=JKQTPMathImageBase::DoubleArray;
} }
JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double width, double height, int Nx, int Ny, JKQTBasePlotter *parent): JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double width, double height, JKQTBasePlotter *parent):
JKQTPRGBMathImage(x,y,width,height,DoubleArray,nullptr,Nx,Ny,parent) JKQTPRGBMathImage(x,y,width,height,DoubleArray,nullptr,Nx,Ny,parent)
{ {
this->modifierColumn=-1; this->modifierColumn=-1;
@ -1160,85 +1158,73 @@ JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double widt
this->datatype=JKQTPMathImageBase::DoubleArray; this->datatype=JKQTPMathImageBase::DoubleArray;
} }
JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int Nx, int Ny, JKQTBasePlotter *parent): JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, JKQTBasePlotter *parent):
JKQTPRGBMathImage(x,y,width,height,DoubleArray,nullptr,Nx,Ny,parent) JKQTPRGBMathImage(x,y,width,height,DoubleArray,nullptr,0,0,parent)
{ {
this->modifierColumn=-1; this->modifierColumn=-1;
this->imageRColumn=imageRColumn; this->imageRColumn=imageRColumn;
this->imageGColumn=-1; this->imageGColumn=-1;
this->imageBColumn=-1; this->imageBColumn=-1;
this->datatype=JKQTPMathImageBase::DoubleArray; this->datatype=JKQTPMathImageBase::DoubleArray;
if (parent && imageRColumn>=0 && parent->getDatastore()) {
Nx=parent->getDatastore()->getColumnImageWidth(imageRColumn);
Ny=parent->getDatastore()->getColumnImageHeight(imageRColumn);
}
} }
JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, int Nx, int Ny, JKQTBasePlotter *parent): JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, JKQTBasePlotter *parent):
JKQTPRGBMathImage(x,y,width,height,DoubleArray,nullptr,Nx,Ny,parent) JKQTPRGBMathImage(x,y,width,height,DoubleArray,nullptr,0,0,parent)
{ {
this->modifierColumn=-1; this->modifierColumn=-1;
this->imageRColumn=imageRColumn; this->imageRColumn=imageRColumn;
this->imageGColumn=imageGColumn; this->imageGColumn=imageGColumn;
this->imageBColumn=-1; this->imageBColumn=-1;
this->datatype=JKQTPMathImageBase::DoubleArray; this->datatype=JKQTPMathImageBase::DoubleArray;
if (parent && imageRColumn>=0 && parent->getDatastore()) {
Nx=parent->getDatastore()->getColumnImageWidth(imageRColumn);
Ny=parent->getDatastore()->getColumnImageHeight(imageRColumn);
}
} }
JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, int imageBColumn, int Nx, int Ny, JKQTBasePlotter *parent): JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, int imageBColumn, JKQTBasePlotter *parent):
JKQTPRGBMathImage(x,y,width,height,DoubleArray,nullptr,Nx,Ny,parent) JKQTPRGBMathImage(x,y,width,height,DoubleArray,nullptr,0,0,parent)
{ {
this->modifierColumn=-1; this->modifierColumn=-1;
this->imageRColumn=imageRColumn; this->imageRColumn=imageRColumn;
this->imageGColumn=imageGColumn; this->imageGColumn=imageGColumn;
this->imageBColumn=imageBColumn; this->imageBColumn=imageBColumn;
this->datatype=JKQTPMathImageBase::DoubleArray; this->datatype=JKQTPMathImageBase::DoubleArray;
if (parent && imageRColumn>=0 && parent->getDatastore()) {
Nx=parent->getDatastore()->getColumnImageWidth(imageRColumn);
Ny=parent->getDatastore()->getColumnImageHeight(imageRColumn);
}
} }
JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(JKQTPlotter *parent): JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(JKQTPlotter *parent):
JKQTPRGBMathImage(0,0,0,0,DoubleArray,nullptr,0,0,parent) JKQTPColumnRGBMathImage(parent->getPlotter())
{ {
this->modifierColumn=-1;
this->imageRColumn=-1;
this->imageGColumn=-1;
this->imageBColumn=-1;
this->datatype=JKQTPMathImageBase::DoubleArray;
} }
JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double width, double height, int Nx, int Ny, JKQTPlotter *parent): JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double width, double height, JKQTPlotter *parent):
JKQTPRGBMathImage(x,y,width,height,DoubleArray,nullptr,Nx,Ny,parent) JKQTPColumnRGBMathImage(x,y,width,height,Nx,Ny,parent->getPlotter())
{ {
this->modifierColumn=-1;
this->imageRColumn=-1;
this->imageGColumn=-1;
this->imageBColumn=-1;
this->datatype=JKQTPMathImageBase::DoubleArray;
} }
JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int Nx, int Ny, JKQTPlotter *parent): JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, JKQTPlotter *parent):
JKQTPRGBMathImage(x,y,width,height,DoubleArray,nullptr,Nx,Ny,parent) JKQTPColumnRGBMathImage(x,y,width,height,imageRColumn,parent->getPlotter())
{ {
this->modifierColumn=-1;
this->imageRColumn=imageRColumn;
this->imageGColumn=-1;
this->imageBColumn=-1;
this->datatype=JKQTPMathImageBase::DoubleArray;
} }
JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, int Nx, int Ny, JKQTPlotter *parent): JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, JKQTPlotter *parent):
JKQTPRGBMathImage(x,y,width,height,DoubleArray,nullptr,Nx,Ny,parent) JKQTPColumnRGBMathImage(x,y,width,height,imageRColumn,imageGColumn,parent->getPlotter())
{ {
this->modifierColumn=-1;
this->imageRColumn=imageRColumn;
this->imageGColumn=imageGColumn;
this->imageBColumn=-1;
this->datatype=JKQTPMathImageBase::DoubleArray;
} }
JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, int imageBColumn, int Nx, int Ny, JKQTPlotter *parent): JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, int imageBColumn, JKQTPlotter *parent):
JKQTPRGBMathImage(x,y,width,height,DoubleArray,nullptr,Nx,Ny,parent) JKQTPColumnRGBMathImage(x,y,width,height,imageRColumn,imageGColumn,imageBColumn,parent->getPlotter())
{ {
this->modifierColumn=-1;
this->imageRColumn=imageRColumn;
this->imageGColumn=imageGColumn;
this->imageBColumn=imageBColumn;
this->datatype=JKQTPMathImageBase::DoubleArray;
} }
bool JKQTPColumnRGBMathImage::usesColumn(int c) const bool JKQTPColumnRGBMathImage::usesColumn(int c) const
{ {
return (c==imageRColumn)||(c==imageBColumn)||(c==imageGColumn)||(c==modifierColumn); return (c==imageRColumn)||(c==imageBColumn)||(c==imageGColumn)||(c==modifierColumn);

View File

@ -46,16 +46,46 @@ class JKQTP_LIB_EXPORT JKQTPRGBMathImage: public JKQTPMathImageBase {
using JKQTPMathImageBase::setData; using JKQTPMathImageBase::setData;
/** \brief class constructor */ /** \brief class constructor
*
* \param x origin of the image (x-direction) in system coordinates
* \param y origin of the image (y-direction) in system coordinates
* \param width width of the image in system coordinates
* \param height height of the image in system coordinates
* \param datatype datatype of the image given in \a data
* \param data points to an image to be plotted (of size \a Nx * \a Ny )
* \param Nx width (in number of pixels) of \a data
* \param Ny height (in number of pixels) of \a data
* \param parent parent plotter object
*
*/
JKQTPRGBMathImage(double x, double y, double width, double height, DataType datatype, void* data, int Nx, int Ny, JKQTBasePlotter* parent=nullptr); JKQTPRGBMathImage(double x, double y, double width, double height, DataType datatype, void* data, int Nx, int Ny, JKQTBasePlotter* parent=nullptr);
/** \brief class constructor */ /** \brief class constructor
*
* \param x origin of the image (x-direction) in system coordinates
* \param y origin of the image (y-direction) in system coordinates
* \param width width of the image in system coordinates
* \param height height of the image in system coordinates
* \param datatype datatype of the image given in \a data
* \param data points to an image to be plotted (of size \a Nx * \a Ny )
* \param Nx width (in number of pixels) of \a data
* \param Ny height (in number of pixels) of \a data
* \param parent parent plotter object
*
*/
JKQTPRGBMathImage(double x, double y, double width, double height, DataType datatype, void* data, int Nx, int Ny, JKQTPlotter* parent); JKQTPRGBMathImage(double x, double y, double width, double height, DataType datatype, void* data, int Nx, int Ny, JKQTPlotter* parent);
/** \brief class constructor */ /** \brief class constructor
*
* \param parent parent plotter object
*/
JKQTPRGBMathImage(JKQTBasePlotter* parent=nullptr); JKQTPRGBMathImage(JKQTBasePlotter* parent=nullptr);
/** \brief class constructor */ /** \brief class constructor
*
* \param parent parent plotter object
*/
JKQTPRGBMathImage(JKQTPlotter* parent); JKQTPRGBMathImage(JKQTPlotter* parent);
/** \brief plots the graph to the plotter object specified as parent */ /** \brief plots the graph to the plotter object specified as parent */
@ -316,21 +346,57 @@ class JKQTP_LIB_EXPORT JKQTPRGBMathImage: public JKQTPMathImageBase {
bool colorbarsSideBySide; bool colorbarsSideBySide;
/** \brief object used for color bar axes /** \brief object used for color bar axes (right border, red image data)
* *
* \note this axis has some kind of a special role. It is used to format color bar axes * \note this axis has some kind of a special role. It is used to format color bar axes
*/ */
JKQTPVerticalIndependentAxis* colorBarRightAxis; JKQTPVerticalIndependentAxis* colorBarRightAxis;
/** \brief object used for color bar axes (top border, red image data)
*
* \note this axis has some kind of a special role. It is used to format color bar axes
*/
JKQTPHorizontalIndependentAxis* colorBarTopAxis; JKQTPHorizontalIndependentAxis* colorBarTopAxis;
/** \brief object used for color bar axes (right border, green image data)
*
* \note this axis has some kind of a special role. It is used to format color bar axes
*/
JKQTPVerticalIndependentAxis* colorBarRightAxisG; JKQTPVerticalIndependentAxis* colorBarRightAxisG;
/** \brief object used for color bar axes (top border, green image data)
*
* \note this axis has some kind of a special role. It is used to format color bar axes
*/
JKQTPHorizontalIndependentAxis* colorBarTopAxisG; JKQTPHorizontalIndependentAxis* colorBarTopAxisG;
/** \brief object used for color bar axes (right border, blue image data)
*
* \note this axis has some kind of a special role. It is used to format color bar axes
*/
JKQTPVerticalIndependentAxis* colorBarRightAxisB; JKQTPVerticalIndependentAxis* colorBarRightAxisB;
/** \brief object used for color bar axes (top border, blue image data)
*
* \note this axis has some kind of a special role. It is used to format color bar axes
*/
JKQTPHorizontalIndependentAxis* colorBarTopAxisB; JKQTPHorizontalIndependentAxis* colorBarTopAxisB;
/** \brief internal storage for minimum of the green image value range
*
* This is set e.g. when calling drawImage() or draw()
*/
double internalDataMinG; double internalDataMinG;
/** \brief internal storage for maximum of the green image value range
*
* This is set e.g. when calling drawImage() or draw()
*/
double internalDataMaxG; double internalDataMaxG;
/** \brief internal storage for minimum of the blue image value range
*
* This is set e.g. when calling drawImage() or draw()
*/
double internalDataMinB; double internalDataMinB;
/** \brief internal storage for maximum of the blue image value range
*
* This is set e.g. when calling drawImage() or draw()
*/
double internalDataMaxB; double internalDataMaxB;
protected: protected:
@ -366,18 +432,114 @@ class JKQTP_LIB_EXPORT JKQTPColumnRGBMathImage: public JKQTPRGBMathImage {
Q_OBJECT Q_OBJECT
public: public:
/** \brief class constructor */ /** \brief class constructor
*
* \param parent parent plotter object
*/
JKQTPColumnRGBMathImage(JKQTBasePlotter* parent=nullptr); JKQTPColumnRGBMathImage(JKQTBasePlotter* parent=nullptr);
JKQTPColumnRGBMathImage(double x, double y, double width, double height, int Nx, int Ny, JKQTBasePlotter* parent=nullptr); /** \brief class constructor
JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int Nx, int Ny, JKQTBasePlotter* parent=nullptr); *
JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, int Nx, int Ny, JKQTBasePlotter* parent=nullptr); * \param x origin of the image (x-direction) in system coordinates
JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, int imageBColumn, int Nx, int Ny, JKQTBasePlotter* parent=nullptr); * \param y origin of the image (y-direction) in system coordinates
/** \brief class constructor */ * \param width width of the image in system coordinates
* \param height height of the image in system coordinates
* \param parent parent plotter object
*
*/
JKQTPColumnRGBMathImage(double x, double y, double width, double height, JKQTBasePlotter* parent=nullptr);
/** \brief class constructor
*
* \param x origin of the image (x-direction) in system coordinates
* \param y origin of the image (y-direction) in system coordinates
* \param width width of the image in system coordinates
* \param height height of the image in system coordinates
* \param imageRColumn column for red channel to be plotted
* \param palette color palette to use for the plotting
* \param parent parent plotter object
*
*/
JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, JKQTBasePlotter* parent=nullptr);
/** \brief class constructor
*
* \param x origin of the image (x-direction) in system coordinates
* \param y origin of the image (y-direction) in system coordinates
* \param width width of the image in system coordinates
* \param height height of the image in system coordinates
* \param imageRColumn column for red channel to be plotted
* \param imageGColumn column for green channel to be plotted
* \param palette color palette to use for the plotting
* \param parent parent plotter object
*
*/
JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, JKQTBasePlotter* parent=nullptr);
/** \brief class constructor
*
* \param x origin of the image (x-direction) in system coordinates
* \param y origin of the image (y-direction) in system coordinates
* \param width width of the image in system coordinates
* \param height height of the image in system coordinates
* \param imageRColumn column for red channel to be plotted
* \param imageGColumn column for green channel to be plotted
* \param imageBColumn column for blue channel to be plotted
* \param palette color palette to use for the plotting
* \param parent parent plotter object
*
*/
JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, int imageBColumn, JKQTBasePlotter* parent=nullptr);
/** \brief class constructor
*
* \param parent parent plotter object
*/
JKQTPColumnRGBMathImage(JKQTPlotter* parent); JKQTPColumnRGBMathImage(JKQTPlotter* parent);
JKQTPColumnRGBMathImage(double x, double y, double width, double height, int Nx, int Ny, JKQTPlotter* parent); /** \brief class constructor
JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int Nx, int Ny, JKQTPlotter* parent); *
JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, int Nx, int Ny, JKQTPlotter* parent); * \param x origin of the image (x-direction) in system coordinates
JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, int imageBColumn, int Nx, int Ny, JKQTPlotter* parent); * \param y origin of the image (y-direction) in system coordinates
* \param width width of the image in system coordinates
* \param height height of the image in system coordinates
* \param parent parent plotter object
*
*/
JKQTPColumnRGBMathImage(double x, double y, double width, double height, JKQTPlotter* parent);
/** \brief class constructor
*
* \param x origin of the image (x-direction) in system coordinates
* \param y origin of the image (y-direction) in system coordinates
* \param width width of the image in system coordinates
* \param height height of the image in system coordinates
* \param imageRColumn column for red channel to be plotted
* \param palette color palette to use for the plotting
* \param parent parent plotter object
*
*/
JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, JKQTPlotter* parent);
/** \brief class constructor
*
* \param x origin of the image (x-direction) in system coordinates
* \param y origin of the image (y-direction) in system coordinates
* \param width width of the image in system coordinates
* \param height height of the image in system coordinates
* \param imageRColumn column for red channel to be plotted
* \param imageGColumn column for green channel to be plotted
* \param palette color palette to use for the plotting
* \param parent parent plotter object
*
*/
JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, JKQTPlotter* parent);
/** \brief class constructor
*
* \param x origin of the image (x-direction) in system coordinates
* \param y origin of the image (y-direction) in system coordinates
* \param width width of the image in system coordinates
* \param height height of the image in system coordinates
* \param imageRColumn column for red channel to be plotted
* \param imageGColumn column for green channel to be plotted
* \param imageBColumn column for blue channel to be plotted
* \param palette color palette to use for the plotting
* \param parent parent plotter object
*
*/
JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, int imageBColumn, JKQTPlotter* parent);
/*! \copydoc imageRColumn */ /*! \copydoc imageRColumn */
virtual void setImageRColumn(int __value); virtual void setImageRColumn(int __value);
@ -407,8 +569,20 @@ class JKQTP_LIB_EXPORT JKQTPColumnRGBMathImage: public JKQTPRGBMathImage {
int imageBColumn; int imageBColumn;
/** \brief column containing the modifier image */ /** \brief column containing the modifier image */
int modifierColumn; int modifierColumn;
/** \copydoc JKQTPRGBMathImage::ensureImageData() */
void ensureImageData() override; void ensureImageData() override;
private:
using JKQTPRGBMathImage::setData;
using JKQTPRGBMathImage::setDatatype;
using JKQTPRGBMathImage::setDataR;
using JKQTPRGBMathImage::setDatatypeR;
using JKQTPRGBMathImage::setDataG;
using JKQTPRGBMathImage::setDatatypeG;
using JKQTPRGBMathImage::setDataB;
using JKQTPRGBMathImage::setDatatypeB;
using JKQTPRGBMathImage::setDataModifier;
using JKQTPRGBMathImage::setDatatypeModifier;
}; };