|
VAPOR3 3.9.4
|
Parent class for TransferFunction and IsoControl, supports positioning histogram over color/opacity maps as well as a set of isovalues (as with Contours) More...
#include <MapperFunction.h>
Public Types | |
| enum | CompositionType { ADDITION = 0 , MULTIPLICATION = 1 } |
| Opacity composition types. More... | |
Public Types inherited from Wasp::MyBase | |
| typedef void(* | ErrMsgCB_T) (const char *msg, int err_code) |
| typedef void(* | DiagMsgCB_T) (const char *msg) |
Public Member Functions | |
| MapperFunction (ParamsBase::StateSave *ssave) | |
| MapperFunction (ParamsBase::StateSave *ssave, XmlNode *node) | |
| MapperFunction (const MapperFunction &rhs) | |
| MapperFunction & | operator= (const MapperFunction &rhs) |
| virtual | ~MapperFunction () |
| int | SaveToFile (string path) |
| int | LoadFromFile (string path) |
| int | LoadColormapFromFile (string path) |
| float | getOpacityValueData (float point) const |
| void | hsvValue (float point, float *h, float *sat, float *val) const |
| void | rgbValue (float point, float rgb[3]) const |
| void | rgbaValue (float point, float rgba[4]) const |
| void | setOpaque () |
| Make the opacity map completely opaque (opacity 1) | |
| bool | isOpaque () const |
| void | makeLut (float *clut) const |
| void | makeLut (std::vector< float > &clut) const |
| std::vector< float > | makeLut () const |
| float | getMinMapValue () const |
| float | getMaxMapValue () const |
| void | setMinMaxMapValue (float val1, float val2) |
| void | setMinMapValue (float val) |
| void | setMaxMapValue (float val) |
| vector< double > | getMinMaxMapValue () const |
| vector< double > | GetCustomMappingSliderRange () const |
| Returns size 2 vector of the users custom slider range. Used by TFMappingRangeSelector. | |
| bool | IsUsingCustomMappingSliderRange () const |
| void | SetCustomMappingSliderRange (const vector< double > &range) |
| Set the size 2 vector of the users custom slider range. Used by TFMappingRangeSelector. | |
| void | SetUsingCustomMappingSliderRange (bool b) |
| virtual OpacityMap * | createOpacityMap (OpacityMap::Type type=OpacityMap::CONTROL_POINT) |
| void | DeleteOpacityMap (const OpacityMap *omap) |
| virtual OpacityMap * | GetOpacityMap (int index) const |
| int | getNumOpacityMaps () const |
| void | setOpacityScale (double val) |
| double | getOpacityScale () const |
| void | setOpacityComposition (CompositionType t) |
| CompositionType | getOpacityComposition () const |
| int | getNumEntries () const |
| int | mapFloatToIndex (float point) const |
| float | mapIndexToFloat (int indx) const |
| TFInterpolator::type | getColorInterpType () |
| void | setColorInterpType (TFInterpolator::type t) |
| void | setUseWhitespace (int state) |
| int | getUseWhitespace () const |
| virtual ColorMap * | GetColorMap () const |
| bool | GetAutoUpdateHisto () |
| void | SetAutoUpdateHisto (bool val) |
| bool | GetSecondaryVarMapper () |
| void | SetSecondaryVarMapper (bool val) |
Public Member Functions inherited from VAPoR::ParamsBase | |
| ParamsBase (StateSave *ssave, const string &classname) | |
| ParamsBase (StateSave *ssave, XmlNode *node) | |
| ParamsBase (const ParamsBase &rhs) | |
| Copy constructor. | |
| ParamsBase & | operator= (const ParamsBase &rhs) |
| ParamsBase (ParamsBase &&)=delete | |
| ParamsBase & | operator= (ParamsBase &)=delete |
| bool | operator== (const ParamsBase &rhs) const |
| Equivalence operator. | |
| bool | operator!= (const ParamsBase &rhs) const |
| virtual | ~ParamsBase () |
| void | SetParent (ParamsBase *parent) |
| XmlNode * | GetNode () const |
| void | BeginGroup (const string &description) |
| void | EndGroup () |
| void | IntermediateChange () |
| virtual vector< long > | GetValueLongVec (const string tag) const |
| virtual vector< long > | GetValueLongVec (const string tag, const vector< long > &defaultVal) const |
| virtual long | GetValueLong (const string tag, long defaultVal) const |
| virtual vector< double > | GetValueDoubleVec (const string tag) const |
| virtual vector< double > | GetValueDoubleVec (const string tag, const vector< double > &defaultVal) const |
| virtual double | GetValueDouble (const string tag, double defaultVal) const |
| virtual vector< string > | GetValueStringVec (const string tag) const |
| virtual vector< string > | GetValueStringVec (const string tag, const vector< string > &defaultVal) const |
| virtual string | GetValueString (const string tag, string defaultVal) const |
| virtual void | SetValueLongVec (const string &tag, string description, const vector< long > &values) |
| virtual void | SetValueLong (const string &tag, string description, long value) |
| virtual void | SetValueDoubleVec (const string &tag, string description, const vector< double > &values) |
| virtual void | SetValueDouble (const string &tag, string description, double value) |
| virtual void | SetValueStringVec (const string &tag, string description, const vector< string > &values) |
| virtual void | SetValueString (const string &tag, string description, const string &value) |
| string | GetName () const |
Public Member Functions inherited from Wasp::MyBase | |
| MyBase () | |
| const string & | getClassName () const |
Static Public Member Functions | |
| static string | GetClassType () |
| static void | hsvToRgb (float *hsv, float *rgb) |
| static void | rgbToHsv (float *rgb, float *hsv) |
| static vector< float > | rgbToHsv (vector< float > rgb) |
Static Public Member Functions inherited from Wasp::MyBase | |
| static void | SetErrMsg (const char *format,...) |
| Record a formatted error message. | |
| static void | SetErrMsg (int errcode, const char *format,...) |
| Record a formatted error message and an error code. | |
| static const char * | GetErrMsg () |
| static void | SetErrCode (int err_code) |
| Record an error code. | |
| static int | GetErrCode () |
| Retrieve the current error code. | |
| static void | SetErrMsgCB (ErrMsgCB_T cb) |
| static ErrMsgCB_T | GetErrMsgCB () |
| static void | SetErrMsgFilePtr (FILE *fp) |
| static const FILE * | SetErrMsgFilePtr () |
| static void | SetDiagMsg (const char *format,...) |
| Record a formatted diagnostic message. | |
| static const char * | GetDiagMsg () |
| static void | SetDiagMsgCB (DiagMsgCB_T cb) |
| static DiagMsgCB_T | GetDiagMsgCB () |
| static void | SetDiagMsgFilePtr (FILE *fp) |
| static bool | EnableErrMsg (bool enable) |
| static bool | GetEnableErrMsg () |
Static Public Attributes | |
| static const string | _dataBoundsTag |
| static const string | _opacityCompositionTag |
| static const string | _opacityScaleTag |
| static const string | _opacityMapsTag |
| static const string | _opacityMapTag |
| static const string | _autoUpdateHistoTag |
| static const string | _secondaryVarMapperTag |
| static const string | CustomMappingSliderRangeTag |
| static const string | IsUsingCustomMappingSliderRangeTag |
Static Public Attributes inherited from Wasp::MyBase | |
| static char * | ErrMsg |
| static int | ErrCode |
| static int | ErrMsgSize |
| static FILE * | ErrMsgFilePtr |
| static ErrMsgCB_T | ErrMsgCB |
| static char * | DiagMsg |
| static int | DiagMsgSize |
| static FILE * | DiagMsgFilePtr |
| static DiagMsgCB_T | DiagMsgCB |
| static bool | Enabled |
Additional Inherited Members | |
Protected Member Functions inherited from VAPoR::ParamsBase | |
| ParamsBase (StateSave *ssave) | |
| void | Remove (const string &name) |
| const map< string, string > & | GetAttributes () |
| void | Clear () |
Protected Member Functions inherited from Wasp::MyBase | |
| void | SetClassName (const string &name) |
Protected Attributes inherited from VAPoR::ParamsBase | |
| StateSave * | _ssave |
| XmlNode * | _node |
Parent class for TransferFunction and IsoControl, supports positioning histogram over color/opacity maps as well as a set of isovalues (as with Contours)
Definition at line 43 of file MapperFunction.h.
Opacity composition types.
| Enumerator | |
|---|---|
| ADDITION | |
| MULTIPLICATION | |
Definition at line 175 of file MapperFunction.h.
| VAPoR::MapperFunction::MapperFunction | ( | ParamsBase::StateSave * | ssave | ) |
| VAPoR::MapperFunction::MapperFunction | ( | ParamsBase::StateSave * | ssave, |
| XmlNode * | node | ||
| ) |
| VAPoR::MapperFunction::MapperFunction | ( | const MapperFunction & | rhs | ) |
|
virtual |
|
virtual |
Create an opacity map for this transfer function
| [in] | type | of opacity map |
| void VAPoR::MapperFunction::DeleteOpacityMap | ( | const OpacityMap * | omap | ) |
Delete an opacity map from this transfer function
| [in] | omap | Pointer to map to delete |
|
inline |
Method to get the state of the automatic histogram update setting.
Definition at line 254 of file MapperFunction.h.
|
inlinestatic |
Definition at line 69 of file MapperFunction.h.
|
inline |
Obtain the color interpolation type
Definition at line 219 of file MapperFunction.h.
References VAPoR::ColorMap::GetInterpType().
|
inlinevirtual |
Method to get the Color Map from the Mapper Function
Definition at line 248 of file MapperFunction.h.
| vector< double > VAPoR::MapperFunction::GetCustomMappingSliderRange | ( | ) | const |
Returns size 2 vector of the users custom slider range. Used by TFMappingRangeSelector.
|
inline |
Obtain maximum mapping (histo) value
Definition at line 125 of file MapperFunction.h.
|
inline |
Obtain minimum mapping (histo) value
Definition at line 121 of file MapperFunction.h.
| vector< double > VAPoR::MapperFunction::getMinMaxMapValue | ( | ) | const |
Obtain min and max mapping (histo) values
|
inline |
Obtain the number of entries in the color/opacity map
Definition at line 198 of file MapperFunction.h.
|
inline |
Determine how many opacity maps are available
Definition at line 164 of file MapperFunction.h.
|
inline |
Obtain the type of opacity composition (ADDITION or MULTIPLICATION)
Definition at line 183 of file MapperFunction.h.
|
virtual |
Obtain the opacity map associated with an index. specified index identifies which of the opacity maps is requested.
| [in] | index | Opacity map index of desired map. |
|
inline |
Identify the current opacity scale factor
Definition at line 172 of file MapperFunction.h.
| float VAPoR::MapperFunction::getOpacityValueData | ( | float | point | ) | const |
Determine the opacity value at a particular data value
| [in] | point | float data value |
|
inline |
Method to get the state of whether the current mapper function applies color through a primary variable or secondary variable. For example, Barbs may have a "Color Mapped Variable" that colors the barbs according to a "Secondary variable", independent of the vector variables that define the Barbs. Isosurfaces can have Secondary Variable colorings too.
Definition at line 269 of file MapperFunction.h.
|
inline |
Definition at line 240 of file MapperFunction.h.
References VAPoR::ColorMap::GetUseWhitespace().
|
static |
Utility method converts HSV to RGB
| [in] | hsv | (HSV as float[3] array) |
| [out] | rgb | (RGB as float[3] array) |
| void VAPoR::MapperFunction::hsvValue | ( | float | point, |
| float * | h, | ||
| float * | sat, | ||
| float * | val | ||
| ) | const |
Determine the color value (in HSV) at a data point
| [in] | point | Data value |
| [out] | h | Hue |
| [out] | sat | Saturation |
| [out] | val | Value |
| bool VAPoR::MapperFunction::isOpaque | ( | ) | const |
Determine if the map is totally opaque (opacity 1)
| bool VAPoR::MapperFunction::IsUsingCustomMappingSliderRange | ( | ) | const |
| int VAPoR::MapperFunction::LoadColormapFromFile | ( | string | path | ) |
| int VAPoR::MapperFunction::LoadFromFile | ( | string | path | ) |
Load a transfer function from a file,
| [in] | path | Path of input file |
| std::vector< float > VAPoR::MapperFunction::makeLut | ( | ) | const |
| void VAPoR::MapperFunction::makeLut | ( | float * | clut | ) | const |
Build a color/opacity lookup table. Caller must supply an array to be filled in. Each entry isa 4-tuple: r,g,b,opacity.
| [out] | clut | lookup table of size _numEntries*4 |
| void VAPoR::MapperFunction::makeLut | ( | std::vector< float > & | clut | ) | const |
|
inline |
Map and quantize a real value to the corresponding table index i.e., quantize to current Mapper function domain
| [in] | point | value to be quantized |
Definition at line 204 of file MapperFunction.h.
|
inline |
Determine float value associated with index
| [in] | indx | index (between 0 and _numEntries) |
Definition at line 215 of file MapperFunction.h.
| MapperFunction & VAPoR::MapperFunction::operator= | ( | const MapperFunction & | rhs | ) |
|
inline |
Determine the color (in RGB) and opacity at a data point
| [in] | point | Data value |
| [out] | rgb | r,g,b, afloats |
Definition at line 95 of file MapperFunction.h.
|
static |
Utility method converts RGB to HSV
| [in] | rgb | (RGB as float[3] array) |
| [out] | hsv | (HSV as float[3] array) |
|
static |
|
inline |
Determine the color value (in RGB) at a data point
| [in] | point | Data value |
| [out] | rgb | r,g,b floats |
Definition at line 85 of file MapperFunction.h.
| int VAPoR::MapperFunction::SaveToFile | ( | string | path | ) |
Save this transfer function to a file
| [in] | path | Path of output file |
|
inline |
Method to set the state of the automatic histogram update setting.
| [in] | State | of the autoUpdateHisto setting |
Definition at line 260 of file MapperFunction.h.
|
inline |
Specify the color interpolation type
| [in] | t | color interpolation type |
Definition at line 228 of file MapperFunction.h.
References VAPoR::ColorMap::SetInterpType().
| void VAPoR::MapperFunction::SetCustomMappingSliderRange | ( | const vector< double > & | range | ) |
Set the size 2 vector of the users custom slider range. Used by TFMappingRangeSelector.
|
inline |
Definition at line 134 of file MapperFunction.h.
|
inline |
Definition at line 132 of file MapperFunction.h.
| void VAPoR::MapperFunction::setMinMaxMapValue | ( | float | val1, |
| float | val2 | ||
| ) |
Set both minimum and maximum mapping (histo) values
| [in] | val1 | minimum value |
| [in] | val2 | maximum value |
|
inline |
Specify the type of opacity composition (ADDITION or MULTIPLICATION)
| [in] | t | CompositionType |
Definition at line 179 of file MapperFunction.h.
|
inline |
Specify an opacity scale factor applied to all opacity maps
| [in] | val | opacity scale factor |
Definition at line 168 of file MapperFunction.h.
| void VAPoR::MapperFunction::setOpaque | ( | ) |
Make the opacity map completely opaque (opacity 1)
|
inline |
Method to set the state of whether the current mapper function applies color through a ColorMappedVariable, or a renderer's primary variable.
| [in] | State | of the Secondary Variable color setting |
Definition at line 276 of file MapperFunction.h.
|
inline |
Definition at line 234 of file MapperFunction.h.
References VAPoR::ColorMap::SetUseWhitespace().
| void VAPoR::MapperFunction::SetUsingCustomMappingSliderRange | ( | bool | b | ) |
|
static |
Definition at line 287 of file MapperFunction.h.
|
static |
Definition at line 282 of file MapperFunction.h.
|
static |
Definition at line 283 of file MapperFunction.h.
|
static |
Definition at line 285 of file MapperFunction.h.
|
static |
Definition at line 286 of file MapperFunction.h.
|
static |
Definition at line 284 of file MapperFunction.h.
|
static |
Definition at line 288 of file MapperFunction.h.
|
static |
Definition at line 289 of file MapperFunction.h.
|
static |
Definition at line 290 of file MapperFunction.h.