VAPoR  3.0.0
Public Member Functions | Static Public Member Functions | List of all members
VAPoR::IsolineParams Class Reference

Class that supports rendering of contour lines (isolines) More...

#include <isolineparams.h>

Inheritance diagram for VAPoR::IsolineParams:
VAPoR::RenderParams VAPoR::Params VetsUtil::MyBase VAPoR::ParamsBase

Public Member Functions

 IsolineParams (XmlNode *parent, int winnum)
 
const std::string getShortName ()
 Required virtual method provides a short name for use in the gui. More...
 
virtual ~IsolineParams ()
 Destructor currently does nothing. More...
 
virtual void restart ()
 Required virtual method sets all values to default. More...
 
virtual BoxGetBox ()
 
virtual void Validate (int type)
 
virtual bool IsOpaque ()
 
virtual bool usingVariable (const std::string &varname)
 
void setSelectedPointLocal (const double point[3])
 
virtual const double * getSelectedPointLocal ()
 
const vector< double > GetIsolineLocalExtents ()
 
void GetLocalExtents (double exts[6])
 
void SetLocalExtents (const vector< double > &exts)
 
float GetLineThickness ()
 
void SetLineThickness (double val)
 
float GetPanelLineThickness ()
 
void SetPanelLineThickness (double val)
 
float GetTextSize ()
 
void SetTextSize (double val)
 
float GetTextDensity ()
 
void SetTextDensity (double val)
 
bool textEnabled ()
 
void SetTextEnabled (bool val)
 
bool UseSingleColor ()
 
void SetUseSingleColor (bool val)
 
void SetSingleColor (double clr[3])
 
const vector< double > GetSingleColor ()
 
void SetPanelBackgroundColor (const float rgb[3])
 
const vector< double > GetPanelBackgroundColor ()
 
void getLineColor (int isoNum, float lineColor[3])
 
int getNumIsovalues ()
 
int GetNumVariables3D ()
 
int GetNumVariables2D ()
 
IsoControl * GetIsoControl ()
 
IsoControl * GetIsoControl (string varname, bool is3D)
 
int SetIsoControl (const string varname, IsoControl *iControl, bool is3D)
 
virtual MapperFunction * GetMapperFunc ()
 
vector< double > GetIsovalues ()
 
void SetIsovalues (const vector< double > &values)
 
void SetTextLabelType (int val)
 
int GetTextLabelType ()
 
void SetNumDigits (int val)
 
int GetNumDigits ()
 
void SetHistoBounds (const float bnds[2])
 
void GetHistoBounds (float bounds[2])
 
virtual void hookupTF (TransferFunction *, int)
 Method needed when loading transfer function from file. Not yet available. More...
 
void spaceIsovals (float miniso, float spacing)
 
- Public Member Functions inherited from VAPoR::RenderParams
virtual bool IsEnabled ()
 
virtual void SetEnabled (bool val)
 
virtual void SetVariableName (string varName)
 
const string GetVariableName ()
 
const string GetFirstVariableName ()
 
virtual void SetFieldVariableNames (vector< string > varNames)
 
const vector< string > GetFieldVariableNames ()
 
bool IsTerrainMapped ()
 
int SetTerrainMapped (bool val)
 
virtual void SetRendererName (const string &renName)
 
virtual const string GetRendererName ()
 
virtual int SetRefinementLevel (int numrefinements)
 
virtual int GetRefinementLevel ()
 
virtual int GetCompressionLevel ()
 
virtual int SetCompressionLevel (int val)
 
void setBypass (int timestep)
 
void setPartialBypass (int timestep)
 
void setAllBypass (bool val)
 
bool doBypass (int ts)
 
bool doAlwaysBypass (int ts)
 
virtual int GetFidelityLevel ()
 
virtual void SetFidelityLevel (int level)
 
virtual bool GetIgnoreFidelity ()
 
virtual void SetIgnoreFidelity (bool val)
 
void SetFidelityToDefaults ()
 
void SetHistoStretch (float factor)
 
float GetHistoStretch ()
 
double getMinEditBound ()
 
double getMaxEditBound ()
 
void setMinEditBound (double val)
 
void setMaxEditBound (double val)
 
void SetEditBounds (vector< double >bounds)
 
void SetCursorCoords (const vector< double > &coords)
 
const vector< double > GetCursorCoords ()
 
virtual int SetVariables3D (bool val)
 
virtual bool VariablesAre3D ()
 
const vector< long > GetGrid ()
 
int SetGrid (const int grid[3])
 
int AlignGridToData (bool val)
 
bool IsAlignedToData ()
 
const vector< long > GetGridAlignStrides ()
 
int SetGridAlignStrides (const vector< long > &strides)
 
void getDataAlignment (double rakeExts[6], int rakeGrid[3], size_t timestep)
 
virtual int SetHeightVariableName (const string &varName)
 
virtual const string GetHeightVariableName ()
 
 RenderParams (XmlNode *parent, const string &name, int winnum)
 
- Public Member Functions inherited from VAPoR::Params
 Params (const Params &p)
 Default copy constructor. More...
 
virtual ~Params ()
 
bool isRenderParams () const
 
bool isBasicParams () const
 
virtual int GetVizNum ()
 
virtual int SetLocal (bool lg)
 
virtual bool IsLocal ()
 
 Params (XmlNode *parent, const string &name, int winNum)
 
 Params (int winNum, const string &name)
 Deprecated constructor, needed for built-in classes that do not have associated XML node: More...
 
virtual int GetInstanceIndex ()
 
virtual void SetVizNum (int vnum)
 
- Public Member Functions inherited from VetsUtil::MyBase
 MyBase ()
 
const string & getClassName () const
 
- 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 ()
 destructor..destroys the xml tree based at the root node. More...
 
ParamNodeGetRootNode () const
 
const string GetName () const
 
virtual long GetValueLong (const string &tag, const vector< long > &defaultVal=_emptyLongVec)
 
virtual double GetValueDouble (const string &tag, const vector< double > &defaultVal=_emptyDoubleVec)
 
virtual const string GetValueString (const string &tag, const string &defaultVal=_emptyString)
 
virtual const vector< long > GetValueLongVec (const string &tag, const vector< long > &defaultVal=_emptyLongVec)
 
virtual const vector< double > GetValueDoubleVec (const string &tag, const vector< double > &defaultVal=_emptyDoubleVec)
 
virtual void GetValueStringVec (const string &tag, vector< string > &vec, const vector< string > &defaultVal=_emptyStringVec)
 
virtual int SetValueLong (string tag, const char *description, long value, Params *p)
 
virtual int SetValueLong (string tag, const char *description, const vector< long > &value, Params *p)
 
virtual int SetValueDouble (string tag, const char *description, double value, Params *p)
 
virtual int SetValueDouble (string tag, const char *description, const vector< double > &value, Params *p)
 
virtual int SetValueString (string tag, const char *description, const string &value, Params *p)
 
virtual int SetValueStringVec (string tag, const char *description, const vector< string > &value, Params *p)
 
ParamsBaseType GetParamsBaseTypeId ()
 
virtual void SetRootParamNode (ParamNode *pn)
 
ParamsBaseGetParamsBase (const vector< string > &path) const
 
int SetParamsBase (const vector< string > &path, ParamsBase *pbase)
 
int RemoveParamsBase (const vector< string > &path, ParamsBase *pbase)
 
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)
 
virtual ParamNodebuildNode ()
 
ParamNodeGetCurrentNode ()
 
ParamNodePush (string &tag, ParamsBase *pBase=0)
 
ParamNodePop ()
 
void Remove (const string &name)
 
const map< string, string > & GetAttributes ()
 
void Clear ()
 

Static Public Member Functions

static ParamsBaseCreateDefaultInstance ()
 Required static creation method. More...
 
- Static Public Member Functions inherited from VAPoR::RenderParams
static void InsertParamsInstance (int pType, int winnum, int posn, RenderParams *dp)
 
- Static Public Member Functions inherited from VAPoR::Params
static bool IsRenderingEnabled (int winnum)
 
static int GetCurrentParamsInstanceIndex (int pType, int winnum)
 
static int GetCurrentParamsInstanceIndex (const std::string tag, int winnum)
 
static void SetCurrentParamsInstanceIndex (int pType, int winnum, int instance)
 
static ParamsGetParamsInstance (int pType, int winnum=-1, int instance=-1)
 
static ParamsGetParamsInstance (const std::string tag, int winnum=-1, int instance=-1)
 
static ParamsGetCurrentParamsInstance (int pType, int winnum)
 
static ParamsGetDefaultParams (ParamsBase::ParamsBaseType pType)
 
static ParamsGetDefaultParams (const string &tag)
 
static void SetDefaultParams (int pType, Params *p)
 
static void SetDefaultParams (const string &tag, Params *p)
 
static ParamsCreateDefaultParams (int pType)
 
static int GetNumParamsInstances (int pType, int winnum)
 
static int GetNumParamsInstances (const std::string tag, int winnum)
 
static void AppendParamsInstance (int pType, int winnum, Params *p)
 
static void AppendParamsInstance (const std::string tag, int winnum, Params *p)
 
static void RemoveParamsInstance (int pType, int winnum, int instance)
 
static vector< Params * > & GetAllParamsInstances (int pType, int winnum)
 
static int GetAllParamsInstances (string tag, vector< Params * > &)
 
static int DeleteVisualizer (int viznum)
 
static vector< Params * > & GetAllParamsInstances (const std::string tag, int winnum)
 
static map< int, vector< Params * > > * cloneAllParamsInstances (int winnum)
 
static vector< Params * > * cloneAllDefaultParams ()
 
- Static Public Member Functions inherited from VetsUtil::MyBase
static void SetErrMsg (const char *format,...)
 Record a formatted error message. More...
 
static void SetErrMsg (int errcode, const char *format,...)
 Record a formatted error message and an error code. More...
 
static const char * GetErrMsg ()
 
static void SetErrCode (int err_code)
 Record an error code. More...
 
static int GetErrCode ()
 Retrieve the current error code. More...
 
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. More...
 
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 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 int GetNumBasicParamsClasses ()
 
static bool IsParamsTag (const string &tag)
 

Additional Inherited Members

- Public Types inherited from VetsUtil::MyBase
typedef void(* ErrMsgCB_T) (const char *msg, int err_code)
 
typedef void(* DiagMsgCB_T) (const char *msg)
 
- Public Types inherited from VAPoR::ParamsBase
typedef int ParamsBaseType
 
- Static Public Attributes inherited from VetsUtil::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
 
- Protected Member Functions inherited from VAPoR::Params
virtual int SetValueLong (string tag, const char *description, long value)
 
virtual int SetValueLong (string tag, const char *description, const vector< long > &value)
 
virtual int SetValueDouble (string tag, const char *description, double value)
 
virtual int SetValueDouble (string tag, const char *description, const vector< double > &value)
 
virtual int SetValueString (string tag, const char *description, const string &value)
 
virtual int SetValueStringVec (string tag, const char *description, const vector< string > &value)
 
- Protected Member Functions inherited from VetsUtil::MyBase
void SetClassName (const string &name)
 

Detailed Description

Class that supports rendering of contour lines (isolines)

Author
Alan Norton
Version
3.0
Date
June 2015

Definition at line 17 of file isolineparams.h.

Constructor & Destructor Documentation

VAPoR::IsolineParams::IsolineParams ( XmlNode *  parent,
int  winnum 
)
virtual VAPoR::IsolineParams::~IsolineParams ( )
virtual

Destructor currently does nothing.

Member Function Documentation

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

Required static creation method.

Definition at line 22 of file isolineparams.h.

virtual Box* VAPoR::IsolineParams::GetBox ( )
inlinevirtual

Virtual method needed for all Params with a Box. Returns the Box, from which the extents can be obtained.

Returns
Box associated with the isoline params instance.

Reimplemented from VAPoR::Params.

Definition at line 38 of file isolineparams.h.

References VAPoR::ParamNode::GetNode(), and VAPoR::ParamNode::GetParamsBase().

void VAPoR::IsolineParams::GetHistoBounds ( float  bounds[2])
inline

Obtain the histogram bounds, which are also the IsoControl bounds

Parameters
[out]bounds[2],i.e.min and max bounds

Definition at line 293 of file isolineparams.h.

IsoControl* VAPoR::IsolineParams::GetIsoControl ( )
inline

Obtain the IsoControl instance currently used for color-mapping the isovalues

Returns
current IsoControl*

Definition at line 211 of file isolineparams.h.

IsoControl* VAPoR::IsolineParams::GetIsoControl ( string  varname,
bool  is3D 
)
inline

Obtain the IsoControl instance used for color-mapping a variable

Parameters
[in]varnamevariable name
[in]is3Dtrue if variable is 3D
Returns
associated IsoControl*

Definition at line 225 of file isolineparams.h.

const vector<double> VAPoR::IsolineParams::GetIsolineLocalExtents ( )
inline

Obtain the local extents (box extents) of the isolines

Returns
local box extents as a 6-vector of doubles

Definition at line 91 of file isolineparams.h.

vector<double> VAPoR::IsolineParams::GetIsovalues ( )
inline

Obtain the set of isovalues to be used for contour plot

Returns
values vector of values being used

Definition at line 249 of file isolineparams.h.

void VAPoR::IsolineParams::getLineColor ( int  isoNum,
float  lineColor[3] 
)

Determine the color of a specific contour line

Parameters
[in]isoNumindex of isovalue
[out]lineColorcolor of the isoline.
float VAPoR::IsolineParams::GetLineThickness ( )
inline

Determine the isoline thickness measured in pixels in the 3D scene

Returns
thickness measured in pixels

Definition at line 107 of file isolineparams.h.

void VAPoR::IsolineParams::GetLocalExtents ( double  exts[6])
inline

Obtain the local extents (box extents) of the isolines

Parameters
[out]extslocal box extents as an array of 6 doubles

Definition at line 96 of file isolineparams.h.

virtual MapperFunction* VAPoR::IsolineParams::GetMapperFunc ( )
inlinevirtual

Required virtual method needed for all params with color mapping

Returns
current IsoControl, cast to a MapperFunction

Reimplemented from VAPoR::RenderParams.

Definition at line 244 of file isolineparams.h.

int VAPoR::IsolineParams::GetNumDigits ( )
inline

Obtain the number of digits that are displayed in text annotation of the contours

Returns
number of digits to be displayed

Definition at line 275 of file isolineparams.h.

int VAPoR::IsolineParams::getNumIsovalues ( )
inline

Determine how many different isovalues are being used

Returns
number of isovalues

Definition at line 197 of file isolineparams.h.

int VAPoR::IsolineParams::GetNumVariables2D ( )

Determine the number of 2D variables available in this isoline params

Returns
number of 2D variables
int VAPoR::IsolineParams::GetNumVariables3D ( )

Determine the number of 3D variables available in this isoline params

Returns
number of 3D variables
const vector<double> VAPoR::IsolineParams::GetPanelBackgroundColor ( )

Obtain the current background color behind the contours in the image in the GUI.

See also
SetPanelBackgroundColor()
Returns
(RGB) triple as a double vector
float VAPoR::IsolineParams::GetPanelLineThickness ( )
inline

Determine the isoline thickness in pixels in the 2D image panel

Returns
thickness measured in pixels

Definition at line 117 of file isolineparams.h.

virtual const double* VAPoR::IsolineParams::getSelectedPointLocal ( )
inlinevirtual

Obtain the currently selected point

See also
setSelectedPointLocal()
Returns
selected point in local user coordinates

Definition at line 85 of file isolineparams.h.

const std::string VAPoR::IsolineParams::getShortName ( )
inlinevirtual

Required virtual method provides a short name for use in the gui.

Implements VAPoR::Params.

Definition at line 27 of file isolineparams.h.

const vector<double> VAPoR::IsolineParams::GetSingleColor ( )
inline

Obtain the current constant color as a triple of doubles

See also
SetSingleColor()
Returns
single color as RGB triple.

Definition at line 178 of file isolineparams.h.

float VAPoR::IsolineParams::GetTextDensity ( )
inline

Obtain the current text density setting. When the density is 0, no text is provided. When density is 1, annotation is at every point. Default density is 0.25

Returns
density value

Definition at line 139 of file isolineparams.h.

int VAPoR::IsolineParams::GetTextLabelType ( )
inline

Obtain the annotation type. 0 is billboard, 1 is planar aligned, 2 is 3D in-scene

Returns
value of annotation type: 0, 1, or 2

Definition at line 265 of file isolineparams.h.

float VAPoR::IsolineParams::GetTextSize ( )
inline

Obtain the current text size (point size)

Returns
point size of text.

Definition at line 127 of file isolineparams.h.

virtual void VAPoR::IsolineParams::hookupTF ( TransferFunction *  ,
int   
)
virtual

Method needed when loading transfer function from file. Not yet available.

virtual bool VAPoR::IsolineParams::IsOpaque ( )
inlinevirtual

Virtual method indicates that the geometry is (always) opaque Transparency is not supported.

Returns
true

Implements VAPoR::RenderParams.

Definition at line 65 of file isolineparams.h.

virtual void VAPoR::IsolineParams::restart ( )
virtual

Required virtual method sets all values to default.

Implements VAPoR::Params.

void VAPoR::IsolineParams::SetHistoBounds ( const float  bnds[2])
inline

Specify the bounds to be used for histogram and IsoControl

Parameters
[in]bndsmin and max bounds

Definition at line 280 of file isolineparams.h.

int VAPoR::IsolineParams::SetIsoControl ( const string  varname,
IsoControl *  iControl,
bool  is3D 
)

Specify the IsoControl instance used for color-mapping a variable

Parameters
[in]varnamevariable name
[in]iControlis the IsoControl specified
[in]is3Dindicates if variable is 3D
Returns
zero if successful
void VAPoR::IsolineParams::SetIsovalues ( const vector< double > &  values)
inline

Specify the set of isovalues to be used for contour plot

Parameters
[in]valuesvector of values being used

Definition at line 254 of file isolineparams.h.

void VAPoR::IsolineParams::SetLineThickness ( double  val)
inline

Specify the line thickness in pixels in the 3D scene

Parameters
valis the new thickness value

Definition at line 112 of file isolineparams.h.

void VAPoR::IsolineParams::SetLocalExtents ( const vector< double > &  exts)
inline

Set the local box extents

Parameters
[in]extsthe newly specified box extents

Definition at line 101 of file isolineparams.h.

void VAPoR::IsolineParams::SetNumDigits ( int  val)
inline

Specify the number of digits that will be displayed in text annotation of the contours

Parameters
[in]valis number of digits to be displayed

Definition at line 270 of file isolineparams.h.

void VAPoR::IsolineParams::SetPanelBackgroundColor ( const float  rgb[3])

Set the color that will be used as background behind the contours in the image in the GUI

Parameters
[in]rgbis (R,G,B) triple of values between 0 and 1.
void VAPoR::IsolineParams::SetPanelLineThickness ( double  val)
inline

Specify the isoline thickness in pixels in the 2D image panel

Parameters
[in]valis thickness in pixels

Definition at line 122 of file isolineparams.h.

void VAPoR::IsolineParams::setSelectedPointLocal ( const double  point[3])
inline

Specify the selected point (in local user coordinates) This point will be shown with cross-hairs in the visualizer and image

Parameters
[in]pointis the selected point

Definition at line 79 of file isolineparams.h.

void VAPoR::IsolineParams::SetSingleColor ( double  clr[3])
inline

Specify the color that will be used as the constant color.

Parameters
[in]clr(R,G,B) values between 0 and 1.

Definition at line 170 of file isolineparams.h.

void VAPoR::IsolineParams::SetTextDensity ( double  val)
inline

Specify the text density setting.

See also
GetTextDensity()
Parameters
[in]valis density value

Definition at line 145 of file isolineparams.h.

void VAPoR::IsolineParams::SetTextEnabled ( bool  val)
inline

Specify whether text is to be enabled

Parameters
[in]val= true if enabled.

Definition at line 155 of file isolineparams.h.

void VAPoR::IsolineParams::SetTextLabelType ( int  val)
inline

Specify the annotation type. 0 is billboard, 1 is planar aligned, 2 is 3D in-scene

Parameters
[in]valueof annotation type: 0, 1, or 2

Definition at line 260 of file isolineparams.h.

void VAPoR::IsolineParams::SetTextSize ( double  val)
inline

Specify the current text size (point size)

Parameters
[in]valis text size in points

Definition at line 132 of file isolineparams.h.

void VAPoR::IsolineParams::SetUseSingleColor ( bool  val)
inline

Turn on or off the use of single constant color (versus color map)

Parameters
[in]valtrue will enable constant color

Definition at line 165 of file isolineparams.h.

void VAPoR::IsolineParams::spaceIsovals ( float  miniso,
float  spacing 
)

Space the isovalues to specified minimum and spacing

Parameters
[in]minisois minimum isovalue
[in]spacinginterval between adjacent isovalues
bool VAPoR::IsolineParams::textEnabled ( )
inline

Indicate whether text annotation is enabled

Returns
true if enabled.

Definition at line 150 of file isolineparams.h.

bool VAPoR::IsolineParams::UseSingleColor ( )
inline

Indicate if single (constant) color is being used

Returns
true if constant single color is used

Definition at line 160 of file isolineparams.h.

virtual bool VAPoR::IsolineParams::usingVariable ( const std::string &  varname)
inlinevirtual

Required virtual method. Determine if the specified variable is being used

Parameters
[in]varnamename of variable to be checked
Returns
true if the variable is being used.

Implements VAPoR::RenderParams.

Definition at line 71 of file isolineparams.h.

virtual void VAPoR::IsolineParams::Validate ( int  type)
virtual

Reinitialize the object for a new dataset. Pure virtual method required of Params

Parameters
[in]typeis 0, 1, or 2. Zero sets all values to defaults, 1 ensures values are consistent with a new DataMgr. When value is 2, the DataMgr has not changed, but some values may need to be checked for validity.

Implements VAPoR::Params.


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