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

#include <transferfunction.h>

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

Public Member Functions

 TransferFunction ()
 
 TransferFunction (RenderParams *p, int nBits=8)
 
 TransferFunction (const MapperFunctionBase &mapper)
 
 TransferFunction (const ParamsBase *parent)
 
virtual ~TransferFunction ()
 
int mapFloatToIndex (float f)
 
float mapIndexToFloat (int indx)
 
void setVarNum (int var)
 
bool saveToFile (ofstream &f)
 
virtual ParamNodebuildNode (const string &tfname)
 
virtual ParamNodebuildNode ()
 
bool elementStartHandler (ExpatParseMgr *, int depth, std::string &s, const char **attr)
 
bool elementEndHandler (ExpatParseMgr *, int, std::string &)
 
virtual void hookup (RenderParams *p, int cvar, int ovar)
 
virtual TransferFunctiondeepCopy (ParamNode *newRoot=0)
 
- Public Member Functions inherited from VAPoR::MapperFunction
 MapperFunction ()
 
 MapperFunction (const string &tag)
 
 MapperFunction (RenderParams *p, int nBits=8)
 
 MapperFunction (const MapperFunction &mapper)
 
 MapperFunction (const MapperFunctionBase &mapper)
 
virtual ~MapperFunction ()
 
void setParams (RenderParams *p)
 
RenderParamsgetParams ()
 
QRgb colorValue (float point)
 
virtual OpacityMap * createOpacityMap (OpacityMap::Type type=OpacityMap::CONTROL_POINT)
 
virtual OpacityMap * getOpacityMap (int index)
 
virtual VColormap * getColormap ()
 
- Public Member Functions inherited from VAPoR::MapperFunctionBase
 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 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)
 
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 ()
 
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 ParamsBaseCreateDefaultInstance ()
 
static TransferFunctionloadFromFile (ifstream &is, RenderParams *p)
 
- Static Public Member Functions inherited from VAPoR::MapperFunction
static ParamsBaseCreateDefaultInstance ()
 
- Static Public Member Functions inherited from VAPoR::MapperFunctionBase
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 _transferFunctionTag
 
- Static Public Attributes inherited from VAPoR::MapperFunctionBase
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 ()
 

Static Protected Attributes

static const string _tfNameAttr
 
static const string _leftBoundAttr
 
static const string _rightBoundAttr
 
static const string _leftBoundTag
 
static const string _rightBoundTag
 
static const string _tfNameTag
 
- Static Protected Attributes inherited from VAPoR::MapperFunctionBase
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 Types inherited from VAPoR::MapperFunctionBase
enum  CompositionType { ADDITION = 0, MULTIPLICATION = 1 }
 
- Public Types inherited from VAPoR::ParamsBase
typedef int ParamsBaseType
 
- Public Attributes inherited from VAPoR::ParsedXml
ParsedXmlpreviousClass
 
- Protected Attributes inherited from VAPoR::MapperFunction
RenderParams_params
 
- Protected Attributes inherited from VAPoR::MapperFunctionBase
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
 

Detailed Description

Definition at line 40 of file transferfunction.h.

Constructor & Destructor Documentation

VAPoR::TransferFunction::TransferFunction ( )
VAPoR::TransferFunction::TransferFunction ( RenderParams p,
int  nBits = 8 
)
VAPoR::TransferFunction::TransferFunction ( const MapperFunctionBase mapper)
VAPoR::TransferFunction::TransferFunction ( const ParamsBase parent)
virtual VAPoR::TransferFunction::~TransferFunction ( )
virtual

Member Function Documentation

virtual ParamNode* VAPoR::TransferFunction::buildNode ( const string &  tfname)
virtual
virtual ParamNode* VAPoR::TransferFunction::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::MapperFunctionBase.

static ParamsBase* VAPoR::TransferFunction::CreateDefaultInstance ( )
inlinestatic

Definition at line 50 of file transferfunction.h.

virtual TransferFunction* VAPoR::TransferFunction::deepCopy ( ParamNode newRoot = 0)
inlinevirtual

Make a copy of a ParamBase that optionally uses specified clone of the ParamNode as its root node. If the root is null, the copy ignores any ParamNodes. The default implementation is sufficient for ParamsBase classes that are built from a ParamNode hierarchy.

Parameters
[in]newRootRoot of cloned ParamsBase instance
Return values
instancePointer to cloned instance

Reimplemented from VAPoR::MapperFunction.

Definition at line 88 of file transferfunction.h.

References VAPoR::ParamsBase::SetRootParamNode().

bool VAPoR::TransferFunction::elementEndHandler ( ExpatParseMgr ,
int  ,
std::string &   
)
virtual

Reimplemented from VAPoR::MapperFunctionBase.

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

Reimplemented from VAPoR::MapperFunctionBase.

virtual void VAPoR::TransferFunction::hookup ( RenderParams p,
int  cvar,
int  ovar 
)
inlinevirtual

Definition at line 81 of file transferfunction.h.

virtual void VAPoR::TransferFunction::init ( )
protectedvirtual

Reimplemented from VAPoR::MapperFunctionBase.

static TransferFunction* VAPoR::TransferFunction::loadFromFile ( ifstream &  is,
RenderParams p 
)
static
int VAPoR::TransferFunction::mapFloatToIndex ( float  f)
inline

Definition at line 58 of file transferfunction.h.

float VAPoR::TransferFunction::mapIndexToFloat ( int  indx)
inline

Definition at line 59 of file transferfunction.h.

bool VAPoR::TransferFunction::saveToFile ( ofstream &  f)
void VAPoR::TransferFunction::setVarNum ( int  var)
inlinevirtual

Reimplemented from VAPoR::MapperFunctionBase.

Definition at line 61 of file transferfunction.h.

Member Data Documentation

const string VAPoR::TransferFunction::_leftBoundAttr
staticprotected

Definition at line 108 of file transferfunction.h.

const string VAPoR::TransferFunction::_leftBoundTag
staticprotected

Definition at line 110 of file transferfunction.h.

const string VAPoR::TransferFunction::_rightBoundAttr
staticprotected

Definition at line 109 of file transferfunction.h.

const string VAPoR::TransferFunction::_rightBoundTag
staticprotected

Definition at line 111 of file transferfunction.h.

const string VAPoR::TransferFunction::_tfNameAttr
staticprotected

Definition at line 107 of file transferfunction.h.

const string VAPoR::TransferFunction::_tfNameTag
staticprotected

Definition at line 112 of file transferfunction.h.

const string VAPoR::TransferFunction::_transferFunctionTag
static

Definition at line 80 of file transferfunction.h.


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