VAPoR
0.1
|
A class for describing the currently loaded dataset. More...
#include <datastatus.h>
Public Member Functions | |
const float * | getLocalExtents () |
const float * | getFullSizes () |
const float * | getFullStretchedSizes () |
const float * | getStretchedExtents () |
size_t | getMinTimestep () |
size_t | getMaxTimestep () |
int | getVDCType () |
bool | dataIsPresent3D (int sesvarnum, int timestep) |
bool | dataIsPresent2D (int sesvarnum, int timestep) |
bool | dataIsPresent3D (int timestep) |
bool | dataIsPresent2D (int timestep) |
bool | dataIsPresent (int timestep) |
bool | dataIsPresent3D () |
bool | dataIsPresent2D () |
double | getDataMax3D (int sesvarNum, int timestep, bool mustGet=true) |
double | getDataMax2D (int sesvarNum, int timestep, bool mustGet=true) |
double | getDataMin3D (int sesvarNum, int timestep, bool mustGet=true) |
double | getDataMin2D (int sesvarNum, int timestep, bool mustGet=true) |
double | getDefaultDataMax3D (int varnum, bool mustGet=true) |
double | getDefaultDataMin3D (int varnum, bool mustGet=true) |
double | getDefaultDataMax2D (int varnum, bool mustGet=true) |
double | getDefaultDataMin2D (int varnum, bool mustGet=true) |
int | maxXFormPresent3D (int sesvarnum, int timestep) |
int | maxXFormPresent2D (int sesvarnum, int timestep) |
int | maxLODPresent3D (int sesvarnum, int timestep) |
int | maxLODPresent2D (int sesvarnum, int timestep) |
int | maxXFormPresent (const string &varname, int timestep) |
int | maxLODPresent (const string &varname, int timestep) |
bool | variableIsPresent3D (int varnum) |
bool | variableIsPresent2D (int varnum) |
bool | fieldDataOK (int refLevel, int lod, int tstep, int varx, int vary, int varz) |
int | getNumTimesteps () |
int | getNumTransforms () |
int | getNumLODs () |
void | setDataMissing3D (int timestep, int refLevel, int lod, int sessionVarNum) |
void | setDataMissing2D (int timestep, int refLevel, int lod, int sessionVarNum) |
int | getActiveVarNum3D (std::string varname) const |
int | getActiveVarNum2D (std::string varname) const |
DataMgr * | getDataMgr () |
void | invalidateDataMgr () |
Invalidate current data manager: More... | |
Static Public Member Functions | |
static DataStatus * | getInstance () |
static bool | checkVarMinMax (MapperFunction *mf, int sesVarNum, bool is3D, bool useDefault, float minmax[2], int ts=0) |
static std::string & | getVariableName3D (int sesvarNum) |
static std::string & | getVariableName2D (int sesvarNum) |
static int | getSessionVariableNum3D (const std::string &str) |
static int | getSessionVariableNum2D (const std::string &str) |
static int | getNumActiveVariables3D () |
static int | getNumActiveVariables2D () |
static int | mapActiveToSessionVarNum3D (int varnum) |
static int | mapActiveToSessionVarNum2D (int varnum) |
static int | mapSessionToActiveVarNum3D (int sesvar) |
static int | mapSessionToActiveVarNum2D (int sesvar) |
static std::string & | getActiveVarName3D (int activevarnum) |
static std::string & | getActiveVarName2D (int activevarnum) |
static bool | warnIfDataMissing () |
static bool | trackMouse () |
static bool | useLowerAccuracy () |
static bool | useQuadInterpolation () |
A class for describing the currently loaded dataset.
The DataStatus class keeps track of available variables, timesteps, resolutions, and data ranges. It is constructed by the Session whenever a new metadata is loaded. It keeps a lazily evaluated value of min/max of each variable for each timestep. Variables can be referenced using the variable name, the session variable num (a numbering all the variables in the session) or by the active variable num. Active variables are all those in the metadata plus all the derived variables, and are a subset of the session variables. Session variables are those that were specified in the session plus those that are derived, and these may not all be available in the metadata. To support using active variables and session variable nums, mappings are provided between active names/nums and session nums, and also between variable names and their 2D and 3D session variable numbers and active variable numbers.
Definition at line 51 of file datastatus.h.
|
static |
Obtain actual min and max of variable at lowest accuracy level Used when the values are actually needed in a mapperFunction
[in] | mf | MapperFunction that will save the values |
[in] | sesVarNum | is session variable num |
[in] | is3D | indicates if variable is 3D |
[out] | minmax | min and max value of variable (may not be the range in MapperFunction) |
[in] | useDefault | indicates that default is OK (first time step, lowest accuracy) |
[in] | ts | time step, ignored if default is true |
|
inline |
Indicates whether any variable exists at a particular timestep.
[in] | int | timestep Time step |
true | if the data exists |
Definition at line 144 of file datastatus.h.
|
inline |
Indicates whether a 2D session variable exists at a particular timestep.
[in] | int | sesvarnum 2D Session variable number |
[in] | int | timestep Time step |
true | if the data exists |
Definition at line 108 of file datastatus.h.
|
inline |
Indicates whether any 2D variable exists at a particular timestep.
[in] | int | timestep Time step |
true | if the data exists |
Definition at line 131 of file datastatus.h.
|
inline |
Indicates whether any 2D variable exists at any timestep.
true | if the data exists |
Definition at line 169 of file datastatus.h.
|
inline |
Indicates whether a 3D session variable exists at a particular timestep.
[in] | int | sesvarnum 3D Session variable number |
[in] | int | timestep Time step |
true | if the data exists |
Definition at line 97 of file datastatus.h.
|
inline |
Indicates whether any 3D variable exists at a particular timestep.
[in] | int | timestep Time step |
true | if the data exists |
Definition at line 118 of file datastatus.h.
|
inline |
Indicates whether any 3D variable exists at any timestep.
true | if the data exists |
Definition at line 160 of file datastatus.h.
bool VAPoR::DataStatus::fieldDataOK | ( | int | refLevel, |
int | lod, | ||
int | tstep, | ||
int | varx, | ||
int | vary, | ||
int | varz | ||
) |
Verify that up to three field variables are present at specified resolution, lod, and timestep. Ignores a variable if varnum is < 0. Accepts lowered refinement level or lod if user has specified use of lower accuracy when requested accuracy is not available.
[in] | int | refLevel is requested refinement level |
[in] | int | LOD is requested LOD level |
[in] | int | varx is session variable number of x component, -1 to ignore |
[in] | int | vary is session variable number of y component, -1 to ignore |
[in] | int | varz is session variable number of z component, -1 to ignore |
true | if the variable exists at resolution and timestep |
|
inlinestatic |
Static method finds the name that corresponds to an active 2D variable num. Should be the same as getting it from the metadata directly, if it's in metadata. If no such index, returns first variable in VDC.
[in] | int | activevarnum active variable number |
std::string | name of variable |
Definition at line 465 of file datastatus.h.
|
inlinestatic |
Static method finds the name that corresponds to an active 3D variable num. Should be the same as getting it from the metadata directly, if it's in metadata. If no such index, returns first variable in VDC.
[in] | int | activevarnum active variable number |
std::string | name of variable |
Definition at line 456 of file datastatus.h.
int VAPoR::DataStatus::getActiveVarNum2D | ( | std::string | varname | ) | const |
Method finds the active variable number associated with a 2D variable name.
[in] | std::string | varname Name of variable |
int | active variable number |
int VAPoR::DataStatus::getActiveVarNum3D | ( | std::string | varname | ) | const |
Method finds the active variable number associated with a 3D variable name.
[in] | std::string | varname Name of variable |
int | active variable number |
double VAPoR::DataStatus::getDataMax2D | ( | int | sesvarNum, |
int | timestep, | ||
bool | mustGet = true |
||
) |
Indicates the largest value of a 2D variable at a timestep. Returns 1 if the data bounds have not yet been calculated, for example, if the variable is derived, the bounds will not be known until the input data has been retrieved and the derived variable has been calculated.
[in] | int | sesvarNum 2D session variable number |
[in] | int | timestep Time Step |
[in] | bool | mustGet indicates that data will be retrieved if max not known |
double | maximum value |
double VAPoR::DataStatus::getDataMax3D | ( | int | sesvarNum, |
int | timestep, | ||
bool | mustGet = true |
||
) |
Indicates the largest value of a 3D variable at a timestep. Returns 1 if the data bounds have not yet been calculated, for example if the variable is derived, the bounds will not be known until the input data has been retrieved and the derived variable has been calculated.
[in] | int | sesvarNum session variable number |
[in] | int | timestep Time Step |
[in] | bool | mustGet indicates that data will be retrieved if max not known |
double | maximum value |
|
inline |
Returns the current data manager (if it exists). Returns null if it does not exist.
DataMgr* | pointer to current Data Manager |
Definition at line 482 of file datastatus.h.
double VAPoR::DataStatus::getDataMin2D | ( | int | sesvarNum, |
int | timestep, | ||
bool | mustGet = true |
||
) |
Indicates the smallest value of a 2D variable at a timestep. Returns -1 if the data bounds have not yet been calculated; for example, if the variable is derived, the bounds will not be known until the input data has been retrieved and the derived variable has been calculated.
[in] | sesvarNum | 2D session variable number |
[in] | timestep | Time Step |
[in] | bool | mustGet indicates that data will be retrieved if min not known |
double | minimum value |
double VAPoR::DataStatus::getDataMin3D | ( | int | sesvarNum, |
int | timestep, | ||
bool | mustGet = true |
||
) |
Indicates the smallest value of a 3D variable at a timestep. Returns -1 if the data bounds have not yet been calculated; for example, if the variable is derived, the bounds will not be known until the input data has been retrieved and the derived variable has been calculated.
[in] | int | sesvarNum 3D session variable number |
[in] | int | timestep Time Step |
[in] | bool | mustGet indicates that data will be retrieved if min not known |
double | minimum value |
double VAPoR::DataStatus::getDefaultDataMax2D | ( | int | varnum, |
bool | mustGet = true |
||
) |
Indicates the default maximum value of a 2D variable. This is usually the maximum value at the first time step.
[in] | int | varnum Session variable number |
double | maximum value |
double VAPoR::DataStatus::getDefaultDataMax3D | ( | int | varnum, |
bool | mustGet = true |
||
) |
Indicates the default maximum value of a 3D variable. This is usually the maximum value at the first time step.
[in] | int | varnum 3D Session variable number |
double | maximum value |
double VAPoR::DataStatus::getDefaultDataMin2D | ( | int | varnum, |
bool | mustGet = true |
||
) |
Indicates the default minimum value of a 2D variable. This is usually the minimum value at the first time step.
[in] | int | varnum Session variable number |
double | minimum value |
double VAPoR::DataStatus::getDefaultDataMin3D | ( | int | varnum, |
bool | mustGet = true |
||
) |
Indicates the default minimum value of a 3D variable. This is usually the minimum value at the first time step.
[in] | int | varnum Session variable number |
double | minimum value |
|
inline |
Obtain the full size of the data in user coordinates. Values in this array are in the order: sizex, sizey, sizez
const | float[3] size array |
Definition at line 70 of file datastatus.h.
|
inline |
Obtain the full stretched size of the data in user coordinates. Values in this array are in the order: sizex, sizey, sizez
const | float[3] stretched size array |
Definition at line 74 of file datastatus.h.
|
inlinestatic |
static getInstance() method is used to obtain the singleton instance of the Datastatus.
current | DataStatus instance |
Definition at line 58 of file datastatus.h.
|
inline |
Obtain the full extents of the data in user coordinates. Values in this array are in the order: minx, miny, minz, maxx, maxy, maxz.
const | float[6] extents array |
Definition at line 66 of file datastatus.h.
|
inline |
Returns the maximum time step for which there is any data.
size_t | value of largest time step |
Definition at line 87 of file datastatus.h.
|
inline |
Returns the minimum time step for which there is any data.
size_t | value of smallest time step |
Definition at line 83 of file datastatus.h.
|
inlinestatic |
Static method indicates the number of active 2D variables.
int | number of active 2D variables |
Definition at line 425 of file datastatus.h.
|
inlinestatic |
Static method indicates the number of active 3D variables.
int | number of active 3D variables |
Definition at line 421 of file datastatus.h.
|
inline |
Indicates the number of levels of detail in the VDC.
int | number of LOD's |
Definition at line 362 of file datastatus.h.
|
inline |
Indicates the number of time steps in the current VDC.
int | number of timesteps |
Definition at line 354 of file datastatus.h.
|
inline |
Indicates the number of refinement levels in the VDC.
int | number of refinement levels |
Definition at line 358 of file datastatus.h.
|
static |
Identify the 2D session variable num of a name, or -1 if it's not in session.
[in] | str | std::string variable name |
int | 2D session variable number |
|
static |
Identify the 3D session variable num of a name, or -1 if it's not in session.
[in] | str | std::string variable name |
int | 3D session variable number |
|
inline |
Return the extents of the data in user coordinates multiplied by current stretch factors.
float[6] | stretched extents array |
Definition at line 79 of file datastatus.h.
|
inlinestatic |
Static method to determine the 2D session variable name associated with session index.
[in] | int | sesvarNum 2D Session variable number |
std::string | variable name. |
Definition at line 407 of file datastatus.h.
|
inlinestatic |
Static method to determine the 3D session variable name associated with session index.
[in] | int | sesvarNum 3D Session variable number |
std::string | variable name. |
Definition at line 402 of file datastatus.h.
|
inline |
Tells whether the current VDC is type 1 or 2
integer | VDC type |
Definition at line 91 of file datastatus.h.
|
inline |
Invalidate current data manager:
Definition at line 485 of file datastatus.h.
|
inlinestatic |
Static method maps a 2D active variable num to a session variable num.
[in] | varnum | active 2D variable number |
int | session variable number |
Definition at line 437 of file datastatus.h.
|
inlinestatic |
Static method maps a 3D active variable num to a session variable num.
[in] | varnum | active 3D variable number |
int | session variable number |
Definition at line 430 of file datastatus.h.
|
static |
Static method maps a 2D session variable num to an active variable num.
[in] | sesvar | session 2D variable number |
int | active 2D variable number |
|
static |
Static method maps a 3D session variable num to an active variable num.
[in] | sesvar | session 3D variable number |
int | active 3D variable number |
|
inline |
Indicates the maximum LOD level of a variable that is present at a specified time step. Returns -1 if no data is present.
[in] | const | string& varname Variable name |
[in] | int | timestep Time Step |
int | maximum LOD |
Definition at line 311 of file datastatus.h.
int VAPoR::DataStatus::maxLODPresent2D | ( | int | sesvarnum, |
int | timestep | ||
) |
Indicates the maximum LOD level of a 2D variable that is present at a specified time step. Returns -1 if no data is present.
[in] | int | sesvarnum Session variable number |
[in] | int | timestep Time Step |
int | maximum LOD |
int VAPoR::DataStatus::maxLODPresent3D | ( | int | sesvarnum, |
int | timestep | ||
) |
Indicates the maximum LOD level of a 3D variable that is present at a specified time step. Returns -1 if no data is present.
[in] | int | sesvarnum Session variable number |
[in] | int | timestep Time Step |
int | maximum LOD |
|
inline |
Indicates the maximum refinement level of a variable that is present at a specified time step. Returns -1 if no data is present.
[in] | const | string& varname Variable name |
[in] | int | timestep Time Step |
int | maximum refinement level |
Definition at line 293 of file datastatus.h.
int VAPoR::DataStatus::maxXFormPresent2D | ( | int | sesvarnum, |
int | timestep | ||
) |
Indicates the maximum refinement level of a 2D variable that is present at a specified time step. Returns -1 if no data is present.
[in] | int | sesvarnum Session variable number |
[in] | int | timestep Time Step |
int | maximum refinement level |
int VAPoR::DataStatus::maxXFormPresent3D | ( | int | sesvarnum, |
int | timestep | ||
) |
Indicates the maximum refinement level of a 3D variable that is present at a specified time step. Returns -1 if no data is present.
[in] | int | sesvarnum Session variable number |
[in] | int | timestep Time Step |
int | maximum refinement level |
|
inline |
Specify that a 2D variable is not available at a particular refinement, LOD, timestep. Avoids repeated error messages when requested data is not found. param[in] int timestep Time Step param[in] int refLevel Refinement level param[in] int lod Level of Detail param[in] int sessionVarNum Session Variable Number
Definition at line 387 of file datastatus.h.
References VAPoR::MetadataVDC::GetVDCType().
|
inline |
Specify that a 3D variable is not available at a particular refinement, LOD, timestep. Avoids repeated error messages when requested data is not found. param[in] int timestep Time Step param[in] int refLevel Refinement level param[in] int lod Level of Detail param[in] int sessionVarNum Session Variable Number
Definition at line 370 of file datastatus.h.
References VAPoR::MetadataVDC::GetVDCType().
|
inlinestatic |
Method indicates if user requested mouse tracking in TF editors
bool | true if tracking is requested. |
Definition at line 493 of file datastatus.h.
|
inlinestatic |
Method indicates if user requests using lower accuracy, when specified LOD or refinement is not available.
bool | true if lower accuracy is requested. |
Definition at line 497 of file datastatus.h.
|
inlinestatic |
Method indicates if user requests the use of quadratic interpolation in the vertical coordinate.
bool | true if quadratic interpolation is requested |
Definition at line 501 of file datastatus.h.
|
inline |
Indicates if a 2D variable is present at any time step. Returns false if no data is present.
[in] | int | varnum 2D session variable number |
bool | is true if it is present. |
Definition at line 336 of file datastatus.h.
|
inline |
Indicates if a 3D variable is present at any time step. Returns false if no data is present.
[in] | int | varnum 3D session variable number |
bool | is true if it is present. |
Definition at line 327 of file datastatus.h.
|
inlinestatic |
Method indicates if user requested a warning when data is missing.
bool | true if warning is requested. |
Definition at line 489 of file datastatus.h.