2015-07-11 18:56:02 +08:00
/*
2019-01-12 23:01:55 +08:00
Copyright ( c ) 2008 - 2019 Jan W . Krieger & Sebastian Isbaner ( contour plot )
2015-07-11 18:56:02 +08:00
2015-07-12 22:34:27 +08:00
2015-07-11 18:56:02 +08:00
This software is free software : you can redistribute it and / or modify
it under the terms of the GNU Lesser General Public License ( LGPL ) as published by
the Free Software Foundation , either version 2 of the License , or
( at your option ) any later version .
This program is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
GNU Lesser General Public License ( LGPL ) for more details .
You should have received a copy of the GNU Lesser General Public License ( LGPL )
along with this program . If not , see < http : //www.gnu.org/licenses/>.
*/
2018-12-19 00:13:18 +08:00
# ifndef jkqtpgraphsimage_H
# define jkqtpgraphsimage_H
2015-07-11 18:56:02 +08:00
2018-12-19 00:13:18 +08:00
/** \file jkqtpgraphsimage.h
2019-01-13 01:53:16 +08:00
* \ ingroup jkqtplotter_imagelots_elements
2015-07-11 18:56:02 +08:00
*/
# include <QString>
# include <QPainter>
# include <QImage>
# include <QIcon>
2018-12-19 00:13:18 +08:00
# include "jkqtplotter/jkqtpgraphs.h"
2018-11-26 03:25:44 +08:00
# include "jkqtplottertools/jkqtptools.h"
# include "jkqtplotter/jkqtpbaseelements.h"
# include "jkqtplottertools/jkqtp_imexport.h"
2018-12-19 00:13:18 +08:00
# include "jkqtplottertools/jkqtpimagetools.h"
2015-07-11 18:56:02 +08:00
/*! \brief base class for plotting an image
2019-01-13 01:53:16 +08:00
\ ingroup jkqtplotter_imagelots_elements
2015-07-11 18:56:02 +08:00
*/
2019-01-20 17:49:29 +08:00
class LIB_EXPORT JKQTPImageBase : public JKQTPGraph {
2015-07-11 18:56:02 +08:00
Q_OBJECT
public :
/** \brief class constructor */
2019-01-20 17:49:29 +08:00
JKQTPImageBase ( JKQTBasePlotter * parent = nullptr ) ;
2015-07-11 18:56:02 +08:00
/** \brief class constructor */
2019-01-20 17:49:29 +08:00
JKQTPImageBase ( double x , double y , double width , double height , JKQTBasePlotter * parent = nullptr ) ;
2015-08-02 19:36:54 +08:00
/** \brief class constructor */
2019-01-20 23:15:10 +08:00
JKQTPImageBase ( JKQTPlotter * parent ) ;
2015-08-02 19:36:54 +08:00
/** \brief class constructor */
2019-01-20 23:15:10 +08:00
JKQTPImageBase ( double x , double y , double width , double height , JKQTPlotter * parent ) ;
2015-07-11 18:56:02 +08:00
/** \brief plots a key marker inside the specified rectangle \a rect */
2018-12-28 05:52:00 +08:00
virtual void drawKeyMarker ( JKQTPEnhancedPainter & painter , QRectF & rect ) override ;
2015-07-11 18:56:02 +08:00
/** \brief get the maximum and minimum x-value of the graph
*
* The result is given in the two parameters which are call - by - reference parameters !
*/
2018-12-28 05:52:00 +08:00
virtual bool getXMinMax ( double & minx , double & maxx , double & smallestGreaterZero ) override ;
2015-07-11 18:56:02 +08:00
/** \brief get the maximum and minimum y-value of the graph
*
* The result is given in the two parameters which are call - by - reference parameters !
*/
2018-12-28 05:52:00 +08:00
virtual bool getYMinMax ( double & miny , double & maxy , double & smallestGreaterZero ) override ;
2015-07-11 18:56:02 +08:00
/** \brief returns the color to be used for the key label */
2018-12-28 05:52:00 +08:00
virtual QColor getKeyLabelColor ( ) override ;
2015-07-11 18:56:02 +08:00
2019-01-26 20:00:40 +08:00
/*! \brief sets the property x ( \copybrief x ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter x is : < BLOCKQUOTE > \ copydoc x < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see x for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setX ( double __value )
2019-01-10 04:23:24 +08:00
{
this - > x = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property x ( \copybrief x ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter x is : < BLOCKQUOTE > \ copydoc x < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see x for more information */
2019-01-26 20:00:40 +08:00
inline virtual double getX ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > x ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property y ( \copybrief y ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter y is : < BLOCKQUOTE > \ copydoc y < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see y for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setY ( double __value )
2019-01-10 04:23:24 +08:00
{
this - > y = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property y ( \copybrief y ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter y is : < BLOCKQUOTE > \ copydoc y < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see y for more information */
2019-01-26 20:00:40 +08:00
inline virtual double getY ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > y ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property width ( \copybrief width ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter width is : < BLOCKQUOTE > \ copydoc width < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see width for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setWidth ( double __value )
2019-01-10 04:23:24 +08:00
{
this - > width = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property width ( \copybrief width ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter width is : < BLOCKQUOTE > \ copydoc width < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see width for more information */
2019-01-26 20:00:40 +08:00
inline virtual double getWidth ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > width ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property height ( \copybrief height ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter height is : < BLOCKQUOTE > \ copydoc height < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see height for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setHeight ( double __value )
2019-01-10 04:23:24 +08:00
{
this - > height = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property height ( \copybrief height ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter height is : < BLOCKQUOTE > \ copydoc height < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see height for more information */
2019-01-26 20:00:40 +08:00
inline virtual double getHeight ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > height ;
}
2015-07-11 18:56:02 +08:00
protected :
/** \brief x coordinate of lower left corner */
double x ;
/** \brief y coordinate of lower left corner */
double y ;
/** \brief width of image */
double width ;
/** \brief height of image */
double height ;
/*! \brief plot the given QImage onto the widget where the QImage fills the area defined by x, y (lower left corner) and width, height
in the simplest case your implementation of draw ( ) will call
< code > plotImage ( painter , image , this - > x , this - > y , this - > width , this - > height ) ; < / code >
*/
virtual void plotImage ( JKQTPEnhancedPainter & painter , QImage & image , double x , double y , double width , double height ) ;
} ;
/*! \brief base class to hold an image from an 2-dimensional array of values
2019-01-13 01:53:16 +08:00
\ ingroup jkqtplotter_imagelots_elements
\ image html jkqtplotter_simpletest_imageplot . png
2015-07-11 18:56:02 +08:00
*/
class LIB_EXPORT JKQTPMathImageBase : public JKQTPImageBase {
Q_OBJECT
public :
/** \brief possible datatypes of the data array, plotted by this class. */
enum DataType {
2019-01-26 20:00:40 +08:00
FloatArray , /*!< Data is of type \c float */
DoubleArray , /*!< Data is of type \c double */
UInt8Array , /*!< Data is of type \c uint8_t */
UInt16Array , /*!< Data is of type \c uint16_t */
UInt32Array , /*!< Data is of type \c uint32_t */
UInt64Array , /*!< Data is of type \c uint8_t */
Int8Array , /*!< Data is of type \c int8_t */
Int16Array , /*!< Data is of type \c int16_t */
Int32Array , /*!< Data is of type \c int32_t */
Int64Array /*!< Data is of type \c int64_t */
2015-07-11 18:56:02 +08:00
} ;
2019-01-26 20:00:40 +08:00
/** \brief describes how to modify a rendered image with a second data array \see ModifierModeToString(), StringToModifierMode(), JKQTPImageModifierModeComboBox */
2015-07-11 18:56:02 +08:00
enum ModifierMode {
2019-01-26 20:00:40 +08:00
ModifyNone = 0 , /*!< no modification \image html JKQTPMathImageBaseModifyNone.png */
ModifyValue = 1 , /*!< modify the VALUE-channel from the HSV color space \image html JKQTPMathImageBaseModifyValue.png */
ModifySaturation = 2 , /*!< modify the SATURATION-channel from the HSV color space \image html JKQTPMathImageBaseModifySaturation.png */
ModifyAlpha = 3 , /*!< modify the ALPHA/TRANSPARENCY-channel from the RGBA color space \image html JKQTPMathImageBaseModifyAlpha.png */
ModifyTransparency = ModifyAlpha , /*!< \see ModifyAlpha */
ModifyLuminance = 4 , /*!< modify the LUMINANCE-channel from the HSL color space \image html JKQTPMathImageBaseModifyLuminance.png */
ModifyHue = 5 , /*!< modify the VALUE-channel from the HSV color space \image html JKQTPMathImageBaseModifyHue.png */
2015-07-11 18:56:02 +08:00
} ;
2019-01-26 20:00:40 +08:00
/** \brief convert a ModifierMode to a string \see ModifierModeToString(), ModifierMode */
static ModifierMode StringToModifierMode ( const QString & mode ) ;
2015-07-11 18:56:02 +08:00
2019-01-26 20:00:40 +08:00
/** \brief convert a string to a ModifierMode \see StringToModifierMode(), ModifierMode */
static QString ModifierModeToString ( const ModifierMode & mode ) ;
2015-07-11 18:56:02 +08:00
/** \brief class constructor */
2019-01-20 17:49:29 +08:00
JKQTPMathImageBase ( JKQTBasePlotter * parent = nullptr ) ;
JKQTPMathImageBase ( double x , double y , double width , double height , JKQTBasePlotter * parent = nullptr ) ;
2019-01-26 19:28:44 +08:00
JKQTPMathImageBase ( double x , double y , double width , double height , DataType datatype , void * data , int Nx , int Ny , JKQTBasePlotter * parent = nullptr ) ;
2015-07-11 18:56:02 +08:00
2015-08-02 19:36:54 +08:00
/** \brief class constructor */
2019-01-20 23:15:10 +08:00
JKQTPMathImageBase ( JKQTPlotter * parent ) ;
JKQTPMathImageBase ( double x , double y , double width , double height , JKQTPlotter * parent = nullptr ) ;
2019-01-26 19:28:44 +08:00
JKQTPMathImageBase ( double x , double y , double width , double height , DataType datatype , void * data , int Nx , int Ny , JKQTPlotter * parent ) ;
2015-08-02 19:36:54 +08:00
2015-07-11 18:56:02 +08:00
/** \brief plots a key marker inside the specified rectangle \a rect */
2018-12-28 05:52:00 +08:00
virtual void drawKeyMarker ( JKQTPEnhancedPainter & painter , QRectF & rect ) override ;
2015-07-11 18:56:02 +08:00
2019-01-26 20:00:40 +08:00
/*! \brief sets the property Nx ( \copybrief Nx ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter Nx is : < BLOCKQUOTE > \ copydoc Nx < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see Nx for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setNx ( int __value )
2019-01-10 04:23:24 +08:00
{
this - > Nx = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property Nx ( \copybrief Nx ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter Nx is : < BLOCKQUOTE > \ copydoc Nx < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see Nx for more information */
2019-01-26 20:00:40 +08:00
inline virtual int getNx ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > Nx ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property Ny ( \copybrief Ny ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter Ny is : < BLOCKQUOTE > \ copydoc Ny < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see Ny for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setNy ( int __value )
2019-01-10 04:23:24 +08:00
{
this - > Ny = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property Ny ( \copybrief Ny ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter Ny is : < BLOCKQUOTE > \ copydoc Ny < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see Ny for more information */
2019-01-26 20:00:40 +08:00
inline virtual int getNy ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > Ny ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property data ( \copybrief data ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter data is : < BLOCKQUOTE > \ copydoc data < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see data for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setData ( void * __value )
2019-01-10 04:23:24 +08:00
{
this - > data = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property data ( \copybrief data ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter data is : < BLOCKQUOTE > \ copydoc data < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see data for more information */
2019-01-26 20:00:40 +08:00
inline virtual void * getData ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > data ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property datatype ( \copybrief datatype ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter datatype is : < BLOCKQUOTE > \ copydoc datatype < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see datatype for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setDatatype ( const DataType & __value )
2019-01-10 04:23:24 +08:00
{
this - > datatype = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property datatype ( \copybrief datatype ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter datatype is : < BLOCKQUOTE > \ copydoc datatype < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see datatype for more information */
2019-01-26 20:00:40 +08:00
inline virtual DataType getDatatype ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > datatype ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property dataModifier ( \copybrief dataModifier ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter dataModifier is : < BLOCKQUOTE > \ copydoc dataModifier < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see dataModifier for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setDataModifier ( void * __value )
2019-01-10 04:23:24 +08:00
{
this - > dataModifier = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property dataModifier ( \copybrief dataModifier ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter dataModifier is : < BLOCKQUOTE > \ copydoc dataModifier < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see dataModifier for more information */
2019-01-26 20:00:40 +08:00
inline virtual void * getDataModifier ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > dataModifier ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property datatypeModifier ( \copybrief datatypeModifier ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter datatypeModifier is : < BLOCKQUOTE > \ copydoc datatypeModifier < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see datatypeModifier for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setDatatypeModifier ( const DataType & __value )
2019-01-10 04:23:24 +08:00
{
this - > datatypeModifier = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property datatypeModifier ( \copybrief datatypeModifier ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter datatypeModifier is : < BLOCKQUOTE > \ copydoc datatypeModifier < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see datatypeModifier for more information */
2019-01-26 20:00:40 +08:00
inline virtual DataType getDatatypeModifier ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > datatypeModifier ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property modifierMode ( \copybrief modifierMode ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter modifierMode is : < BLOCKQUOTE > \ copydoc modifierMode < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see modifierMode for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setModifierMode ( const ModifierMode & __value )
2019-01-10 04:23:24 +08:00
{
this - > modifierMode = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property modifierMode ( \copybrief modifierMode ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter modifierMode is : < BLOCKQUOTE > \ copydoc modifierMode < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see modifierMode for more information */
2019-01-26 20:00:40 +08:00
inline virtual ModifierMode getModifierMode ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > modifierMode ;
}
2015-07-11 18:56:02 +08:00
2019-01-26 20:00:40 +08:00
virtual void setDataModifier ( void * data , DataType datatype ) ;
virtual void setData ( void * data , int Nx , int Ny , DataType datatype ) ;
virtual void setData ( void * data , int Nx , int Ny ) ;
2015-07-11 18:56:02 +08:00
/** \brief determine min/max data value of the image */
virtual void getDataMinMax ( double & imin , double & imax ) ;
/** \brief determine min/max data value of the image */
virtual void getModifierMinMax ( double & imin , double & imax ) ;
QVector < double > getDataAsDoubleVector ( ) const ;
QVector < double > getDataModifierAsDoubleVector ( ) const ;
protected :
/** \brief points to the data array, holding the image */
void * data ;
/** \brief datatype of the data array data */
DataType datatype ;
2019-01-20 23:15:10 +08:00
/** \brief width of the data array data in pt */
2019-01-26 19:28:44 +08:00
int Nx ;
2019-01-20 23:15:10 +08:00
/** \brief height of the data array data in pt */
2019-01-26 19:28:44 +08:00
int Ny ;
2015-07-11 18:56:02 +08:00
/** \brief points to the data array, holding the modifier image */
void * dataModifier ;
/** \brief datatype of the data array data */
DataType datatypeModifier ;
ModifierMode modifierMode ;
double internalDataMin ;
double internalDataMax ;
double internalModifierMin ;
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 */
virtual void ensureImageData ( ) ;
void modifyImage ( QImage & img ) ;
2019-01-26 19:28:44 +08:00
void modifyImage ( QImage & img , void * dataModifier , DataType datatypeModifier , int Nx , int Ny , double internalModifierMin , double internalModifierMax ) ;
2015-07-11 18:56:02 +08:00
} ;
/*! \brief class to plot an image from a QImage object
2019-01-13 01:53:16 +08:00
\ ingroup jkqtplotter_imagelots_elements
2015-07-11 18:56:02 +08:00
2019-01-13 01:53:16 +08:00
\ image html jkqtplotter_simpletest_rgbimageplot_qt
2015-07-11 18:56:02 +08:00
*/
class LIB_EXPORT JKQTPImage : public JKQTPImageBase {
Q_OBJECT
public :
2015-08-02 19:36:54 +08:00
/** \brief class constructor */
2019-01-20 17:49:29 +08:00
JKQTPImage ( JKQTBasePlotter * parent = nullptr ) ;
2015-08-02 19:36:54 +08:00
/** \brief class constructor */
2019-01-20 23:15:10 +08:00
JKQTPImage ( JKQTPlotter * parent ) ;
2018-12-07 01:19:02 +08:00
/** \brief class constructor, which points to an external image (not owned by this object!!!) */
2019-01-20 17:49:29 +08:00
JKQTPImage ( double x , double y , double width , double height , QImage * image , JKQTBasePlotter * parent = nullptr ) ;
2018-12-07 01:19:02 +08:00
/** \brief class constructor, which points to an external image (not owned by this object!!!) */
2019-01-20 23:15:10 +08:00
JKQTPImage ( double x , double y , double width , double height , QImage * image , JKQTPlotter * parent ) ;
2018-12-07 01:19:02 +08:00
/** \brief class constructor, which generates an internal image object, by copying \a image */
2019-01-20 17:49:29 +08:00
JKQTPImage ( double x , double y , double width , double height , const QImage & image , JKQTBasePlotter * parent = nullptr ) ;
2018-12-07 01:19:02 +08:00
/** \brief class constructor, which generates an internal image object, by copying \a image */
2019-01-20 23:15:10 +08:00
JKQTPImage ( double x , double y , double width , double height , const QImage & image , JKQTPlotter * parent ) ;
2018-12-07 01:19:02 +08:00
2018-12-28 05:52:00 +08:00
virtual ~ JKQTPImage ( ) override ;
2015-07-11 18:56:02 +08:00
/** \brief plots the graph to the plotter object specified as parent */
2018-12-28 05:52:00 +08:00
virtual void draw ( JKQTPEnhancedPainter & painter ) override ;
2015-07-11 18:56:02 +08:00
/** \brief plots a key marker inside the specified rectangle \a rect */
2018-12-28 05:52:00 +08:00
virtual void drawKeyMarker ( JKQTPEnhancedPainter & painter , QRectF & rect ) override ;
2015-07-11 18:56:02 +08:00
2018-12-07 01:19:02 +08:00
/** \brief copy an external image into an internally owned copy */
2019-01-26 20:00:40 +08:00
virtual void setImage ( const QImage & image ) ;
2018-12-07 01:19:02 +08:00
/** \brief set an external image to be plotted, the image will NOT BE OWNED by the graph-object */
2019-01-26 20:00:40 +08:00
virtual void setImage ( QImage * image ) ;
2015-07-11 18:56:02 +08:00
2018-12-07 01:19:02 +08:00
/** \brief deletes the internal image */
void clear_image ( ) ;
2015-07-11 18:56:02 +08:00
2019-01-26 20:00:40 +08:00
/*! \brief returns the property image ( \copybrief image ). \details Description of the parameter image is: <BLOCKQUOTE>\copydoc image </BLOCKQUOTE>. \see image for more information */
inline QImage * getImage ( ) const { return this - > image ; }
2015-07-11 18:56:02 +08:00
protected :
2018-12-07 01:19:02 +08:00
/** \brief the image to be plotted. This is freed by the destructor, iff \a image_owned is set to \c true (.e.g by QImage-copy-constructors) */
2015-07-11 18:56:02 +08:00
QImage * image ;
2018-12-07 01:19:02 +08:00
/** \brief indicates that the image \a image is owned by this object (i.e. freed, when the object is destroyed) */
bool image_owned ;
2015-07-11 18:56:02 +08:00
2015-08-02 19:36:54 +08:00
void createImageActions ( ) ;
2015-07-11 18:56:02 +08:00
protected :
QAction * actSaveImage ;
QAction * actCopyImage ;
public :
2019-01-20 17:49:29 +08:00
virtual void setParent ( JKQTBasePlotter * parent ) override ;
2019-01-26 20:00:40 +08:00
virtual void setTitle ( const QString & title ) override ;
2015-07-11 18:56:02 +08:00
public slots :
void saveImagePlotAsImage ( const QString & filename = QString ( " " ) , const QByteArray & outputFormat = QByteArray ( ) ) ;
void copyImagePlotAsImage ( ) ;
} ;
/*! \brief class to plot an image from an 2-dimensional array of values
2019-01-13 01:53:16 +08:00
\ ingroup jkqtplotter_imagelots_elements
2015-07-11 18:56:02 +08:00
2019-01-13 01:53:16 +08:00
\ image html jkqtplotter_simpletest_imageplot . png
\ image html jkqtplotter_simpletest_imageplot_modifier . png
\ image html jkqtplotter_simpletest_imageplot__smallscaletransparent . png
2015-07-11 18:56:02 +08:00
*/
class LIB_EXPORT JKQTPMathImage : public JKQTPMathImageBase {
Q_OBJECT
public :
/** \brief class constructor */
2019-01-26 19:28:44 +08:00
JKQTPMathImage ( double x , double y , double width , double height , DataType datatype , void * data , int Nx , int Ny , JKQTPMathImageColorPalette palette = JKQTPMathImageGRAY , JKQTBasePlotter * parent = nullptr ) ;
2019-01-20 17:49:29 +08:00
JKQTPMathImage ( JKQTBasePlotter * parent = nullptr ) ;
2019-01-26 19:28:44 +08:00
JKQTPMathImage ( double x , double y , double width , double height , DataType datatype , void * data , int Nx , int Ny , JKQTPMathImageColorPalette palette , JKQTPlotter * parent ) ;
2019-01-20 23:15:10 +08:00
JKQTPMathImage ( JKQTPlotter * parent ) ;
2015-07-11 18:56:02 +08:00
/** \brief plots the graph to the plotter object specified as parent */
2018-12-28 05:52:00 +08:00
virtual void draw ( JKQTPEnhancedPainter & painter ) override ;
2015-07-11 18:56:02 +08:00
2019-01-20 17:49:29 +08:00
virtual void setParent ( JKQTBasePlotter * parent ) override ;
2015-07-11 18:56:02 +08:00
/*! \brief get list with all available palettes */
static QStringList getPalettes ( ) ;
/*! \brief get list with all available palettes */
static int getPalettesCount ( ) ;
/*! \brief get QIcon representing the given palette */
static QIcon getPaletteIcon ( int i ) ;
/*! \brief get QIcon representing the given palette */
static QIcon getPaletteIcon ( JKQTPMathImageColorPalette palette ) ;
2018-11-29 06:10:14 +08:00
/*! \brief get QImage representing the given palette */
2015-08-05 20:27:09 +08:00
static QImage getPaletteImage ( int i , int width , int height = 1 ) ;
2018-11-29 06:10:14 +08:00
/*! \brief get QImage representing the given palette */
2015-08-05 20:27:09 +08:00
static QImage getPaletteImage ( JKQTPMathImageColorPalette palette , int width , int height = 1 ) ;
2015-07-11 18:56:02 +08:00
/*! \brief get QIcon representing the given palette */
static QIcon getPaletteKeyIcon ( int i ) ;
/*! \brief get QIcon representing the given palette */
static QIcon getPaletteKeyIcon ( JKQTPMathImageColorPalette palette ) ;
2018-11-29 06:10:14 +08:00
/*! \brief get QImage representing the given palette */
2015-07-11 18:56:02 +08:00
static QImage getPaletteKeyImage ( int i , int width , int height ) ;
2018-11-29 06:10:14 +08:00
/*! \brief get QImage representing the given palette */
2015-07-11 18:56:02 +08:00
static QImage getPaletteKeyImage ( JKQTPMathImageColorPalette palette , int width , int height ) ;
2019-01-26 20:00:40 +08:00
/*! \brief sets the property palette ( \copybrief palette ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter palette is : < BLOCKQUOTE > \ copydoc palette < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see palette for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setPalette ( const JKQTPMathImageColorPalette & __value )
2019-01-10 04:23:24 +08:00
{
this - > palette = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property palette ( \copybrief palette ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter palette is : < BLOCKQUOTE > \ copydoc palette < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see palette for more information */
2019-01-26 20:00:40 +08:00
inline virtual JKQTPMathImageColorPalette getPalette ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > palette ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property rangeMinFailAction ( \copybrief rangeMinFailAction ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter rangeMinFailAction is : < BLOCKQUOTE > \ copydoc rangeMinFailAction < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see rangeMinFailAction for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setRangeMinFailAction ( const JKQTPMathImageColorRangeFailAction & __value )
2019-01-10 04:23:24 +08:00
{
this - > rangeMinFailAction = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property rangeMinFailAction ( \copybrief rangeMinFailAction ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter rangeMinFailAction is : < BLOCKQUOTE > \ copydoc rangeMinFailAction < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see rangeMinFailAction for more information */
2019-01-26 20:00:40 +08:00
inline virtual JKQTPMathImageColorRangeFailAction getActionRangeMinFail ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > rangeMinFailAction ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property rangeMaxFailAction ( \copybrief rangeMaxFailAction ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter rangeMaxFailAction is : < BLOCKQUOTE > \ copydoc rangeMaxFailAction < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see rangeMaxFailAction for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setRangeMaxFailAction ( const JKQTPMathImageColorRangeFailAction & __value )
2019-01-10 04:23:24 +08:00
{
this - > rangeMaxFailAction = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property rangeMaxFailAction ( \copybrief rangeMaxFailAction ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter rangeMaxFailAction is : < BLOCKQUOTE > \ copydoc rangeMaxFailAction < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see rangeMaxFailAction for more information */
2019-01-26 20:00:40 +08:00
inline virtual JKQTPMathImageColorRangeFailAction getActionRangeMaxFail ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > rangeMaxFailAction ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property rangeMinFailColor ( \copybrief rangeMinFailColor ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter rangeMinFailColor is : < BLOCKQUOTE > \ copydoc rangeMinFailColor < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see rangeMinFailColor for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setRangeMinFailColor ( const QColor & __value )
2019-01-10 04:23:24 +08:00
{
this - > rangeMinFailColor = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property rangeMinFailColor ( \copybrief rangeMinFailColor ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter rangeMinFailColor is : < BLOCKQUOTE > \ copydoc rangeMinFailColor < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see rangeMinFailColor for more information */
2019-01-26 20:00:40 +08:00
inline virtual QColor getRangeMinFailColor ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > rangeMinFailColor ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property rangeMaxFailColor ( \copybrief rangeMaxFailColor ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter rangeMaxFailColor is : < BLOCKQUOTE > \ copydoc rangeMaxFailColor < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see rangeMaxFailColor for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setRangeMaxFailColor ( const QColor & __value )
2019-01-10 04:23:24 +08:00
{
this - > rangeMaxFailColor = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property rangeMaxFailColor ( \copybrief rangeMaxFailColor ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter rangeMaxFailColor is : < BLOCKQUOTE > \ copydoc rangeMaxFailColor < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see rangeMaxFailColor for more information */
2019-01-26 20:00:40 +08:00
inline virtual QColor getRangeMaxFailColor ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > rangeMaxFailColor ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property nanColor ( \copybrief nanColor ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter nanColor is : < BLOCKQUOTE > \ copydoc nanColor < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see nanColor for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setNanColor ( const QColor & __value )
2019-01-10 04:23:24 +08:00
{
this - > nanColor = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property nanColor ( \copybrief nanColor ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter nanColor is : < BLOCKQUOTE > \ copydoc nanColor < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see nanColor for more information */
2019-01-26 20:00:40 +08:00
inline virtual QColor getNanColor ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > nanColor ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property infColor ( \copybrief infColor ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter infColor is : < BLOCKQUOTE > \ copydoc infColor < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see infColor for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setInfColor ( const QColor & __value )
2019-01-10 04:23:24 +08:00
{
this - > infColor = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property infColor ( \copybrief infColor ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter infColor is : < BLOCKQUOTE > \ copydoc infColor < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see infColor for more information */
2019-01-26 20:00:40 +08:00
inline virtual QColor getInfColor ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > infColor ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property showColorBar ( \copybrief showColorBar ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter showColorBar is : < BLOCKQUOTE > \ copydoc showColorBar < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see showColorBar for more information */
2019-01-26 03:16:04 +08:00
inline virtual void setShowColorBar ( bool __value )
2019-01-10 04:23:24 +08:00
{
this - > showColorBar = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property showColorBar ( \copybrief showColorBar ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter showColorBar is : < BLOCKQUOTE > \ copydoc showColorBar < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see showColorBar for more information */
2019-01-26 03:16:04 +08:00
inline virtual bool getShowColorBar ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > showColorBar ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property colorBarWidth ( \copybrief colorBarWidth ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter colorBarWidth is : < BLOCKQUOTE > \ copydoc colorBarWidth < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see colorBarWidth for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setColorBarWidth ( int __value )
2019-01-10 04:23:24 +08:00
{
this - > colorBarWidth = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property colorBarWidth ( \copybrief colorBarWidth ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter colorBarWidth is : < BLOCKQUOTE > \ copydoc colorBarWidth < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see colorBarWidth for more information */
2019-01-26 20:00:40 +08:00
inline virtual int getColorBarWidth ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > colorBarWidth ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property colorBarModifiedWidth ( \copybrief colorBarModifiedWidth ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter colorBarModifiedWidth is : < BLOCKQUOTE > \ copydoc colorBarModifiedWidth < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see colorBarModifiedWidth for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setColorBarModifiedWidth ( int __value )
2019-01-10 04:23:24 +08:00
{
this - > colorBarModifiedWidth = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property colorBarModifiedWidth ( \copybrief colorBarModifiedWidth ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter colorBarModifiedWidth is : < BLOCKQUOTE > \ copydoc colorBarModifiedWidth < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see colorBarModifiedWidth for more information */
2019-01-26 20:00:40 +08:00
inline virtual int getColorBarModifiedWidth ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > colorBarModifiedWidth ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property colorBarOffset ( \copybrief colorBarOffset ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter colorBarOffset is : < BLOCKQUOTE > \ copydoc colorBarOffset < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see colorBarOffset for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setColorBarOffset ( int __value )
2019-01-10 04:23:24 +08:00
{
this - > colorBarOffset = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property colorBarOffset ( \copybrief colorBarOffset ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter colorBarOffset is : < BLOCKQUOTE > \ copydoc colorBarOffset < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see colorBarOffset for more information */
2019-01-26 20:00:40 +08:00
inline virtual int getColorBarOffset ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > colorBarOffset ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property colorBarRelativeHeight ( \copybrief colorBarRelativeHeight ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter colorBarRelativeHeight is : < BLOCKQUOTE > \ copydoc colorBarRelativeHeight < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see colorBarRelativeHeight for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setColorBarRelativeHeight ( double __value )
2019-01-10 04:23:24 +08:00
{
this - > colorBarRelativeHeight = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property colorBarRelativeHeight ( \copybrief colorBarRelativeHeight ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter colorBarRelativeHeight is : < BLOCKQUOTE > \ copydoc colorBarRelativeHeight < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see colorBarRelativeHeight for more information */
2019-01-26 20:00:40 +08:00
inline virtual double getColorBarRelativeHeight ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > colorBarRelativeHeight ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property imageMin ( \copybrief imageMin ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageMin is : < BLOCKQUOTE > \ copydoc imageMin < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageMin for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setImageMin ( double __value )
2019-01-10 04:23:24 +08:00
{
this - > imageMin = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property imageMin ( \copybrief imageMin ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageMin is : < BLOCKQUOTE > \ copydoc imageMin < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageMin for more information */
2019-01-26 20:00:40 +08:00
inline virtual double getImageMin ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > imageMin ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property imageMax ( \copybrief imageMax ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageMax is : < BLOCKQUOTE > \ copydoc imageMax < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageMax for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setImageMax ( double __value )
2019-01-10 04:23:24 +08:00
{
this - > imageMax = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property imageMax ( \copybrief imageMax ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageMax is : < BLOCKQUOTE > \ copydoc imageMax < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageMax for more information */
2019-01-26 20:00:40 +08:00
inline virtual double getImageMax ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > imageMax ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property autoImageRange ( \copybrief autoImageRange ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter autoImageRange is : < BLOCKQUOTE > \ copydoc autoImageRange < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see autoImageRange for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setAutoImageRange ( bool __value )
2019-01-10 04:23:24 +08:00
{
this - > autoImageRange = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property autoImageRange ( \copybrief autoImageRange ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter autoImageRange is : < BLOCKQUOTE > \ copydoc autoImageRange < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see autoImageRange for more information */
2019-01-26 20:00:40 +08:00
inline virtual bool getAutoImageRange ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > autoImageRange ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property imageName ( \copybrief imageName ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageName is : < BLOCKQUOTE > \ copydoc imageName < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageName for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setImageName ( const QString & __value )
2019-01-10 04:23:24 +08:00
{
this - > imageName = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property imageName ( \copybrief imageName ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageName is : < BLOCKQUOTE > \ copydoc imageName < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageName for more information */
2019-01-26 20:00:40 +08:00
inline virtual QString getImageName ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > imageName ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property imageNameFontName ( \copybrief imageNameFontName ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageNameFontName is : < BLOCKQUOTE > \ copydoc imageNameFontName < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageNameFontName for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setImageNameFontName ( const QString & __value )
2019-01-10 04:23:24 +08:00
{
this - > imageNameFontName = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property imageNameFontName ( \copybrief imageNameFontName ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageNameFontName is : < BLOCKQUOTE > \ copydoc imageNameFontName < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageNameFontName for more information */
2019-01-26 20:00:40 +08:00
inline virtual QString getImageNameFontName ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > imageNameFontName ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property imageNameFontSize ( \copybrief imageNameFontSize ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageNameFontSize is : < BLOCKQUOTE > \ copydoc imageNameFontSize < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageNameFontSize for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setImageNameFontSize ( double __value )
2019-01-10 04:23:24 +08:00
{
this - > imageNameFontSize = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property imageNameFontSize ( \copybrief imageNameFontSize ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageNameFontSize is : < BLOCKQUOTE > \ copydoc imageNameFontSize < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageNameFontSize for more information */
2019-01-26 20:00:40 +08:00
inline virtual double getImageNameFontSize ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > imageNameFontSize ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property colorBarRightAxis ( \copybrief colorBarRightAxis ). \details Description of the parameter colorBarRightAxis is: <BLOCKQUOTE>\copydoc colorBarRightAxis </BLOCKQUOTE>. \see colorBarRightAxis for more information */
inline JKQTPVerticalIndependentAxis * getColorBarRightAxis ( ) const { return this - > colorBarRightAxis ; }
/*! \brief returns the property colorBarTopAxis ( \copybrief colorBarTopAxis ). \details Description of the parameter colorBarTopAxis is: <BLOCKQUOTE>\copydoc colorBarTopAxis </BLOCKQUOTE>. \see colorBarTopAxis for more information */
inline JKQTPHorizontalIndependentAxis * getColorBarTopAxis ( ) const { return this - > colorBarTopAxis ; }
/*! \brief returns the property modifierColorBarTopAxis ( \copybrief modifierColorBarTopAxis ). \details Description of the parameter modifierColorBarTopAxis is: <BLOCKQUOTE>\copydoc modifierColorBarTopAxis </BLOCKQUOTE>. \see modifierColorBarTopAxis for more information */
inline JKQTPVerticalIndependentAxis * getModifierColorBarTopAxis ( ) const { return this - > modifierColorBarTopAxis ; }
/*! \brief returns the property modifierColorBarRightAxis ( \copybrief modifierColorBarRightAxis ). \details Description of the parameter modifierColorBarRightAxis is: <BLOCKQUOTE>\copydoc modifierColorBarRightAxis </BLOCKQUOTE>. \see modifierColorBarRightAxis for more information */
inline JKQTPHorizontalIndependentAxis * getModifierColorBarRightAxis ( ) const { return this - > modifierColorBarRightAxis ; }
/*! \brief sets the property colorBarTopVisible ( \copybrief colorBarTopVisible ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter colorBarTopVisible is : < BLOCKQUOTE > \ copydoc colorBarTopVisible < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see colorBarTopVisible for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setColorBarTopVisible ( bool __value )
2019-01-10 04:23:24 +08:00
{
this - > colorBarTopVisible = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property colorBarTopVisible ( \copybrief colorBarTopVisible ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter colorBarTopVisible is : < BLOCKQUOTE > \ copydoc colorBarTopVisible < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see colorBarTopVisible for more information */
2019-01-26 20:00:40 +08:00
inline virtual bool getColorBarTopVisible ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > colorBarTopVisible ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property colorBarRightVisible ( \copybrief colorBarRightVisible ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter colorBarRightVisible is : < BLOCKQUOTE > \ copydoc colorBarRightVisible < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see colorBarRightVisible for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setColorBarRightVisible ( bool __value )
2019-01-10 04:23:24 +08:00
{
this - > colorBarRightVisible = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property colorBarRightVisible ( \copybrief colorBarRightVisible ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter colorBarRightVisible is : < BLOCKQUOTE > \ copydoc colorBarRightVisible < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see colorBarRightVisible for more information */
2019-01-26 20:00:40 +08:00
inline virtual bool getColorBarRightVisible ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > colorBarRightVisible ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property autoModifierRange ( \copybrief autoModifierRange ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter autoModifierRange is : < BLOCKQUOTE > \ copydoc autoModifierRange < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see autoModifierRange for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setAutoModifierRange ( bool __value )
2019-01-10 04:23:24 +08:00
{
this - > autoModifierRange = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property autoModifierRange ( \copybrief autoModifierRange ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter autoModifierRange is : < BLOCKQUOTE > \ copydoc autoModifierRange < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see autoModifierRange for more information */
2019-01-26 20:00:40 +08:00
inline virtual bool getAutoModifierRange ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > autoModifierRange ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property modifierMin ( \copybrief modifierMin ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter modifierMin is : < BLOCKQUOTE > \ copydoc modifierMin < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see modifierMin for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setModifierMin ( double __value )
2019-01-10 04:23:24 +08:00
{
this - > modifierMin = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property modifierMin ( \copybrief modifierMin ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter modifierMin is : < BLOCKQUOTE > \ copydoc modifierMin < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see modifierMin for more information */
2019-01-26 20:00:40 +08:00
inline virtual double getModifierMin ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > modifierMin ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property modifierMax ( \copybrief modifierMax ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter modifierMax is : < BLOCKQUOTE > \ copydoc modifierMax < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see modifierMax for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setModifierMax ( double __value )
2019-01-10 04:23:24 +08:00
{
this - > modifierMax = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property modifierMax ( \copybrief modifierMax ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter modifierMax is : < BLOCKQUOTE > \ copydoc modifierMax < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see modifierMax for more information */
2019-01-26 20:00:40 +08:00
inline virtual double getModifierMax ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > modifierMax ;
}
2015-07-11 18:56:02 +08:00
2019-01-26 20:00:40 +08:00
void setPalette ( int pal ) ;
2015-07-11 18:56:02 +08:00
/*! \brief if the graph plots outside the actual plot field of view (e.g. color bars, scale bars, ...)
\ note If you want to draw outside , then you ' ll also have to implement drawOutside ( )
*/
2018-12-28 05:52:00 +08:00
virtual void getOutsideSize ( JKQTPEnhancedPainter & painter , int & leftSpace , int & rightSpace , int & topSpace , int & bottomSpace ) override ;
2015-07-11 18:56:02 +08:00
/*! \brief plots outside the actual plot field of view (e.g. color bars, scale bars, ...)
\ note If you want to draw outside , then you ' ll also have to implement getOutsideSize ( ) , so enough space is reserved
The four value supplied tell the method where to draw ( inside one of the rectangles ) .
*/
2018-12-28 05:52:00 +08:00
virtual void drawOutside ( JKQTPEnhancedPainter & painter , QRect leftSpace , QRect rightSpace , QRect topSpace , QRect bottomSpace ) override ;
2015-07-11 18:56:02 +08:00
2015-08-05 20:27:09 +08:00
/*! \brief returns a QImage, which contains the plaette drawn outside the plot. \a steps is the number of data-setps (and the size of the output image) used for the palette image. */
2019-01-26 20:00:40 +08:00
virtual QImage drawOutsidePalette ( uint8_t steps = 200 ) ;
2015-08-05 20:27:09 +08:00
2015-07-11 18:56:02 +08:00
/*! \brief return the plotted image only as a QImage */
virtual QImage drawImage ( ) ;
/** \brief determine min/max data value of the image */
2018-12-28 05:52:00 +08:00
virtual void getDataMinMax ( double & imin , double & imax ) override ;
2015-07-11 18:56:02 +08:00
/** \brief determine min/max data value of the image */
2018-12-28 05:52:00 +08:00
virtual void getModifierMinMax ( double & imin , double & imax ) override ;
2015-07-11 18:56:02 +08:00
/** \brief return the value (raw data!) of the contained image at the given coordinate */
double getValueAt ( double x , double y ) ;
/** \brief plots a key marker inside the specified rectangle \a rect */
2018-12-28 05:52:00 +08:00
virtual void drawKeyMarker ( JKQTPEnhancedPainter & painter , QRectF & rect ) override ;
2015-07-11 18:56:02 +08:00
protected :
2015-08-02 19:36:54 +08:00
void initJKQTPMathImage ( ) ;
2015-07-11 18:56:02 +08:00
/** \brief top color bar visible */
bool colorBarTopVisible ;
/** \brief right color bar visible */
bool colorBarRightVisible ;
/** \brief name of the image displayed above color bar (may contain LaTeX markup!) */
QString imageName ;
/** \brief font name when displaying imageName */
QString imageNameFontName ;
/** \brief font size in points when displaying imageName */
double imageNameFontSize ;
/** \brief palette for plotting an image */
JKQTPMathImageColorPalette palette ;
/** \brief indicate whether to display a color bar */
bool showColorBar ;
/** \brief width of the color bar */
int colorBarWidth ;
/** \brief width of the color bar when modifier is on */
int colorBarModifiedWidth ;
/** \brief height of the color bar, as multiple of plotHeight */
double colorBarRelativeHeight ;
/** \brief indicates whether to estimate min/max of the image automatically */
bool autoImageRange ;
/** \brief image value range minimum */
double imageMin ;
/** \brief image value range maximum */
double imageMax ;
/** \brief indicates whether to estimate min/max of the modifier automatically */
bool autoModifierRange ;
/** \brief modifier value range minimum */
double modifierMin ;
/** \brief modifier value range maximum */
double modifierMax ;
/** \brief offset between outside space border and color bar */
int colorBarOffset ;
/** \brief which action to take if a color is below \a imageMin and \a autoImageRange \c ==false */
JKQTPMathImageColorRangeFailAction rangeMinFailAction ;
/** \brief which action to take if a color is above \a imageMax and \a autoImageRange \c ==false */
JKQTPMathImageColorRangeFailAction rangeMaxFailAction ;
/** \brief color to use for some settings of \a rangeMinFailAction */
QColor rangeMinFailColor ;
/** \brief color to use for some settings of \a rangeMaxFailAction */
QColor rangeMaxFailColor ;
/** \brief color to use for a not-a-number value */
QColor nanColor ;
/** \brief color to use for an infinity value */
QColor infColor ;
/** \brief object used for color bar axes
*
* \ note this axis has some kind of a special role . It is used to format color bar axes
*/
2019-01-20 17:49:29 +08:00
JKQTPVerticalIndependentAxis * colorBarRightAxis ;
JKQTPHorizontalIndependentAxis * colorBarTopAxis ;
JKQTPVerticalIndependentAxis * modifierColorBarTopAxis ;
JKQTPHorizontalIndependentAxis * modifierColorBarRightAxis ;
2015-07-11 18:56:02 +08:00
protected :
QAction * actSaveImage ;
QAction * actCopyImage ;
2015-08-05 20:27:09 +08:00
QAction * actSavePalette ;
QAction * actCopyPalette ;
2015-07-11 18:56:02 +08:00
public :
2019-01-26 20:00:40 +08:00
virtual void setTitle ( const QString & title ) override ;
2015-07-11 18:56:02 +08:00
public slots :
void saveImagePlotAsImage ( const QString & filename = QString ( " " ) , const QByteArray & outputFormat = QByteArray ( ) ) ;
void copyImagePlotAsImage ( ) ;
2015-08-05 20:27:09 +08:00
void saveColorbarPlotAsImage ( const QString & filename = QString ( " " ) , const QByteArray & outputFormat = QByteArray ( ) ) ;
void copyColorbarPlotAsImage ( ) ;
2015-07-11 18:56:02 +08:00
} ;
/*! \brief class to plot an image from an 2-dimensional array of values
2019-01-13 01:53:16 +08:00
\ ingroup jkqtplotter_imagelots_elements
2015-07-11 18:56:02 +08:00
2019-01-13 01:53:16 +08:00
\ image html jkqtplotter_simpletest_rgbimageplot_opencv . png
2015-07-11 18:56:02 +08:00
*/
class LIB_EXPORT JKQTPRGBMathImage : public JKQTPMathImageBase {
Q_OBJECT
public :
2019-01-26 20:00:40 +08:00
using JKQTPMathImageBase : : setData ;
2015-07-11 18:56:02 +08:00
/** \brief class constructor */
2019-01-26 19:28:44 +08:00
JKQTPRGBMathImage ( double x , double y , double width , double height , DataType datatype , void * data , int Nx , int Ny , JKQTBasePlotter * parent = nullptr ) ;
2015-07-11 18:56:02 +08:00
2015-08-02 19:36:54 +08:00
/** \brief class constructor */
2019-01-26 19:28:44 +08:00
JKQTPRGBMathImage ( double x , double y , double width , double height , DataType datatype , void * data , int Nx , int Ny , JKQTPlotter * parent ) ;
2015-08-02 19:36:54 +08:00
/** \brief class constructor */
2019-01-20 17:49:29 +08:00
JKQTPRGBMathImage ( JKQTBasePlotter * parent = nullptr ) ;
2015-08-02 19:36:54 +08:00
/** \brief class constructor */
2019-01-20 23:15:10 +08:00
JKQTPRGBMathImage ( JKQTPlotter * parent ) ;
2015-08-02 19:36:54 +08:00
2015-07-11 18:56:02 +08:00
/** \brief plots the graph to the plotter object specified as parent */
2018-12-28 05:52:00 +08:00
virtual void draw ( JKQTPEnhancedPainter & painter ) override ;
2015-07-11 18:56:02 +08:00
2019-01-20 17:49:29 +08:00
virtual void setParent ( JKQTBasePlotter * parent ) override ;
2015-07-11 18:56:02 +08:00
2019-01-26 20:00:40 +08:00
virtual void setData ( void * data , void * dataG , void * dataB , int Nx , int Ny , DataType datatype ) ;
virtual void setData ( void * data , void * dataG , void * dataB , int Nx , int Ny ) ;
2015-07-11 18:56:02 +08:00
2019-01-26 20:00:40 +08:00
virtual void setData ( void * data , int Nx , int Ny , DataType datatype ) override ;
virtual void setData ( void * data , int Nx , int Ny ) override ;
2015-07-11 18:56:02 +08:00
/** \brief determine min/max data value of the image */
2018-12-28 05:52:00 +08:00
virtual void getDataMinMax ( double & imin , double & imax ) override ;
2015-07-11 18:56:02 +08:00
2019-01-26 20:00:40 +08:00
/*! \brief sets the property dataG ( \copybrief dataG ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter dataG is : < BLOCKQUOTE > \ copydoc dataG < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see dataG for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setDataG ( void * __value )
2019-01-10 04:23:24 +08:00
{
this - > dataG = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property dataG ( \copybrief dataG ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter dataG is : < BLOCKQUOTE > \ copydoc dataG < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see dataG for more information */
2019-01-26 20:00:40 +08:00
inline virtual void * getDataG ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > dataG ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property datatypeG ( \copybrief datatypeG ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter datatypeG is : < BLOCKQUOTE > \ copydoc datatypeG < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see datatypeG for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setDatatypeG ( const DataType & __value )
2019-01-10 04:23:24 +08:00
{
this - > datatypeG = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property datatypeG ( \copybrief datatypeG ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter datatypeG is : < BLOCKQUOTE > \ copydoc datatypeG < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see datatypeG for more information */
2019-01-26 20:00:40 +08:00
inline virtual DataType getDatatypeG ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > datatypeG ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property dataB ( \copybrief dataB ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter dataB is : < BLOCKQUOTE > \ copydoc dataB < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see dataB for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setDataB ( void * __value )
2019-01-10 04:23:24 +08:00
{
this - > dataB = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property dataB ( \copybrief dataB ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter dataB is : < BLOCKQUOTE > \ copydoc dataB < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see dataB for more information */
2019-01-26 20:00:40 +08:00
inline virtual void * getDataB ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > dataB ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property datatypeB ( \copybrief datatypeB ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter datatypeB is : < BLOCKQUOTE > \ copydoc datatypeB < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see datatypeB for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setDatatypeB ( const DataType & __value )
2019-01-10 04:23:24 +08:00
{
this - > datatypeB = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property datatypeB ( \copybrief datatypeB ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter datatypeB is : < BLOCKQUOTE > \ copydoc datatypeB < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see datatypeB for more information */
2019-01-26 20:00:40 +08:00
inline virtual DataType getDatatypeB ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > datatypeB ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property showColorBar ( \copybrief showColorBar ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter showColorBar is : < BLOCKQUOTE > \ copydoc showColorBar < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see showColorBar for more information */
2019-01-26 03:16:04 +08:00
inline virtual void setShowColorBar ( bool __value )
2019-01-10 04:23:24 +08:00
{
this - > showColorBar = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property showColorBar ( \copybrief showColorBar ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter showColorBar is : < BLOCKQUOTE > \ copydoc showColorBar < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see showColorBar for more information */
2019-01-26 03:16:04 +08:00
inline virtual bool getShowColorBar ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > showColorBar ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property colorBarWidth ( \copybrief colorBarWidth ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter colorBarWidth is : < BLOCKQUOTE > \ copydoc colorBarWidth < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see colorBarWidth for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setColorBarWidth ( int __value )
2019-01-10 04:23:24 +08:00
{
this - > colorBarWidth = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property colorBarWidth ( \copybrief colorBarWidth ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter colorBarWidth is : < BLOCKQUOTE > \ copydoc colorBarWidth < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see colorBarWidth for more information */
2019-01-26 20:00:40 +08:00
inline virtual int getColorBarWidth ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > colorBarWidth ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property colorBarOffset ( \copybrief colorBarOffset ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter colorBarOffset is : < BLOCKQUOTE > \ copydoc colorBarOffset < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see colorBarOffset for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setColorBarOffset ( int __value )
2019-01-10 04:23:24 +08:00
{
this - > colorBarOffset = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property colorBarOffset ( \copybrief colorBarOffset ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter colorBarOffset is : < BLOCKQUOTE > \ copydoc colorBarOffset < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see colorBarOffset for more information */
2019-01-26 20:00:40 +08:00
inline virtual int getColorBarOffset ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > colorBarOffset ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property colorBarRelativeHeight ( \copybrief colorBarRelativeHeight ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter colorBarRelativeHeight is : < BLOCKQUOTE > \ copydoc colorBarRelativeHeight < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see colorBarRelativeHeight for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setColorBarRelativeHeight ( double __value )
2019-01-10 04:23:24 +08:00
{
this - > colorBarRelativeHeight = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property colorBarRelativeHeight ( \copybrief colorBarRelativeHeight ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter colorBarRelativeHeight is : < BLOCKQUOTE > \ copydoc colorBarRelativeHeight < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see colorBarRelativeHeight for more information */
2019-01-26 20:00:40 +08:00
inline virtual double getColorBarRelativeHeight ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > colorBarRelativeHeight ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property imageMin ( \copybrief imageMin ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageMin is : < BLOCKQUOTE > \ copydoc imageMin < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageMin for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setImageMin ( double __value )
2019-01-10 04:23:24 +08:00
{
this - > imageMin = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property imageMin ( \copybrief imageMin ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageMin is : < BLOCKQUOTE > \ copydoc imageMin < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageMin for more information */
2019-01-26 20:00:40 +08:00
inline virtual double getImageMin ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > imageMin ;
}
2019-01-26 20:00:40 +08:00
inline void setImageMinR ( double m ) {
setImageMin ( m ) ;
2018-11-28 05:49:27 +08:00
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property imageMax ( \copybrief imageMax ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageMax is : < BLOCKQUOTE > \ copydoc imageMax < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageMax for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setImageMax ( double __value )
2019-01-10 04:23:24 +08:00
{
this - > imageMax = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property imageMax ( \copybrief imageMax ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageMax is : < BLOCKQUOTE > \ copydoc imageMax < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageMax for more information */
2019-01-26 20:00:40 +08:00
inline virtual double getImageMax ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > imageMax ;
}
2019-01-26 20:00:40 +08:00
inline void setImageMaxR ( double m ) {
setImageMax ( m ) ;
2018-11-28 05:49:27 +08:00
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property imageMinG ( \copybrief imageMinG ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageMinG is : < BLOCKQUOTE > \ copydoc imageMinG < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageMinG for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setImageMinG ( double __value )
2019-01-10 04:23:24 +08:00
{
this - > imageMinG = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property imageMinG ( \copybrief imageMinG ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageMinG is : < BLOCKQUOTE > \ copydoc imageMinG < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageMinG for more information */
2019-01-26 20:00:40 +08:00
inline virtual double getImageMinG ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > imageMinG ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property imageMaxG ( \copybrief imageMaxG ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageMaxG is : < BLOCKQUOTE > \ copydoc imageMaxG < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageMaxG for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setImageMaxG ( double __value )
2019-01-10 04:23:24 +08:00
{
this - > imageMaxG = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property imageMaxG ( \copybrief imageMaxG ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageMaxG is : < BLOCKQUOTE > \ copydoc imageMaxG < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageMaxG for more information */
2019-01-26 20:00:40 +08:00
inline virtual double getImageMaxG ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > imageMaxG ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property imageMinB ( \copybrief imageMinB ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageMinB is : < BLOCKQUOTE > \ copydoc imageMinB < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageMinB for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setImageMinB ( double __value )
2019-01-10 04:23:24 +08:00
{
this - > imageMinB = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property imageMinB ( \copybrief imageMinB ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageMinB is : < BLOCKQUOTE > \ copydoc imageMinB < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageMinB for more information */
2019-01-26 20:00:40 +08:00
inline virtual double getImageMinB ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > imageMinB ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property imageMaxB ( \copybrief imageMaxB ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageMaxB is : < BLOCKQUOTE > \ copydoc imageMaxB < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageMaxB for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setImageMaxB ( double __value )
2019-01-10 04:23:24 +08:00
{
this - > imageMaxB = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property imageMaxB ( \copybrief imageMaxB ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageMaxB is : < BLOCKQUOTE > \ copydoc imageMaxB < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageMaxB for more information */
2019-01-26 20:00:40 +08:00
inline virtual double getImageMaxB ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > imageMaxB ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property autoImageRange ( \copybrief autoImageRange ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter autoImageRange is : < BLOCKQUOTE > \ copydoc autoImageRange < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see autoImageRange for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setAutoImageRange ( bool __value )
2019-01-10 04:23:24 +08:00
{
this - > autoImageRange = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property autoImageRange ( \copybrief autoImageRange ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter autoImageRange is : < BLOCKQUOTE > \ copydoc autoImageRange < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see autoImageRange for more information */
2019-01-26 20:00:40 +08:00
inline virtual bool getAutoImageRange ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > autoImageRange ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property imageName ( \copybrief imageName ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageName is : < BLOCKQUOTE > \ copydoc imageName < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageName for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setImageName ( const QString & __value )
2019-01-10 04:23:24 +08:00
{
this - > imageName = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property imageName ( \copybrief imageName ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageName is : < BLOCKQUOTE > \ copydoc imageName < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageName for more information */
2019-01-26 20:00:40 +08:00
inline virtual QString getImageName ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > imageName ;
}
2019-01-26 20:00:40 +08:00
inline void setImageNameR ( const QString & m ) {
setImageName ( m ) ;
2018-11-28 05:49:27 +08:00
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property imageNameG ( \copybrief imageNameG ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageNameG is : < BLOCKQUOTE > \ copydoc imageNameG < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageNameG for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setImageNameG ( const QString & __value )
2019-01-10 04:23:24 +08:00
{
this - > imageNameG = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property imageNameG ( \copybrief imageNameG ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageNameG is : < BLOCKQUOTE > \ copydoc imageNameG < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageNameG for more information */
2019-01-26 20:00:40 +08:00
inline virtual QString getImageNameG ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > imageNameG ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property imageNameB ( \copybrief imageNameB ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageNameB is : < BLOCKQUOTE > \ copydoc imageNameB < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageNameB for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setImageNameB ( const QString & __value )
2019-01-10 04:23:24 +08:00
{
this - > imageNameB = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property imageNameB ( \copybrief imageNameB ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageNameB is : < BLOCKQUOTE > \ copydoc imageNameB < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageNameB for more information */
2019-01-26 20:00:40 +08:00
inline virtual QString getImageNameB ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > imageNameB ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property imageNameFontName ( \copybrief imageNameFontName ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageNameFontName is : < BLOCKQUOTE > \ copydoc imageNameFontName < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageNameFontName for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setImageNameFontName ( const QString & __value )
2019-01-10 04:23:24 +08:00
{
this - > imageNameFontName = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property imageNameFontName ( \copybrief imageNameFontName ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageNameFontName is : < BLOCKQUOTE > \ copydoc imageNameFontName < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageNameFontName for more information */
2019-01-26 20:00:40 +08:00
inline virtual QString getImageNameFontName ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > imageNameFontName ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property imageNameFontSize ( \copybrief imageNameFontSize ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageNameFontSize is : < BLOCKQUOTE > \ copydoc imageNameFontSize < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageNameFontSize for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setImageNameFontSize ( double __value )
2019-01-10 04:23:24 +08:00
{
this - > imageNameFontSize = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property imageNameFontSize ( \copybrief imageNameFontSize ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageNameFontSize is : < BLOCKQUOTE > \ copydoc imageNameFontSize < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageNameFontSize for more information */
2019-01-26 20:00:40 +08:00
inline virtual double getImageNameFontSize ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > imageNameFontSize ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property colorBarRightAxis ( \copybrief colorBarRightAxis ). \details Description of the parameter colorBarRightAxis is: <BLOCKQUOTE>\copydoc colorBarRightAxis </BLOCKQUOTE>. \see colorBarRightAxis for more information */
inline JKQTPVerticalIndependentAxis * getColorBarRightAxis ( ) const { return this - > colorBarRightAxis ; }
/*! \brief returns the property colorBarTopAxis ( \copybrief colorBarTopAxis ). \details Description of the parameter colorBarTopAxis is: <BLOCKQUOTE>\copydoc colorBarTopAxis </BLOCKQUOTE>. \see colorBarTopAxis for more information */
inline JKQTPHorizontalIndependentAxis * getColorBarTopAxis ( ) const { return this - > colorBarTopAxis ; }
/*! \brief returns the property colorBarRightAxisG ( \copybrief colorBarRightAxisG ). \details Description of the parameter colorBarRightAxisG is: <BLOCKQUOTE>\copydoc colorBarRightAxisG </BLOCKQUOTE>. \see colorBarRightAxisG for more information */
inline JKQTPVerticalIndependentAxis * getColorBarRightAxisG ( ) const { return this - > colorBarRightAxisG ; }
/*! \brief returns the property colorBarTopAxisG ( \copybrief colorBarTopAxisG ). \details Description of the parameter colorBarTopAxisG is: <BLOCKQUOTE>\copydoc colorBarTopAxisG </BLOCKQUOTE>. \see colorBarTopAxisG for more information */
inline JKQTPHorizontalIndependentAxis * getColorBarTopAxisG ( ) const { return this - > colorBarTopAxisG ; }
/*! \brief returns the property colorBarRightAxisB ( \copybrief colorBarRightAxisB ). \details Description of the parameter colorBarRightAxisB is: <BLOCKQUOTE>\copydoc colorBarRightAxisB </BLOCKQUOTE>. \see colorBarRightAxisB for more information */
inline JKQTPVerticalIndependentAxis * getColorBarRightAxisB ( ) const { return this - > colorBarRightAxisB ; }
/*! \brief returns the property colorBarTopAxisB ( \copybrief colorBarTopAxisB ). \details Description of the parameter colorBarTopAxisB is: <BLOCKQUOTE>\copydoc colorBarTopAxisB </BLOCKQUOTE>. \see colorBarTopAxisB for more information */
inline JKQTPHorizontalIndependentAxis * getColorBarTopAxisB ( ) const { return this - > colorBarTopAxisB ; }
/*! \brief sets the property colorBarTopVisible ( \copybrief colorBarTopVisible ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter colorBarTopVisible is : < BLOCKQUOTE > \ copydoc colorBarTopVisible < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see colorBarTopVisible for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setColorBarTopVisible ( bool __value )
2019-01-10 04:23:24 +08:00
{
this - > colorBarTopVisible = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property colorBarTopVisible ( \copybrief colorBarTopVisible ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter colorBarTopVisible is : < BLOCKQUOTE > \ copydoc colorBarTopVisible < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see colorBarTopVisible for more information */
2019-01-26 20:00:40 +08:00
inline virtual bool getColorBarTopVisible ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > colorBarTopVisible ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property colorBarRightVisible ( \copybrief colorBarRightVisible ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter colorBarRightVisible is : < BLOCKQUOTE > \ copydoc colorBarRightVisible < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see colorBarRightVisible for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setColorBarRightVisible ( bool __value )
2019-01-10 04:23:24 +08:00
{
this - > colorBarRightVisible = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property colorBarRightVisible ( \copybrief colorBarRightVisible ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter colorBarRightVisible is : < BLOCKQUOTE > \ copydoc colorBarRightVisible < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see colorBarRightVisible for more information */
2019-01-26 20:00:40 +08:00
inline virtual bool getColorBarRightVisible ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > colorBarRightVisible ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property colorbarsSideBySide ( \copybrief colorbarsSideBySide ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter colorbarsSideBySide is : < BLOCKQUOTE > \ copydoc colorbarsSideBySide < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see colorbarsSideBySide for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setColorbarsSideBySide ( bool __value )
2019-01-10 04:23:24 +08:00
{
this - > colorbarsSideBySide = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property colorbarsSideBySide ( \copybrief colorbarsSideBySide ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter colorbarsSideBySide is : < BLOCKQUOTE > \ copydoc colorbarsSideBySide < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see colorbarsSideBySide for more information */
2019-01-26 20:00:40 +08:00
inline virtual bool getColorbarsSideBySide ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > colorbarsSideBySide ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property rgbMode ( \copybrief rgbMode ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter rgbMode is : < BLOCKQUOTE > \ copydoc rgbMode < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see rgbMode for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setRgbMode ( const JKQTPRGBMathImageRGBMode & __value )
2019-01-10 04:23:24 +08:00
{
this - > rgbMode = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property rgbMode ( \copybrief rgbMode ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter rgbMode is : < BLOCKQUOTE > \ copydoc rgbMode < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see rgbMode for more information */
2019-01-26 20:00:40 +08:00
inline virtual JKQTPRGBMathImageRGBMode getRgbMode ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > rgbMode ;
}
2015-07-11 18:56:02 +08:00
QVector < double > getDataGAsDoubleVector ( ) const ;
QVector < double > getDataBAsDoubleVector ( ) const ;
/*! \brief if the graph plots outside the actual plot field of view (e.g. color bars, scale bars, ...)
\ note If you want to draw outside , then you ' ll also have to implement drawOutside ( )
*/
2018-12-28 05:52:00 +08:00
virtual void getOutsideSize ( JKQTPEnhancedPainter & painter , int & leftSpace , int & rightSpace , int & topSpace , int & bottomSpace ) override ;
2015-07-11 18:56:02 +08:00
/*! \brief plots outside the actual plot field of view (e.g. color bars, scale bars, ...)
\ note If you want to draw outside , then you ' ll also have to implement getOutsideSize ( ) , so enough space is reserved
The four value supplied tell the method where to draw ( inside one of the rectangles ) .
*/
2018-12-28 05:52:00 +08:00
virtual void drawOutside ( JKQTPEnhancedPainter & painter , QRect leftSpace , QRect rightSpace , QRect topSpace , QRect bottomSpace ) override ;
2015-07-11 18:56:02 +08:00
/*! \brief return the plotted image only as a QImage */
virtual QImage drawImage ( ) ;
/** \brief determine min/max data value of the image */
virtual void getDataMinMaxG ( double & imin , double & imax ) ;
/** \brief determine min/max data value of the image */
virtual void getDataMinMaxB ( double & imin , double & imax ) ;
/** \brief return the value (raw data!) of the contained image at the given coordinate */
double getValueAt ( double x , double y , int channel = 0 ) ;
/** \brief plots a key marker inside the specified rectangle \a rect */
2018-12-28 05:52:00 +08:00
virtual void drawKeyMarker ( JKQTPEnhancedPainter & painter , QRectF & rect ) override ;
2015-07-11 18:56:02 +08:00
protected :
2015-08-02 19:36:54 +08:00
void initObject ( ) ;
2015-07-11 18:56:02 +08:00
/** \brief points to the data array, holding the image */
void * dataG ;
/** \brief datatype of the data array data */
DataType datatypeG ;
/** \brief points to the data array, holding the image */
void * dataB ;
/** \brief datatype of the data array data */
DataType datatypeB ;
JKQTPRGBMathImageRGBMode rgbMode ;
/** \brief top color bar visible */
bool colorBarTopVisible ;
/** \brief right color bar visible */
bool colorBarRightVisible ;
/** \brief name of the image displayed above color bar (may contain LaTeX markup!) */
QString imageName ;
/** \brief name of the image displayed above color bar (may contain LaTeX markup!) */
QString imageNameG ;
/** \brief name of the image displayed above color bar (may contain LaTeX markup!) */
QString imageNameB ;
/** \brief font name when displaying imageName */
QString imageNameFontName ;
/** \brief font size in points when displaying imageName */
double imageNameFontSize ;
/** \brief indicate whether to display a color bar */
bool showColorBar ;
/** \brief width of the color bar */
int colorBarWidth ;
/** \brief height of the color bar, as multiple of plotHeight */
double colorBarRelativeHeight ;
/** \brief indicates whether to estimate min/max of the image automatically */
bool autoImageRange ;
/** \brief image value range minimum */
double imageMin ;
/** \brief image value range maximum */
double imageMax ;
/** \brief image value range minimum */
double imageMinG ;
/** \brief image value range maximum */
double imageMaxG ;
/** \brief image value range minimum */
double imageMinB ;
/** \brief image value range maximum */
double imageMaxB ;
/** \brief offset between outside space border and color bar */
int colorBarOffset ;
/** \brief if \c true the different color bars share the space of a single color bar, if set \c false each colorbar uses the space of a single colorbar */
bool colorbarsSideBySide ;
/** \brief object used for color bar axes
*
* \ note this axis has some kind of a special role . It is used to format color bar axes
*/
2019-01-20 17:49:29 +08:00
JKQTPVerticalIndependentAxis * colorBarRightAxis ;
JKQTPHorizontalIndependentAxis * colorBarTopAxis ;
JKQTPVerticalIndependentAxis * colorBarRightAxisG ;
JKQTPHorizontalIndependentAxis * colorBarTopAxisG ;
JKQTPVerticalIndependentAxis * colorBarRightAxisB ;
JKQTPHorizontalIndependentAxis * colorBarTopAxisB ;
2015-07-11 18:56:02 +08:00
double internalDataMinG ;
double internalDataMaxG ;
double internalDataMinB ;
double internalDataMaxB ;
protected :
QAction * actSaveImage ;
QAction * actCopyImage ;
public :
2019-01-26 20:00:40 +08:00
virtual void setTitle ( const QString & title ) override ;
2015-07-11 18:56:02 +08:00
public slots :
void saveImagePlotAsImage ( const QString & filename = QString ( " " ) , const QByteArray & outputFormat = QByteArray ( ) ) ;
void copyImagePlotAsImage ( ) ;
} ;
/*! \brief class to plot an image from an 2-dimensional array of values stored in a column of the datastore
2019-01-13 01:53:16 +08:00
\ ingroup jkqtplotter_imagelots_elements
\ image html jkqtplotter_simpletest_imageplot . png
\ image html jkqtplotter_simpletest_imageplot_modifier . png
\ image html jkqtplotter_simpletest_imageplot__smallscaletransparent . png
2015-07-11 18:56:02 +08:00
*/
class LIB_EXPORT JKQTPColumnMathImage : public JKQTPMathImage {
Q_OBJECT
public :
/** \brief class constructor */
2019-01-20 17:49:29 +08:00
JKQTPColumnMathImage ( JKQTBasePlotter * parent = nullptr ) ;
2019-01-26 19:28:44 +08:00
JKQTPColumnMathImage ( double x , double y , double width , double height , int Nx , int Ny , JKQTBasePlotter * parent = nullptr ) ;
JKQTPColumnMathImage ( double x , double y , double width , double height , int imageColumn , int Nx , int Ny , JKQTPMathImageColorPalette palette = JKQTPMathImageGRAY , JKQTBasePlotter * parent = nullptr ) ;
2015-08-02 19:36:54 +08:00
/** \brief class constructor */
2019-01-20 23:15:10 +08:00
JKQTPColumnMathImage ( JKQTPlotter * parent ) ;
2019-01-26 19:28:44 +08:00
JKQTPColumnMathImage ( double x , double y , double width , double height , int Nx , int Ny , JKQTPlotter * parent ) ;
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 ) ;
2015-07-11 18:56:02 +08:00
2019-01-26 20:00:40 +08:00
/*! \brief sets the property imageColumn ( \copybrief imageColumn ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageColumn is : < BLOCKQUOTE > \ copydoc imageColumn < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageColumn for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setImageColumn ( int __value )
2019-01-10 04:23:24 +08:00
{
this - > imageColumn = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property imageColumn ( \copybrief imageColumn ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageColumn is : < BLOCKQUOTE > \ copydoc imageColumn < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageColumn for more information */
2019-01-26 20:00:40 +08:00
inline virtual int getImageColumn ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > imageColumn ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property modifierColumn ( \copybrief modifierColumn ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter modifierColumn is : < BLOCKQUOTE > \ copydoc modifierColumn < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see modifierColumn for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setModifierColumn ( int __value )
2019-01-10 04:23:24 +08:00
{
this - > modifierColumn = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property modifierColumn ( \copybrief modifierColumn ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter modifierColumn is : < BLOCKQUOTE > \ copydoc modifierColumn < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see modifierColumn for more information */
2019-01-26 20:00:40 +08:00
inline virtual int getModifierColumn ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > modifierColumn ;
}
2015-07-11 18:56:02 +08:00
2019-01-20 17:49:29 +08:00
/** \copydoc JKQTPGraph::usesColumn() */
2018-12-28 05:52:00 +08:00
virtual bool usesColumn ( int c ) const override ;
2015-07-11 18:56:02 +08:00
protected :
/** \brief column containing the displayed image */
int imageColumn ;
/** \brief column containing the modifier image */
int modifierColumn ;
2018-12-28 05:52:00 +08:00
virtual void ensureImageData ( ) override ;
2015-07-11 18:56:02 +08:00
} ;
/*! \brief like JKQTPRGBMathImage but reads images from columns of the datastore
2019-01-13 01:53:16 +08:00
\ ingroup jkqtplotter_imagelots_elements
2015-07-11 18:56:02 +08:00
2019-01-13 01:53:16 +08:00
\ image html jkqtplotter_simpletest_rgbimageplot_opencv . png
2015-07-11 18:56:02 +08:00
*/
class LIB_EXPORT JKQTPColumnRGBMathImage : public JKQTPRGBMathImage {
Q_OBJECT
public :
/** \brief class constructor */
2019-01-20 17:49:29 +08:00
JKQTPColumnRGBMathImage ( JKQTBasePlotter * parent = nullptr ) ;
2019-01-26 19:28:44 +08:00
JKQTPColumnRGBMathImage ( double x , double y , double width , double height , int Nx , int Ny , JKQTBasePlotter * parent = nullptr ) ;
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 ) ;
JKQTPColumnRGBMathImage ( double x , double y , double width , double height , int imageRColumn , int imageGColumn , int imageBColumn , int Nx , int Ny , JKQTBasePlotter * parent = nullptr ) ;
2015-08-02 19:36:54 +08:00
/** \brief class constructor */
2019-01-20 23:15:10 +08:00
JKQTPColumnRGBMathImage ( JKQTPlotter * parent ) ;
2019-01-26 19:28:44 +08:00
JKQTPColumnRGBMathImage ( double x , double y , double width , double height , int Nx , int Ny , JKQTPlotter * parent ) ;
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 ) ;
JKQTPColumnRGBMathImage ( double x , double y , double width , double height , int imageRColumn , int imageGColumn , int imageBColumn , int Nx , int Ny , JKQTPlotter * parent ) ;
2015-07-11 18:56:02 +08:00
2019-01-26 20:00:40 +08:00
/*! \brief sets the property imageRColumn ( \copybrief imageRColumn ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageRColumn is : < BLOCKQUOTE > \ copydoc imageRColumn < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageRColumn for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setImageRColumn ( int __value )
2019-01-10 04:23:24 +08:00
{
this - > imageRColumn = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property imageRColumn ( \copybrief imageRColumn ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageRColumn is : < BLOCKQUOTE > \ copydoc imageRColumn < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageRColumn for more information */
2019-01-26 20:00:40 +08:00
inline virtual int getImageRColumn ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > imageRColumn ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property imageGColumn ( \copybrief imageGColumn ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageGColumn is : < BLOCKQUOTE > \ copydoc imageGColumn < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageGColumn for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setImageGColumn ( int __value )
2019-01-10 04:23:24 +08:00
{
this - > imageGColumn = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property imageGColumn ( \copybrief imageGColumn ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageGColumn is : < BLOCKQUOTE > \ copydoc imageGColumn < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageGColumn for more information */
2019-01-26 20:00:40 +08:00
inline virtual int getImageGColumn ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > imageGColumn ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property imageBColumn ( \copybrief imageBColumn ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageBColumn is : < BLOCKQUOTE > \ copydoc imageBColumn < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageBColumn for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setImageBColumn ( int __value )
2019-01-10 04:23:24 +08:00
{
this - > imageBColumn = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property imageBColumn ( \copybrief imageBColumn ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageBColumn is : < BLOCKQUOTE > \ copydoc imageBColumn < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageBColumn for more information */
2019-01-26 20:00:40 +08:00
inline virtual int getImageBColumn ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > imageBColumn ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property modifierColumn ( \copybrief modifierColumn ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter modifierColumn is : < BLOCKQUOTE > \ copydoc modifierColumn < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see modifierColumn for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setModifierColumn ( int __value )
2019-01-10 04:23:24 +08:00
{
this - > modifierColumn = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property modifierColumn ( \copybrief modifierColumn ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter modifierColumn is : < BLOCKQUOTE > \ copydoc modifierColumn < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see modifierColumn for more information */
2019-01-26 20:00:40 +08:00
inline virtual int getModifierColumn ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > modifierColumn ;
}
2019-01-20 17:49:29 +08:00
/** \copydoc JKQTPGraph::usesColumn() */
2018-12-28 05:52:00 +08:00
virtual bool usesColumn ( int c ) const override ;
2015-07-11 18:56:02 +08:00
protected :
/** \brief image column for R channel */
int imageRColumn ;
/** \brief image column for G channel */
int imageGColumn ;
/** \brief image column for B channel */
int imageBColumn ;
/** \brief column containing the modifier image */
int modifierColumn ;
2018-12-28 05:52:00 +08:00
void ensureImageData ( ) override ;
2015-07-11 18:56:02 +08:00
} ;
/*! \brief class to plot an image from an 2-dimensional array of boolean values: alle \c true values are plotted in a given color, while the \c false pixels are drawn in another (default: transparent)
2019-01-13 01:53:16 +08:00
\ ingroup jkqtplotter_imagelots_elements
2015-07-11 18:56:02 +08:00
*/
class LIB_EXPORT JKQTPOverlayImage : public JKQTPImageBase {
Q_OBJECT
public :
/** \brief class constructor */
2019-01-26 19:28:44 +08:00
JKQTPOverlayImage ( double x , double y , double width , double height , bool * data , int Nx , int Ny , QColor colTrue , JKQTBasePlotter * parent = nullptr ) ;
2019-01-20 17:49:29 +08:00
JKQTPOverlayImage ( JKQTBasePlotter * parent = nullptr ) ;
2015-07-11 18:56:02 +08:00
2015-08-02 19:36:54 +08:00
/** \brief class constructor */
2019-01-26 19:28:44 +08:00
JKQTPOverlayImage ( double x , double y , double width , double height , bool * data , int Nx , int Ny , QColor colTrue , JKQTPlotter * parent ) ;
2019-01-20 23:15:10 +08:00
JKQTPOverlayImage ( JKQTPlotter * parent ) ;
2015-08-02 19:36:54 +08:00
2015-07-11 18:56:02 +08:00
/** \brief plots the graph to the plotter object specified as parent */
2018-12-28 05:52:00 +08:00
virtual void draw ( JKQTPEnhancedPainter & painter ) override ;
2015-07-11 18:56:02 +08:00
/*! \brief return the plotted image only as a QImage */
virtual QImage drawImage ( ) ;
/** \brief plots a key marker inside the specified rectangle \a rect */
2018-12-28 05:52:00 +08:00
virtual void drawKeyMarker ( JKQTPEnhancedPainter & painter , QRectF & rect ) override ;
2015-07-11 18:56:02 +08:00
/** \brief returns the color to be used for the key label */
2018-12-28 05:52:00 +08:00
virtual QColor getKeyLabelColor ( ) override ;
2015-07-11 18:56:02 +08:00
2019-01-26 20:00:40 +08:00
/*! \brief sets the property trueColor ( \copybrief trueColor ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter trueColor is : < BLOCKQUOTE > \ copydoc trueColor < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see trueColor for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setTrueColor ( const QColor & __value )
2019-01-10 04:23:24 +08:00
{
this - > trueColor = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property trueColor ( \copybrief trueColor ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter trueColor is : < BLOCKQUOTE > \ copydoc trueColor < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see trueColor for more information */
2019-01-26 20:00:40 +08:00
inline virtual QColor getTrueColor ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > trueColor ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property falseColor ( \copybrief falseColor ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter falseColor is : < BLOCKQUOTE > \ copydoc falseColor < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see falseColor for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setFalseColor ( const QColor & __value )
2019-01-10 04:23:24 +08:00
{
this - > falseColor = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property falseColor ( \copybrief falseColor ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter falseColor is : < BLOCKQUOTE > \ copydoc falseColor < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see falseColor for more information */
2019-01-26 20:00:40 +08:00
inline virtual QColor getFalseColor ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > falseColor ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property Nx ( \copybrief Nx ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter Nx is : < BLOCKQUOTE > \ copydoc Nx < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see Nx for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setNx ( int __value )
2019-01-10 04:23:24 +08:00
{
this - > Nx = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property Nx ( \copybrief Nx ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter Nx is : < BLOCKQUOTE > \ copydoc Nx < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see Nx for more information */
2019-01-26 20:00:40 +08:00
inline virtual int getNx ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > Nx ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property Ny ( \copybrief Ny ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter Ny is : < BLOCKQUOTE > \ copydoc Ny < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see Ny for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setNy ( int __value )
2019-01-10 04:23:24 +08:00
{
this - > Ny = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property Ny ( \copybrief Ny ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter Ny is : < BLOCKQUOTE > \ copydoc Ny < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see Ny for more information */
2019-01-26 20:00:40 +08:00
inline virtual int getNy ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > Ny ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property data ( \copybrief data ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter data is : < BLOCKQUOTE > \ copydoc data < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see data for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setData ( bool * __value )
2019-01-10 04:23:24 +08:00
{
this - > data = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property data ( \copybrief data ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter data is : < BLOCKQUOTE > \ copydoc data < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see data for more information */
2019-01-26 20:00:40 +08:00
inline virtual bool * getData ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > data ;
}
2015-07-11 18:56:02 +08:00
2019-01-26 20:00:40 +08:00
void setData ( bool * data , int Nx , int Ny ) ;
2015-07-11 18:56:02 +08:00
QVector < double > getDataAsDoubleVector ( ) const ;
protected :
/** \brief points to the data array, holding the image */
bool * data ;
2019-01-20 23:15:10 +08:00
/** \brief width of the data array data in pt */
2019-01-26 19:28:44 +08:00
int Nx ;
2019-01-20 23:15:10 +08:00
/** \brief height of the data array data in pt */
2019-01-26 19:28:44 +08:00
int Ny ;
2015-07-11 18:56:02 +08:00
/** \brief color for \c true pixels */
QColor trueColor ;
/** \brief color for \c false pixels */
QColor falseColor ;
protected :
QAction * actSaveImage ;
QAction * actCopyImage ;
public :
2019-01-26 20:00:40 +08:00
virtual void setTitle ( const QString & title ) override ;
2019-01-20 17:49:29 +08:00
virtual void setParent ( JKQTBasePlotter * parent ) override ;
2015-07-11 18:56:02 +08:00
public slots :
void saveImagePlotAsImage ( const QString & filename = QString ( " " ) , const QByteArray & outputFormat = QByteArray ( ) ) ;
void copyImagePlotAsImage ( ) ;
} ;
/*! \brief class to plot an image from an 2-dimensional array of boolean values: alle \c true values are plotted in a given color, while the \c false pixels are drawn in another (default: transparent)
2019-01-13 01:53:16 +08:00
\ ingroup jkqtplotter_imagelots_elements
2015-07-11 18:56:02 +08:00
In contrast to JKQTPOverlayImage this class draws ist contents as rectangles , not as semi - transparent image . This may lead to nicer results , but could be slower .
Also it is possible to draw other types of markers ( cross , circles , . . . )
*/
class LIB_EXPORT JKQTPOverlayImageEnhanced : public JKQTPOverlayImage {
Q_OBJECT
public :
/** \brief class constructor */
2019-01-26 19:28:44 +08:00
JKQTPOverlayImageEnhanced ( double x , double y , double width , double height , bool * data , int Nx , int Ny , QColor colTrue , JKQTBasePlotter * parent = nullptr ) ;
2019-01-20 17:49:29 +08:00
JKQTPOverlayImageEnhanced ( JKQTBasePlotter * parent = nullptr ) ;
2015-08-02 19:36:54 +08:00
/** \brief class constructor */
2019-01-26 19:28:44 +08:00
JKQTPOverlayImageEnhanced ( double x , double y , double width , double height , bool * data , int Nx , int Ny , QColor colTrue , JKQTPlotter * parent ) ;
2019-01-20 23:15:10 +08:00
JKQTPOverlayImageEnhanced ( JKQTPlotter * parent ) ;
2015-07-11 18:56:02 +08:00
/** \brief plots the graph to the plotter object specified as parent */
2018-12-28 05:52:00 +08:00
virtual void draw ( JKQTPEnhancedPainter & painter ) override ;
2015-07-11 18:56:02 +08:00
/** \brief plots a key marker inside the specified rectangle \a rect */
2018-12-28 05:52:00 +08:00
virtual void drawKeyMarker ( JKQTPEnhancedPainter & painter , QRectF & rect ) override ;
2015-07-11 18:56:02 +08:00
2019-01-26 20:00:40 +08:00
/*! \brief sets the property symbol ( \copybrief symbol ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter symbol is : < BLOCKQUOTE > \ copydoc symbol < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see symbol for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setSymbol ( const JKQTPGraphSymbols & __value )
2019-01-10 04:23:24 +08:00
{
this - > symbol = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property symbol ( \copybrief symbol ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter symbol is : < BLOCKQUOTE > \ copydoc symbol < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see symbol for more information */
2019-01-26 20:00:40 +08:00
inline virtual JKQTPGraphSymbols getSymbol ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > symbol ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property symbolWidth ( \copybrief symbolWidth ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter symbolWidth is : < BLOCKQUOTE > \ copydoc symbolWidth < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see symbolWidth for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setSymbolWidth ( double __value )
2019-01-10 04:23:24 +08:00
{
this - > symbolWidth = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property symbolWidth ( \copybrief symbolWidth ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter symbolWidth is : < BLOCKQUOTE > \ copydoc symbolWidth < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see symbolWidth for more information */
2019-01-26 20:00:40 +08:00
inline virtual double getSymbolWidth ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > symbolWidth ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property drawAsRectangles ( \copybrief drawAsRectangles ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter drawAsRectangles is : < BLOCKQUOTE > \ copydoc drawAsRectangles < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see drawAsRectangles for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setDrawAsRectangles ( bool __value )
2019-01-10 04:23:24 +08:00
{
this - > drawAsRectangles = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property drawAsRectangles ( \copybrief drawAsRectangles ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter drawAsRectangles is : < BLOCKQUOTE > \ copydoc drawAsRectangles < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see drawAsRectangles for more information */
2019-01-26 20:00:40 +08:00
inline virtual bool getDrawAsRectangles ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > drawAsRectangles ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property rectanglesAsImageOverlay ( \copybrief rectanglesAsImageOverlay ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter rectanglesAsImageOverlay is : < BLOCKQUOTE > \ copydoc rectanglesAsImageOverlay < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see rectanglesAsImageOverlay for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setRectanglesAsImageOverlay ( bool __value )
2019-01-10 04:23:24 +08:00
{
this - > rectanglesAsImageOverlay = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property rectanglesAsImageOverlay ( \copybrief rectanglesAsImageOverlay ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter rectanglesAsImageOverlay is : < BLOCKQUOTE > \ copydoc rectanglesAsImageOverlay < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see rectanglesAsImageOverlay for more information */
2019-01-26 20:00:40 +08:00
inline virtual bool getRectanglesAsImageOverlay ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > rectanglesAsImageOverlay ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property symbolSizeFactor ( \copybrief symbolSizeFactor ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter symbolSizeFactor is : < BLOCKQUOTE > \ copydoc symbolSizeFactor < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see symbolSizeFactor for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setSymbolSizeFactor ( double __value )
2019-01-10 04:23:24 +08:00
{
this - > symbolSizeFactor = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property symbolSizeFactor ( \copybrief symbolSizeFactor ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter symbolSizeFactor is : < BLOCKQUOTE > \ copydoc symbolSizeFactor < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see symbolSizeFactor for more information */
2019-01-26 20:00:40 +08:00
inline virtual double getSymbolSizeFactor ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > symbolSizeFactor ;
}
2015-07-11 18:56:02 +08:00
protected :
/** \brief which symbol to use for the datapoints */
2019-01-20 17:49:29 +08:00
JKQTPGraphSymbols symbol ;
2019-01-20 23:15:10 +08:00
/** \brief width (in pt) of the lines used to plot the symbol for the data points */
2015-07-11 18:56:02 +08:00
double symbolWidth ;
/** \brief indicates whether to draw filled rectangles (\c false, default) or symbols */
bool drawAsRectangles ;
/** \brief a rescaling factor for the symbols */
double symbolSizeFactor ;
/** \brief when \c drawAsRectangles==true this reactivates the drawing from JKQTPOverlayImage, i.e. the overlay is not drawn as separated rectangles, but as an overlay image */
bool rectanglesAsImageOverlay ;
} ;
/*! \brief class to plot an image from an 2-dimensional array of boolean values: alle \c true values are plotted in a given color, while the \c false pixels are drawn in another (default: transparent)
2019-01-13 01:53:16 +08:00
\ ingroup jkqtplotter_imagelots_elements
2015-07-11 18:56:02 +08:00
In contrast to JKQTPOverlayImage this class draws ist contents as rectangles , not as semi - transparent image . This may lead to nicer results , but could be slower .
Also it is possible to draw other types of markers ( cross , circles , . . . )
*/
class LIB_EXPORT JKQTPColumnOverlayImageEnhanced : public JKQTPOverlayImageEnhanced {
Q_OBJECT
public :
2019-01-20 17:49:29 +08:00
JKQTPColumnOverlayImageEnhanced ( JKQTBasePlotter * parent = nullptr ) ;
2019-01-20 23:15:10 +08:00
JKQTPColumnOverlayImageEnhanced ( JKQTPlotter * parent ) ;
2015-07-11 18:56:02 +08:00
2019-01-26 20:00:40 +08:00
/*! \brief sets the property imageColumn ( \copybrief imageColumn ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageColumn is : < BLOCKQUOTE > \ copydoc imageColumn < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageColumn for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setImageColumn ( int __value )
2019-01-10 04:23:24 +08:00
{
this - > imageColumn = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property imageColumn ( \copybrief imageColumn ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter imageColumn is : < BLOCKQUOTE > \ copydoc imageColumn < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see imageColumn for more information */
2019-01-26 20:00:40 +08:00
inline virtual int getImageColumn ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > imageColumn ;
}
2015-07-11 18:56:02 +08:00
/** \brief plots the graph to the plotter object specified as parent */
2018-12-28 05:52:00 +08:00
virtual void draw ( JKQTPEnhancedPainter & painter ) override ;
2015-07-11 18:56:02 +08:00
2019-01-20 17:49:29 +08:00
/** \copydoc JKQTPGraph::usesColumn() */
2018-12-28 05:52:00 +08:00
virtual bool usesColumn ( int c ) const override ;
2015-07-11 18:56:02 +08:00
protected :
/** \brief top color bar visible */
int imageColumn ;
} ;
/*! \brief class for a contour plot
2019-01-13 01:53:16 +08:00
* \ ingroup jkqtplotter_imagelots_contour
2015-07-11 18:56:02 +08:00
* calculates the contour of a given image using the CONREC algorithm
2019-01-12 23:01:55 +08:00
* < a href = " http://paulbourke.net/papers/conrec/ " > http : //paulbourke.net/papers/conrec/</a>
2015-07-11 18:56:02 +08:00
* The implementation for Qt is adapted from Qwt
2019-01-12 23:01:55 +08:00
* < a href = " http://qwt.sourceforge.net/ " > http : //qwt.sourceforge.net/</a>
2015-07-11 18:56:02 +08:00
*
* The contour lines are calculated only once and then redrawn to save plotting time .
* Make sure you add a new graph when your data changes . The contour levels can be defined in
* contourLevels , each elemt in the list represents a contour plane . You can also create contour
* levels with createContourLevels ( ) . The levels are linearly spaced between the maximum and minimum
* value in your data . For logarithmic data , use createContourLevelsLog ( ) to create contour levels
* with logarithmic spacing .
2015-08-02 19:36:54 +08:00
*
* \ author Sebastian Isbaner , 2013 - 2014
2019-01-13 01:53:16 +08:00
*
* \ image html JKQTPContour . png
2015-07-11 18:56:02 +08:00
*/
class LIB_EXPORT JKQTPContour : public JKQTPMathImage {
Q_OBJECT
public :
/** \brief class constructor */
2019-01-20 17:49:29 +08:00
JKQTPContour ( JKQTBasePlotter * parent = nullptr ) ;
2015-07-11 18:56:02 +08:00
/** \brief class constructor */
2019-01-26 19:28:44 +08:00
JKQTPContour ( double x , double y , double width , double height , void * data , int Nx , int Ny , JKQTPMathImageColorPalette palette = JKQTPMathImageGRAY , DataType datatype = JKQTPMathImageBase : : DoubleArray , JKQTBasePlotter * parent = nullptr ) ;
2015-08-02 19:36:54 +08:00
/** \brief class constructor */
2019-01-20 23:15:10 +08:00
JKQTPContour ( JKQTPlotter * parent ) ;
2015-08-02 19:36:54 +08:00
/** \brief class constructor */
2019-01-26 19:28:44 +08:00
JKQTPContour ( double x , double y , double width , double height , void * data , int Nx , int Ny , JKQTPMathImageColorPalette palette , DataType datatype , JKQTPlotter * parent ) ;
2015-07-11 18:56:02 +08:00
/** \brief plots the graph to the plotter object specified as parent */
2018-12-28 05:52:00 +08:00
virtual void draw ( JKQTPEnhancedPainter & painter ) override ;
2015-07-11 18:56:02 +08:00
/** \brief creates at nLevels contour levels linearly spaced between the data's minimum and maximum values */
void createContourLevels ( int nLevels = 3 ) ;
/** \brief creates at least nLevels contour levels with logarithmic spacing. FIXME: Has not been tested yet */
void createContourLevelsLog ( int nLevels = 3 , int m = 2 ) ;
2019-01-26 20:00:40 +08:00
/*! \brief sets the property lineColor ( \copybrief lineColor ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter lineColor is : < BLOCKQUOTE > \ copydoc lineColor < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see lineColor for more information */
2019-01-26 03:16:04 +08:00
inline virtual void setLineColor ( const QColor & __value )
2019-01-10 04:23:24 +08:00
{
this - > lineColor = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property lineColor ( \copybrief lineColor ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter lineColor is : < BLOCKQUOTE > \ copydoc lineColor < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see lineColor for more information */
2019-01-26 03:16:04 +08:00
inline virtual QColor getLineColor ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > lineColor ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property style ( \copybrief style ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter style is : < BLOCKQUOTE > \ copydoc style < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see style for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setStyle ( const Qt : : PenStyle & __value )
2019-01-10 04:23:24 +08:00
{
this - > style = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property style ( \copybrief style ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter style is : < BLOCKQUOTE > \ copydoc style < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see style for more information */
2019-01-26 20:00:40 +08:00
inline virtual Qt : : PenStyle getStyle ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > style ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property lineWidth ( \copybrief lineWidth ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter lineWidth is : < BLOCKQUOTE > \ copydoc lineWidth < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see lineWidth for more information */
2019-01-26 03:16:04 +08:00
inline virtual void setLineWidth ( double __value )
2019-01-10 04:23:24 +08:00
{
this - > lineWidth = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property lineWidth ( \copybrief lineWidth ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter lineWidth is : < BLOCKQUOTE > \ copydoc lineWidth < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see lineWidth for more information */
2019-01-26 03:16:04 +08:00
inline virtual double getLineWidth ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > lineWidth ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property ignoreOnPlane ( \copybrief ignoreOnPlane ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter ignoreOnPlane is : < BLOCKQUOTE > \ copydoc ignoreOnPlane < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see ignoreOnPlane for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setIgnoreOnPlane ( bool __value )
2019-01-10 04:23:24 +08:00
{
this - > ignoreOnPlane = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property ignoreOnPlane ( \copybrief ignoreOnPlane ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter ignoreOnPlane is : < BLOCKQUOTE > \ copydoc ignoreOnPlane < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see ignoreOnPlane for more information */
2019-01-26 20:00:40 +08:00
inline virtual bool getIgnoreOnPlane ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > ignoreOnPlane ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property numberOfLevels ( \copybrief numberOfLevels ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter numberOfLevels is : < BLOCKQUOTE > \ copydoc numberOfLevels < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see numberOfLevels for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setNumberOfLevels ( int __value )
2019-01-10 04:23:24 +08:00
{
this - > numberOfLevels = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property numberOfLevels ( \copybrief numberOfLevels ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter numberOfLevels is : < BLOCKQUOTE > \ copydoc numberOfLevels < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see numberOfLevels for more information */
2019-01-26 20:00:40 +08:00
inline virtual int getNumberOfLevels ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > numberOfLevels ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property colorFromPalette ( \copybrief colorFromPalette ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter colorFromPalette is : < BLOCKQUOTE > \ copydoc colorFromPalette < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see colorFromPalette for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setColorFromPalette ( bool __value )
2019-01-10 04:23:24 +08:00
{
this - > colorFromPalette = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property colorFromPalette ( \copybrief colorFromPalette ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter colorFromPalette is : < BLOCKQUOTE > \ copydoc colorFromPalette < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see colorFromPalette for more information */
2019-01-26 20:00:40 +08:00
inline virtual bool getColorFromPalette ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > colorFromPalette ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property contourLevels ( \copybrief contourLevels ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter contourLevels is : < BLOCKQUOTE > \ copydoc contourLevels < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see contourLevels for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setContourLevels ( const QList < double > & __value )
2019-01-10 04:23:24 +08:00
{
this - > contourLevels = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property contourLevels ( \copybrief contourLevels ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter contourLevels is : < BLOCKQUOTE > \ copydoc contourLevels < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see contourLevels for more information */
2019-01-26 20:00:40 +08:00
inline virtual QList < double > getContourLevels ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > contourLevels ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property relativeLevels ( \copybrief relativeLevels ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter relativeLevels is : < BLOCKQUOTE > \ copydoc relativeLevels < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see relativeLevels for more information */
2019-01-26 20:00:40 +08:00
inline virtual void setRelativeLevels ( bool __value )
2019-01-10 04:23:24 +08:00
{
this - > relativeLevels = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property relativeLevels ( \copybrief relativeLevels ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter relativeLevels is : < BLOCKQUOTE > \ copydoc relativeLevels < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see relativeLevels for more information */
2019-01-26 20:00:40 +08:00
inline virtual bool getRelativeLevels ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > relativeLevels ;
}
2019-01-20 17:49:29 +08:00
/** convenience function to work with JKQTPDatastore */
2019-01-26 20:00:40 +08:00
void setImageColumn ( size_t columnID ) ;
2015-07-11 18:56:02 +08:00
void addContourLevel ( double & level ) ;
protected :
/** \brief color of the contour lines */
QColor lineColor ;
/** \brief linestyle of the contour lines */
Qt : : PenStyle style ;
/** \brief width (pixels) of the graph */
double lineWidth ;
/** \brief if true, vertices that all lie on the contour plane will be ignored*/
bool ignoreOnPlane ;
/** \brief if true, the colors of the \a palette are used for the contour lines */
bool colorFromPalette ;
/** \brief the number of contour levels. Is only used if contourLevels is empty*/
int numberOfLevels ;
/** \brief the list of contour levels */
QList < double > contourLevels ;
// /** \brief indicates wether the contour levels are absolute values or relative to the maximum (max-min) */
bool relativeLevels ;
2018-12-28 05:52:00 +08:00
virtual void ensureImageData ( ) override ;
2015-07-11 18:56:02 +08:00
private :
double value ( int xIdx , int yIdx ) ;
/// gives the intersection line of a plane defined by three vertices with a contour level in the x-y plane of heigth level
2019-01-10 04:23:24 +08:00
bool intersect ( QLineF & line , const QVector3D & vertex1 , const QVector3D & vertex2 , const QVector3D & vertex3 , double level ) ;
2015-07-11 18:56:02 +08:00
/**
* @ brief interpolatePoint linear interpolation of a line to the x - y plane using the z - value relative to level
* @ param point1 start point of the line
* @ param point2 end point of the line
* @ param level the heigth for the interpolation ( this z - value is projected onto the xy - plane )
* @ return the interpolated point in the x - y plane
*/
2019-01-10 04:23:24 +08:00
QPointF interpolatePoint ( const QVector3D & point1 , const QVector3D & point2 , double level ) ;
2015-07-11 18:56:02 +08:00
/**
* @ brief compare2level checks if the vertex lies above , under or on the contour plane level
* @ param vertex
* @ param level contour plane
* @ return above ( 1 ) , on the plane ( 0 ) , below ( - 1 ) ;
*/
2019-01-10 04:23:24 +08:00
int compare2level ( const QVector3D & vertex , double level ) ;
2015-07-11 18:56:02 +08:00
/**
* @ brief calcContourLines calculates the contour lines using the CONREC algorithm
*/
void calcContourLines ( QList < QVector < QLineF > > & ContourLines ) ;
/// the contour lines as vector of single lines (one for each triangle). the list index refers to the contour level.
QList < QVector < QLineF > > contourLines ; // contour levels, squares on grid, line
} ;
2018-12-19 00:13:18 +08:00
# endif // jkqtpgraphsimage_H
2015-07-11 18:56:02 +08:00