25 #ifndef TRANSFERFUNCTION_H
26 #define TRANSFERFUNCTION_H
27 #define MAXCONTROLPOINTS 50
28 #include <vapor/tfinterpolator.h>
31 #include <vapor/ExpatParseMgr.h>
62 { setMinOpacMapValue(minVal); setMinColorMapValue(minVal);}
65 { setMaxOpacMapValue(val); setMaxColorMapValue(val); }
73 void setVarNum(
int var) { colorVarNum = var; opacVarNum = var; }
80 bool saveToFile(ofstream& f);
83 virtual ParamNode* buildNode(
const string& tfname);
87 bool elementStartHandler(
ExpatParseMgr*,
int depth , std::string& s,
97 if(_colormap)((VColormap*)_colormap)->setMapper(
this);
98 if(_opacityMaps.size()>0) ((OpacityMap*)_opacityMaps[0])->setMapper(
this);
103 if(newRoot) newRoot->SetParamsBase(tf);
127 #endif //TRANSFERFUNCTION_H
static const string _rightBoundAttr
void setMinMapValue(float minVal)
A Params subclass for managing parameters used by Renderers.
static const string _leftBoundAttr
static const string _leftBoundTag
static const string _transferFunctionTag
virtual void SetRootParamNode(ParamNode *pn)
Nodes with state in Xml tree representation.
static ParamsBase * CreateDefaultInstance()
virtual void hookup(RenderParams *p, int cvar, int ovar)
static const string _tfNameTag
float mapIndexToFloat(int indx)
static const string _tfNameAttr
void setMaxMapValue(float val)
static const string _rightBoundTag
virtual TransferFunction * deepCopy(ParamNode *newRoot=0)
int mapFloatToIndex(float f)