21#ifndef JKQTPGRAPHSIMAGERGB_H
22#define JKQTPGRAPHSIMAGERGB_H
29#include "jkqtplotter/graphs/jkqtpimage.h"
30#include "jkqtplotter/jkqtptools.h"
31#include "jkqtplotter/jkqtpbaseelements.h"
32#include "jkqtplotter/jkqtplotter_imexport.h"
33#include "jkqtplotter/jkqtpimagetools.h"
109 virtual void setData(
const void* dataR,
const void* dataG,
const void* dataB,
int Nx,
int Ny);
114 virtual void setData(
const void* dataR,
int Nx,
int Ny)
override ;
468 virtual void setTitle(
const QString& title)
override;
base class for 2D plotter classes (used by the plotter widget JKQTPlotter)
Definition jkqtpbaseplotter.h:394
like JKQTPRGBMathImage but reads images from columns of the datastore
Definition jkqtpimagergb.h:490
virtual void setImageBColumn(int __value)
image column for B channel
int imageGColumn
image column for G channel
Definition jkqtpimagergb.h:620
int getImageRColumn() const
image column for R channel
int getImageBColumn() const
image column for B channel
int getImageGColumn() const
image column for G channel
virtual void setImageRColumn(int __value)
image column for R channel
virtual void setImageGColumn(int __value)
image column for G channel
JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, JKQTBasePlotter *parent=nullptr)
class constructor
JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, JKQTPlotter *parent)
class constructor
JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, int imageBColumn, JKQTBasePlotter *parent=nullptr)
class constructor
int imageBColumn
image column for B channel
Definition jkqtpimagergb.h:622
JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, int imageBColumn, JKQTPlotter *parent)
class constructor
int imageRColumn
image column for R channel
Definition jkqtpimagergb.h:618
JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, JKQTBasePlotter *parent=nullptr)
class constructor
void ensureImageData() override
overwrite this to fill the data poiters before they are accessed (e.g. to load data from a column in ...
JKQTPColumnRGBMathImage(double x, double y, double width, double height, JKQTBasePlotter *parent=nullptr)
class constructor
JKQTPColumnRGBMathImage(double x, double y, double width, double height, JKQTPlotter *parent)
class constructor
JKQTPColumnRGBMathImage(JKQTBasePlotter *parent=nullptr)
class constructor
int modifierColumn
column containing the modifier image
Definition jkqtpimagergb.h:624
JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, JKQTPlotter *parent)
class constructor
JKQTPColumnRGBMathImage(JKQTPlotter *parent)
class constructor
virtual void setModifierColumn(int __value)
column containing the modifier image
int getModifierColumn() const
column containing the modifier image
virtual bool usesColumn(int c) const override
returns true if the given column is used by the graph
this class extends the QPainter
Definition jkqtpenhancedpainter.h:33
implements a position-indipendent horizontal axis, based on JKQTPCoordinateAxis (for most of document...
Definition jkqtpcoordinateaxes.h:1270
base class to hold an image from an 2-dimensional array of values
Definition jkqtpimage.h:134
virtual void setDatatypeModifier(JKQTPMathImageDataType __value)
datatype of the data array data
virtual void setDatatype(JKQTPMathImageDataType __value)
datatype of the data array data
virtual void setDataModifier(const void *__value)
points to the data array, holding the modifier image
virtual void setData(const void *__value)
points to the data array, holding the image
class to plot an image from an 2-dimensional array of RGB values
Definition jkqtpimagergb.h:50
double internalDataMaxB
internal storage for maximum of the blue image value range
Definition jkqtpimagergb.h:459
virtual void setData(const void *dataR, int Nx, int Ny) override
set the plot-data to a given array data (red) with size Nx * Ny in row-major ordering
QAction * actSaveImage
action that calls saveImagePlotAsImage()
Definition jkqtpimagergb.h:463
void copyImagePlotAsImage()
copy the plotted image as an image into the clipboard
QVector< double > getDataBAsDoubleVector() const
return the data of the blue channel used for plotting as a QVector<double> in row-major data-ordering
JKQTPHorizontalIndependentAxis * getModifierColorBarRightAxis()
object used for color bar axes (top border, modifier image data)
double getImageMax() const
red image value range maximum
JKQTPRGBMathImage(double x, double y, double width, double height, JKQTPMathImageDataType datatype, const void *data, int Nx, int Ny, JKQTPlotter *parent)
class constructor
QString getImageNameR() const
name of the red image channel displayed above color bar (may contain LaTeX markup!...
JKQTPRGBMathImageRGBMode rgbMode
how to interpret the three data channels red, green and blue
Definition jkqtpimagergb.h:342
virtual void drawOutside(JKQTPEnhancedPainter &painter, QRect leftSpace, QRect rightSpace, QRect topSpace, QRect bottomSpace) override
plots outside the actual plot field of view (e.g. color bars, scale bars, ...)
JKQTPVerticalIndependentAxis * getColorBarRightAxisR()
object used for color bar axes (right border, red image data)
JKQTPMathImageDataType getDatatypeB() const
datatype of the data array data
virtual void getOutsideSize(JKQTPEnhancedPainter &painter, int &leftSpace, int &rightSpace, int &topSpace, int &bottomSpace) override
if the graph plots outside the actual plot field of view (e.g. color bars, scale bars,...
double internalDataMinB
internal storage for minimum of the blue image value range
Definition jkqtpimagergb.h:454
bool getShowColorBar() const
indicate whether to display a color bar
virtual void setParent(JKQTBasePlotter *parent) override
sets the parent painter class
void setImageMin(double __value)
red image value range minimum
JKQTPRGBMathImage(double x, double y, double width, double height, JKQTPMathImageDataType datatype, const void *data, int Nx, int Ny, JKQTBasePlotter *parent=nullptr)
class constructor
void setImageNameR(const QString &m)
name of the red image channel displayed above color bar (may contain LaTeX markup!...
QVector< double > getDataGAsDoubleVector() const
return the data of the green channel used for plotting as a QVector<double> in row-major data-orderin...
virtual void getDataMinMaxG(double &imin, double &imax)
determine min/max data value of the image
bool getAutoImageRange() const
indicates whether to estimate min/max of the image automatically
int getColorBarOffset() const
offset between outside space border and color bar
JKQTPVerticalIndependentAxis * getColorBarRightAxisG()
object used for color bar axes (right border, green image data)
JKQTPHorizontalIndependentAxis * colorBarTopAxis
object used for color bar axes (top border, red image data)
Definition jkqtpimagergb.h:394
void setImageMaxR(double m)
red image value range maximum
void setColorBarWidth(int __value)
width of the color bar
const JKQTPVerticalIndependentAxis * getModifierColorBarTopAxis() const
object used for color bar axes (right border, modifier image data)
JKQTPVerticalIndependentAxis * colorBarRightAxisG
object used for color bar axes (right border, green image data)
Definition jkqtpimagergb.h:399
QString getImageName() const
name of the red image channel displayed above color bar (may contain LaTeX markup!...
JKQTPHorizontalIndependentAxis * colorBarTopAxisG
object used for color bar axes (top border, green image data)
Definition jkqtpimagergb.h:404
JKQTPMathImageDataType getDatatypeR() const
datatype of the data array data
void setColorBarOffset(int __value)
offset between outside space border and color bar
double imageMaxG
green image value range maximum
Definition jkqtpimagergb.h:374
double imageMaxB
blue image value range maximum
Definition jkqtpimagergb.h:378
JKQTPHorizontalIndependentAxis * modifierColorBarRightAxis
object used for color bar axes (top border, modifier image data)
Definition jkqtpimagergb.h:438
const JKQTPHorizontalIndependentAxis * getColorBarTopAxis() const
object used for color bar axes (top border, red image data)
const void * getDataB() const
points to the data array, holding the image
JKQTPHorizontalIndependentAxis * colorBarTopAxisB
object used for color bar axes (top border, blue image data)
Definition jkqtpimagergb.h:414
void setModifierMax(double __value)
modifier value range maximum
const void * dataB
points to the data array, holding the image
Definition jkqtpimagergb.h:337
JKQTPRGBMathImage(JKQTBasePlotter *parent=nullptr)
class constructor
bool autoImageRange
indicates whether to estimate min/max of the image automatically
Definition jkqtpimagergb.h:366
void setImageMax(double __value)
red image value range maximum
void setImageMaxG(double __value)
green image value range maximum
virtual void setData(const void *dataR, int Nx, int Ny, JKQTPMathImageDataType datatype) override
set the plot-data to a given array data (red) with size Nx * Ny in row-major ordering and with the gi...
double getImageMaxB() const
blue image value range maximum
JKQTPHorizontalIndependentAxis * getColorBarTopAxisR()
object used for color bar axes (top border, red image data)
JKQTPVerticalIndependentAxis * getColorBarRightAxisB()
object used for color bar axes (right border, blue image data)
const JKQTPVerticalIndependentAxis * getColorBarRightAxis() const
object used for color bar axes (right border, red image data)
JKQTPVerticalIndependentAxis * getColorBarRightAxis()
object used for color bar axes (right border, red image data)
virtual void setDataB(const void *__value)
points to the data array, holding the image
double getImageMin() const
red image value range minimum
void setColorBarModifiedWidth(double __value)
width of the color bar when modifier is on
JKQTPVerticalIndependentAxis * colorBarRightAxis
object used for color bar axes (right border, red image data)
Definition jkqtpimagergb.h:389
QString imageNameB
name of the blue image channel displayed above color bar (may contain LaTeX markup!...
Definition jkqtpimagergb.h:353
JKQTPRGBMathImageRGBMode getRgbMode() const
how to interpret the three data channels red, green and blue
bool showColorBar
indicate whether to display a color bar
Definition jkqtpimagergb.h:360
double colorBarModifiedWidth
width of the color bar when modifier is on
Definition jkqtpimagergb.h:422
virtual void setTitle(const QString &title) override
sets the title of the plot (for display in key!).
JKQTPMathImageModifierMode getModifierMode() const
how to apply the modifier column dataModifier
QString getImageNameG() const
name of the green image channel displayed above color bar (may contain LaTeX markup!...
bool getColorBarTopVisible() const
top color bar visible
virtual QImage drawImage()
return the plotted image only as a QImage
virtual void setDataG(const void *__value)
points to the data array, holding the image
void setDatatypeG(JKQTPMathImageDataType __value)
datatype of the data array data
double imageMaxR
red image value range maximum
Definition jkqtpimagergb.h:370
double getValueAt(double x, double y, int channel=0)
return the value (raw data!) of the contained image at the given coordinate
double getModifierMax() const
modifier value range maximum
void setAutoImageRange(bool __value)
indicates whether to estimate min/max of the image automatically
void setModifierMode(const JKQTPMathImageModifierMode &__value)
how to apply the modifier column dataModifier
QString getImageNameFontName() const
font name when displaying imageName
JKQTPMathImageModifierMode modifierMode
how to apply the modifier column dataModifier
Definition jkqtpimagergb.h:426
void setColorBarRightVisible(bool __value)
right color bar visible
JKQTPVerticalIndependentAxis * getModifierColorBarTopAxis()
object used for color bar axes (right border, modifier image data)
void setDatatypeR(JKQTPMathImageDataType __value)
datatype of the data array data
bool autoModifierRange
indicates whether to estimate min/max of the modifier automatically
Definition jkqtpimagergb.h:416
void setImageName(const QString &__value)
name of the red image channel displayed above color bar (may contain LaTeX markup!...
QString imageNameR
name of the red image channel displayed above color bar (may contain LaTeX markup!...
Definition jkqtpimagergb.h:349
void setImageMinB(double __value)
blue image value range minimum
double internalDataMinG
internal storage for minimum of the green image value range
Definition jkqtpimagergb.h:444
bool colorBarRightVisible
right color bar visible
Definition jkqtpimagergb.h:347
int colorBarWidth
width of the color bar
Definition jkqtpimagergb.h:362
JKQTPMathImageDataType datatypeB
datatype of the data array data
Definition jkqtpimagergb.h:339
virtual void drawKeyMarker(JKQTPEnhancedPainter &painter, const QRectF &rect) override
plots a key marker inside the specified rectangle rect
double internalDataMaxG
internal storage for maximum of the green image value range
Definition jkqtpimagergb.h:449
JKQTPVerticalIndependentAxis * colorBarRightAxisB
object used for color bar axes (right border, blue image data)
Definition jkqtpimagergb.h:409
const void * getDataR() const
points to the data array, holding the image
double getColorBarModifiedWidth() const
width of the color bar when modifier is on
const JKQTPHorizontalIndependentAxis * getColorBarTopAxisR() const
object used for color bar axes (top border, red image data)
double imageMinG
green image value range minimum
Definition jkqtpimagergb.h:372
const JKQTPHorizontalIndependentAxis * getModifierColorBarRightAxis() const
object used for color bar axes (top border, modifier image data)
JKQTPRGBMathImage(JKQTPlotter *parent)
class constructor
void setDatatypeB(JKQTPMathImageDataType __value)
datatype of the data array data
bool getAutoModifierRange() const
indicates whether to estimate min/max of the modifier automatically
void setColorBarTopVisible(bool __value)
top color bar visible
void setImageNameFontName(const QString &__value)
font name when displaying imageName
virtual void getDataMinMax(double &imin, double &imax) override
determine min/max data value of the image
bool colorbarsSideBySide
if true the different color bars share the space of a single color bar, if set false each colorbar us...
Definition jkqtpimagergb.h:382
double modifierMin
modifier value range minimum
Definition jkqtpimagergb.h:418
JKQTPMathImageDataType datatypeG
datatype of the data array data
Definition jkqtpimagergb.h:335
const void * dataG
points to the data array, holding the image
Definition jkqtpimagergb.h:333
void setImageMinR(double m)
red image value range minimum
QString imageNameG
name of the green image channel displayed above color bar (may contain LaTeX markup!...
Definition jkqtpimagergb.h:351
void setImageNameG(const QString &__value)
name of the green image channel displayed above color bar (may contain LaTeX markup!...
void setShowColorBar(bool __value)
indicate whether to display a color bar
JKQTPHorizontalIndependentAxis * getColorBarTopAxis()
object used for color bar axes (top border, red image data)
const JKQTPVerticalIndependentAxis * getColorBarRightAxisR() const
object used for color bar axes (right border, red image data)
bool colorBarTopVisible
top color bar visible
Definition jkqtpimagergb.h:345
QAction * actCopyImage
action that calls copyImagePlotAsImage()
Definition jkqtpimagergb.h:465
double imageNameFontSize
font size in points when displaying imageName
Definition jkqtpimagergb.h:357
void setAutoModifierRange(bool __value)
indicates whether to estimate min/max of the modifier automatically
double modifierMax
modifier value range maximum
Definition jkqtpimagergb.h:420
double getImageNameFontSize() const
font size in points when displaying imageName
void setColorbarsSideBySide(bool __value)
if true the different color bars share the space of a single color bar, if set false each colorbar us...
double getModifierMin() const
modifier value range minimum
double getImageMinB() const
blue image value range minimum
bool getColorBarRightVisible() const
right color bar visible
const JKQTPHorizontalIndependentAxis * getColorBarTopAxisG() const
object used for color bar axes (top border, green image data)
virtual void setData(const void *dataR, const void *dataG, const void *dataB, int Nx, int Ny, JKQTPMathImageDataType datatype)
set the plot-data to a given array data (red), dataG (green), dataB (blue) with size Nx * Ny in row-m...
JKQTPMathImageDataType getDatatypeG() const
datatype of the data array data
void saveImagePlotAsImage(const QString &filename=QString(""), const QByteArray &outputFormat=QByteArray())
save the plotted image as a file with filename and format outputFormat
virtual void draw(JKQTPEnhancedPainter &painter) override
plots the graph to the plotter object specified as parent
void setColorBarRelativeHeight(double __value)
height of the color bar, as multiple of plotHeight
JKQTPVerticalIndependentAxis * modifierColorBarTopAxis
object used for color bar axes (right border, modifier image data)
Definition jkqtpimagergb.h:433
const JKQTPVerticalIndependentAxis * getColorBarRightAxisB() const
object used for color bar axes (right border, blue image data)
void setImageNameB(const QString &__value)
name of the blue image channel displayed above color bar (may contain LaTeX markup!...
double colorBarRelativeHeight
height of the color bar, as multiple of plotHeight
Definition jkqtpimagergb.h:364
void setRgbMode(JKQTPRGBMathImageRGBMode __value)
how to interpret the three data channels red, green and blue
void setImageMinG(double __value)
green image value range minimum
int getColorBarWidth() const
width of the color bar
QString getImageNameB() const
name of the blue image channel displayed above color bar (may contain LaTeX markup!...
bool getColorbarsSideBySide() const
if true the different color bars share the space of a single color bar, if set false each colorbar us...
const JKQTPHorizontalIndependentAxis * getColorBarTopAxisB() const
object used for color bar axes (top border, blue image data)
double getImageMinG() const
green image value range minimum
void setModifierMin(double __value)
modifier value range minimum
const JKQTPVerticalIndependentAxis * getColorBarRightAxisG() const
object used for color bar axes (right border, green image data)
virtual void setData(const void *dataR, const void *dataG, const void *dataB, int Nx, int Ny)
set the plot-data to a given array data (red), dataG (green), dataB (blue) with size Nx * Ny in row-m...
JKQTPHorizontalIndependentAxis * getColorBarTopAxisG()
object used for color bar axes (top border, green image data)
JKQTPHorizontalIndependentAxis * getColorBarTopAxisB()
object used for color bar axes (top border, blue image data)
virtual void getDataMinMaxB(double &imin, double &imax)
determine min/max data value of the image
double imageMinB
blue image value range minimum
Definition jkqtpimagergb.h:376
double getColorBarRelativeHeight() const
height of the color bar, as multiple of plotHeight
QString imageNameFontName
font name when displaying imageName
Definition jkqtpimagergb.h:355
void setImageNameFontSize(double __value)
font size in points when displaying imageName
void setImageMaxB(double __value)
blue image value range maximum
const void * getDataG() const
points to the data array, holding the image
virtual void setDataR(const void *__value)
points to the data array, holding the image
double imageMinR
red image value range minimum
Definition jkqtpimagergb.h:368
double getImageMaxG() const
green image value range maximum
int colorBarOffset
offset between outside space border and color bar
Definition jkqtpimagergb.h:380
implements a position-indipendent vertical axis, based on JKQTPCoordinateAxis (for most of documentat...
Definition jkqtpcoordinateaxes.h:1083
plotter widget for scientific plots (uses JKQTBasePlotter to do the actual drawing)
Definition jkqtplotter.h:364
#define JKQTPLOTTER_LIB_EXPORT
Definition jkqtplotter_imexport.h:89