VAPoR  0.1
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
VAPoR::MapperFunctionBase Class Reference

#include <MapperFunctionBase.h>

Inheritance diagram for VAPoR::MapperFunctionBase:
VAPoR::ParamsBase VAPoR::ParsedXml VAPoR::MapperFunction VAPoR::IsoControl VAPoR::TransferFunction

Public Types

enum  CompositionType { ADDITION = 0, MULTIPLICATION = 1 }
 
- Public Types inherited from VAPoR::ParamsBase
typedef int ParamsBaseType
 

Public Member Functions

 MapperFunctionBase (const string &name)
 
 MapperFunctionBase (int nBits, const string &name)
 
 MapperFunctionBase (const MapperFunctionBase &mapper)
 
virtual ~MapperFunctionBase ()
 
float opacityValue (float point)
 
void hsvValue (float point, float *h, float *sat, float *val)
 
void setOpaque ()
 
bool isOpaque ()
 
void makeLut (float *clut)
 
void setMinMapValue (float val)
 
void setMaxMapValue (float val)
 
float getMinMapValue ()
 
float getMaxMapValue ()
 
int getColorVarNum ()
 
int getOpacVarNum ()
 
virtual void setVarNum (int var)
 
virtual void setColorVarNum (int var)
 
virtual void setOpacVarNum (int var)
 
virtual OpacityMapBase * createOpacityMap (OpacityMapBase::Type type=OpacityMapBase::CONTROL_POINT)
 
virtual OpacityMapBase * getOpacityMap (int index) const
 
void deleteOpacityMap (OpacityMapBase *omap)
 
int getNumOpacityMaps () const
 
void setOpacityScaleFactor (float val)
 
float getOpacityScaleFactor ()
 
void setOpacityComposition (CompositionType t)
 
CompositionType getOpacityComposition ()
 
virtual ColorMapBase * getColormap () const
 
int getNumEntries ()
 
void setNumEntries (int val)
 
int mapFloatToColorIndex (float point)
 
float mapColorIndexToFloat (int indx)
 
int mapFloatToOpacIndex (float point)
 
float mapOpacIndexToFloat (int indx)
 
virtual ParamNodebuildNode ()
 
virtual bool elementStartHandler (ExpatParseMgr *, int depth, std::string &, const char **)
 
virtual bool elementEndHandler (ExpatParseMgr *, int, std::string &)
 
std::string getName ()
 
TFInterpolator::type colorInterpType ()
 
void setColorInterpType (TFInterpolator::type t)
 
- Public Member Functions inherited from VAPoR::ParamsBase
 ParamsBase (XmlNode *parent, const string &name)
 
 ParamsBase (const string &name)
 Default constructor. More...
 
 ParamsBase (const ParamsBase &pbase)
 Copy constructor. More...
 
virtual ~ParamsBase ()
 
virtual ParamsBasedeepCopy (ParamNode *newRoot=0)
 
void SetParent (XmlNode *parent)
 
virtual bool elementStartHandler (ExpatParseMgr *pm, int depth, string &tag, const char **attribs)
 
virtual bool elementEndHandler (ExpatParseMgr *pm, int depth, string &tag)
 
ParamNodeGetRootNode ()
 
void SetFlagDirty (const string &flag)
 
const string & GetName ()
 
ParamsBaseType GetParamsBaseTypeId ()
 
virtual void SetRootParamNode (ParamNode *pn)
 
- Public Member Functions inherited from VAPoR::ParsedXml
virtual ~ParsedXml ()
 
virtual bool charHandler (ExpatParseMgr *, const XML_Char *, int)
 

Static Public Member Functions

static void hsvToRgb (float *hsv, float *rgb)
 
static void rgbToHsv (float *rgb, float *hsv)
 
static int mapPosition (float x, float minValue, float maxValue, int hSize)
 
- Static Public Member Functions inherited from VAPoR::ParamsBase
static ParamsBaseType GetTypeFromTag (const string &tag)
 
static const string & GetTagFromType (ParamsBaseType t)
 
static ParamsBaseCreateDefaultParamsBase (int pType)
 
static ParamsBaseCreateDefaultParamsBase (const string &tag)
 
static int RegisterParamsBaseClass (const string &tag, BaseCreateFcn fcn, bool isParams)
 
static int ReregisterParamsBaseClass (const string &tag, const string &newtag, bool isParams)
 
static int GetNumParamsClasses ()
 
static bool IsParamsTag (const string &tag)
 

Static Public Attributes

static const string _mapperFunctionTag
 

Protected Member Functions

virtual void init ()
 
- Protected Member Functions inherited from VAPoR::ParamsBase
virtual ParamNodegetCurrentParamNode ()
 
virtual void setCurrentParamNode (ParamNode *pn)
 
ParamNodeGetCurrentNode ()
 
ParamNodePush (string &tag, ParamsBase *pBase=0)
 
ParamNodePop ()
 
void Remove (const string &name)
 
const map< string, string > & GetAttributes ()
 
void Clear ()
 

Protected Attributes

vector< OpacityMapBase * > _opacityMaps
 
CompositionType _compType
 
ColorMapBase * _colormap
 
float minMapBound
 
float maxMapBound
 
int numEntries
 
string mapperName
 
int colorVarNum
 
int opacVarNum
 
float opacityScaleFactor
 
- Protected Attributes inherited from VAPoR::ParamsBase
string _paramsBaseName
 
int _parseDepth
 

Static Protected Attributes

static const string _leftColorBoundAttr
 
static const string _rightColorBoundAttr
 
static const string _leftOpacityBoundAttr
 
static const string _rightOpacityBoundAttr
 
static const string _opacityCompositionAttr
 
static const string _leftColorBoundTag
 
static const string _rightColorBoundTag
 
static const string _leftOpacityBoundTag
 
static const string _rightOpacityBoundTag
 
static const string _opacityCompositionTag
 
static const string _hsvAttr
 
static const string _positionAttr
 
static const string _opacityAttr
 
static const string _opacityControlPointTag
 
static const string _colorControlPointTag
 
static const string _rgbAttr
 
- Static Protected Attributes inherited from VAPoR::ParamsBase
static vector< ParamsBase * > dummyParamsBaseInstances
 
static const string _emptyString
 
static map< string, int > classIdFromTagMap
 
static map< int, string > tagFromClassIdMap
 
static map< int, BaseCreateFcn > createDefaultFcnMap
 
static int numParamsClasses
 
static int numEmbedClasses
 
- Static Protected Attributes inherited from VAPoR::ParsedXml
static const string _stringType
 
static const string _longType
 
static const string _doubleType
 
static const string _typeAttr
 

Additional Inherited Members

- Public Attributes inherited from VAPoR::ParsedXml
ParsedXmlpreviousClass
 

Detailed Description

Definition at line 36 of file MapperFunctionBase.h.

Member Enumeration Documentation

Enumerator
ADDITION 
MULTIPLICATION 

Definition at line 101 of file MapperFunctionBase.h.

Constructor & Destructor Documentation

VAPoR::MapperFunctionBase::MapperFunctionBase ( const string &  name)
VAPoR::MapperFunctionBase::MapperFunctionBase ( int  nBits,
const string &  name 
)
VAPoR::MapperFunctionBase::MapperFunctionBase ( const MapperFunctionBase mapper)
virtual VAPoR::MapperFunctionBase::~MapperFunctionBase ( )
virtual

Member Function Documentation

virtual ParamNode* VAPoR::MapperFunctionBase::buildNode ( )
virtual

Method to build an xml node from state. This only needs to be implemented if the state of the ParamsBase is not specified by the root ParamNode

Return values
nodeParamNode representing the current ParamsBase instance

Reimplemented from VAPoR::ParamsBase.

Reimplemented in VAPoR::IsoControl, and VAPoR::TransferFunction.

TFInterpolator::type VAPoR::MapperFunctionBase::colorInterpType ( )
inline

Definition at line 191 of file MapperFunctionBase.h.

virtual OpacityMapBase* VAPoR::MapperFunctionBase::createOpacityMap ( OpacityMapBase::Type  type = OpacityMapBase::CONTROL_POINT)
virtual
void VAPoR::MapperFunctionBase::deleteOpacityMap ( OpacityMapBase *  omap)
virtual bool VAPoR::MapperFunctionBase::elementEndHandler ( ExpatParseMgr ,
int  ,
std::string &   
)
virtual

Implements VAPoR::ParsedXml.

Reimplemented in VAPoR::IsoControl, and VAPoR::TransferFunction.

virtual bool VAPoR::MapperFunctionBase::elementStartHandler ( ExpatParseMgr ,
int  depth,
std::string &  ,
const char **   
)
virtual

Implements VAPoR::ParsedXml.

Reimplemented in VAPoR::IsoControl, and VAPoR::TransferFunction.

virtual ColorMapBase* VAPoR::MapperFunctionBase::getColormap ( ) const
virtual
int VAPoR::MapperFunctionBase::getColorVarNum ( )
inline

Definition at line 75 of file MapperFunctionBase.h.

float VAPoR::MapperFunctionBase::getMaxMapValue ( )
inline

Definition at line 69 of file MapperFunctionBase.h.

float VAPoR::MapperFunctionBase::getMinMapValue ( )
inline

Definition at line 68 of file MapperFunctionBase.h.

std::string VAPoR::MapperFunctionBase::getName ( )
inline

Definition at line 187 of file MapperFunctionBase.h.

int VAPoR::MapperFunctionBase::getNumEntries ( )
inline

Definition at line 126 of file MapperFunctionBase.h.

int VAPoR::MapperFunctionBase::getNumOpacityMaps ( ) const
inline

Definition at line 90 of file MapperFunctionBase.h.

CompositionType VAPoR::MapperFunctionBase::getOpacityComposition ( )
inline

Definition at line 108 of file MapperFunctionBase.h.

virtual OpacityMapBase* VAPoR::MapperFunctionBase::getOpacityMap ( int  index) const
virtual
float VAPoR::MapperFunctionBase::getOpacityScaleFactor ( )
inline

Definition at line 96 of file MapperFunctionBase.h.

int VAPoR::MapperFunctionBase::getOpacVarNum ( )
inline

Definition at line 76 of file MapperFunctionBase.h.

static void VAPoR::MapperFunctionBase::hsvToRgb ( float *  hsv,
float *  rgb 
)
static
void VAPoR::MapperFunctionBase::hsvValue ( float  point,
float *  h,
float *  sat,
float *  val 
)
virtual void VAPoR::MapperFunctionBase::init ( )
protectedvirtual

Reimplemented in VAPoR::TransferFunction.

bool VAPoR::MapperFunctionBase::isOpaque ( )
void VAPoR::MapperFunctionBase::makeLut ( float *  clut)
float VAPoR::MapperFunctionBase::mapColorIndexToFloat ( int  indx)
inline

Definition at line 144 of file MapperFunctionBase.h.

int VAPoR::MapperFunctionBase::mapFloatToColorIndex ( float  point)
inline

Definition at line 133 of file MapperFunctionBase.h.

int VAPoR::MapperFunctionBase::mapFloatToOpacIndex ( float  point)
inline

Definition at line 152 of file MapperFunctionBase.h.

float VAPoR::MapperFunctionBase::mapOpacIndexToFloat ( int  indx)
inline

Definition at line 162 of file MapperFunctionBase.h.

static int VAPoR::MapperFunctionBase::mapPosition ( float  x,
float  minValue,
float  maxValue,
int  hSize 
)
static
float VAPoR::MapperFunctionBase::opacityValue ( float  point)
static void VAPoR::MapperFunctionBase::rgbToHsv ( float *  rgb,
float *  hsv 
)
static
void VAPoR::MapperFunctionBase::setColorInterpType ( TFInterpolator::type  t)
inline

Definition at line 195 of file MapperFunctionBase.h.

virtual void VAPoR::MapperFunctionBase::setColorVarNum ( int  var)
inlinevirtual

Definition at line 79 of file MapperFunctionBase.h.

void VAPoR::MapperFunctionBase::setMaxMapValue ( float  val)
inline

Definition at line 67 of file MapperFunctionBase.h.

void VAPoR::MapperFunctionBase::setMinMapValue ( float  val)
inline

Definition at line 66 of file MapperFunctionBase.h.

void VAPoR::MapperFunctionBase::setNumEntries ( int  val)
inline

Definition at line 127 of file MapperFunctionBase.h.

void VAPoR::MapperFunctionBase::setOpacityComposition ( CompositionType  t)
inline

Definition at line 107 of file MapperFunctionBase.h.

void VAPoR::MapperFunctionBase::setOpacityScaleFactor ( float  val)
inline

Definition at line 95 of file MapperFunctionBase.h.

virtual void VAPoR::MapperFunctionBase::setOpacVarNum ( int  var)
inlinevirtual

Definition at line 80 of file MapperFunctionBase.h.

void VAPoR::MapperFunctionBase::setOpaque ( )
virtual void VAPoR::MapperFunctionBase::setVarNum ( int  var)
inlinevirtual

Reimplemented in VAPoR::TransferFunction.

Definition at line 78 of file MapperFunctionBase.h.

Member Data Documentation

const string VAPoR::MapperFunctionBase::_colorControlPointTag
staticprotected

Definition at line 232 of file MapperFunctionBase.h.

ColorMapBase* VAPoR::MapperFunctionBase::_colormap
protected

Definition at line 213 of file MapperFunctionBase.h.

CompositionType VAPoR::MapperFunctionBase::_compType
protected

Definition at line 211 of file MapperFunctionBase.h.

const string VAPoR::MapperFunctionBase::_hsvAttr
staticprotected

Definition at line 228 of file MapperFunctionBase.h.

const string VAPoR::MapperFunctionBase::_leftColorBoundAttr
staticprotected

Definition at line 217 of file MapperFunctionBase.h.

const string VAPoR::MapperFunctionBase::_leftColorBoundTag
staticprotected

Definition at line 223 of file MapperFunctionBase.h.

const string VAPoR::MapperFunctionBase::_leftOpacityBoundAttr
staticprotected

Definition at line 219 of file MapperFunctionBase.h.

const string VAPoR::MapperFunctionBase::_leftOpacityBoundTag
staticprotected

Definition at line 225 of file MapperFunctionBase.h.

const string VAPoR::MapperFunctionBase::_mapperFunctionTag
static

Definition at line 190 of file MapperFunctionBase.h.

const string VAPoR::MapperFunctionBase::_opacityAttr
staticprotected

Definition at line 230 of file MapperFunctionBase.h.

const string VAPoR::MapperFunctionBase::_opacityCompositionAttr
staticprotected

Definition at line 221 of file MapperFunctionBase.h.

const string VAPoR::MapperFunctionBase::_opacityCompositionTag
staticprotected

Definition at line 227 of file MapperFunctionBase.h.

const string VAPoR::MapperFunctionBase::_opacityControlPointTag
staticprotected

Definition at line 231 of file MapperFunctionBase.h.

vector<OpacityMapBase*> VAPoR::MapperFunctionBase::_opacityMaps
protected

Definition at line 210 of file MapperFunctionBase.h.

const string VAPoR::MapperFunctionBase::_positionAttr
staticprotected

Definition at line 229 of file MapperFunctionBase.h.

const string VAPoR::MapperFunctionBase::_rgbAttr
staticprotected

Definition at line 235 of file MapperFunctionBase.h.

const string VAPoR::MapperFunctionBase::_rightColorBoundAttr
staticprotected

Definition at line 218 of file MapperFunctionBase.h.

const string VAPoR::MapperFunctionBase::_rightColorBoundTag
staticprotected

Definition at line 224 of file MapperFunctionBase.h.

const string VAPoR::MapperFunctionBase::_rightOpacityBoundAttr
staticprotected

Definition at line 220 of file MapperFunctionBase.h.

const string VAPoR::MapperFunctionBase::_rightOpacityBoundTag
staticprotected

Definition at line 226 of file MapperFunctionBase.h.

int VAPoR::MapperFunctionBase::colorVarNum
protected

Definition at line 262 of file MapperFunctionBase.h.

string VAPoR::MapperFunctionBase::mapperName
protected

Definition at line 257 of file MapperFunctionBase.h.

float VAPoR::MapperFunctionBase::maxMapBound
protected

Definition at line 240 of file MapperFunctionBase.h.

float VAPoR::MapperFunctionBase::minMapBound
protected

Definition at line 240 of file MapperFunctionBase.h.

int VAPoR::MapperFunctionBase::numEntries
protected

Definition at line 252 of file MapperFunctionBase.h.

float VAPoR::MapperFunctionBase::opacityScaleFactor
protected

Definition at line 268 of file MapperFunctionBase.h.

int VAPoR::MapperFunctionBase::opacVarNum
protected

Definition at line 263 of file MapperFunctionBase.h.


The documentation for this class was generated from the following file: