VAPoR
3.0.0
|
A class for describing the currently loaded dataset. More...
#include <datastatus.h>
Public Member Functions | |
float | getDefaultDataMax (string vname) |
float | getDefaultDataMin (string vname) |
void | mapBoxToVox (Box *box, int refLevel, int lod, int timestep, size_t voxExts[6]) |
DataStatus () | |
~DataStatus () | |
bool | reset (DataMgrV3_0 *dm, size_t cachesize) |
Static Public Member Functions | |
static DataStatus * | getInstance () |
static const double * | getLocalExtents () |
static const double * | getFullSizes () |
static const double * | getFullStretchedSizes () |
static const double * | getStretchedLocalExtents () |
static size_t | getMinTimestep () |
static size_t | getMaxTimestep () |
static int | getNumTimesteps () |
static int | getActiveVarNum (int dim, string varname) |
static double | getVoxelSize (size_t timestep, string varname, int refLevel, int dir) |
static int | getNumActiveVariables3D () |
static int | getNumActiveVariables2D () |
static int | getNumActiveVariables () |
static float | getDefaultLODFidelity2D () |
static float | getDefaultRefinementFidelity2D () |
static float | getDefaultLODFidelity3D () |
static float | getDefaultRefinementFidelity3D () |
static void | setDefaultLODFidelity2D (float q) |
static void | setDefaultLODFidelity3D (float q) |
static void | setDefaultRefinementFidelity2D (float q) |
static void | setDefaultRefinementFidelity3D (float q) |
static int | getDefaultFidelitySettings (int dim, vector< int > &lods, vector< int > &refs) |
static void | setFidelityDefault (RenderParams *rp) |
static bool | convertToLonLat (double coords[], int npoints=1) |
static bool | convertFromLonLat (double coords[], int npoints=1) |
static bool | convertLocalToLonLat (int timestep, double coords[], int npoints=1) |
static bool | convertLocalFromLonLat (int timestep, double coords[], int npoints=1) |
static int | GetExtents (size_t timestep, vector< double > &minExts, vector< double > &maxExts) |
static const vector< double > | getStretchFactors () |
static void | stretchCoords (vector< double > &coords) |
static void | stretchCoords (double coords[3]) |
static double | getMaxStretchedSize () |
static void | localToStretched (const double fromCoords[3], double toCoords[3]) |
static int | maxXFormPresent (string varname, size_t timestep) |
static int | maxLODPresent (string varname, size_t timestep) |
static bool | useLowerAccuracy () |
static void | setUseLowerAccuracy (bool val) |
static bool | dataIsPresent (int timestep) |
static int | mapVoxToUser (size_t timestep, string varname, const size_t vcoords[3], double uCoords[3], int reflevel) |
static void | mapUserToVox (size_t timestep, string varname, const double uCoords[3], size_t vCoords[3], int reflevel) |
static void | stretchExtents (vector< double > factor) |
static size_t | getCacheMB () |
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.
VAPoR::DataStatus::DataStatus | ( | ) |
VAPoR::DataStatus::~DataStatus | ( | ) |
|
static |
Convert lon/lat coordinates to user coordinates in-place. Return false if can't do it.
|
static |
Map Longitude/latitude to local user coordinates If the timestep is negative, then the coords use non-time-varying extents.
[in] | timestep | Time step to use for conversion |
|
static |
Convert local user point coordinates to lon/lat in-place. Return false if can't do it. If the timestep is negative, then the coords use non-time-varying extents.
[in] | timestep | Time step to use for conversion |
|
static |
Convert user point coordinates to lon/lat in-place. Return false if can't do it.
|
static |
Determine if any data is present at a timestep
[in] | timestep | Time Step to be checked |
|
static |
Determine the index of a specified variable name
[in] | dimension | of variable (2 or 3) |
[in] | varname | name of variable |
|
inlinestatic |
Definition at line 325 of file datastatus.h.
float VAPoR::DataStatus::getDefaultDataMax | ( | string | vname | ) |
Determine the default maximum value of a variable. This is its minimum value at lowest resolution and first time step, or zero for a derived variable.
[in] | vname | variable name |
float VAPoR::DataStatus::getDefaultDataMin | ( | string | vname | ) |
Determine the default minimum value of a variable. This is its minimum value at lowest resolution and first time step, or zero for a derived variable.
[in] | vname | variable name |
|
inlinestatic |
Obtain the default fidelity settings for 2D or 3D variables. Provides a mapping from fidelity to both lod and refinement, also returns the default fidelity level.
[in] | dim | Dimension (2 or 3). |
[out] | lods | The sequence of lod levels that are associated with fidelity levels. |
[out] | refs | The sequence of refinement levels that are associated with fidelity levels |
Definition at line 191 of file datastatus.h.
|
inlinestatic |
Obtain the current default LOD floating point level for 2D variables This value, when multiplied by the region size, specifies the default compression ratio, So that, for example, if the defaultLOD value is 10., then the default compression ratio for a 25MB region would be 250:1, and the nearest available compression ratio would be used.
Definition at line 137 of file datastatus.h.
|
inlinestatic |
Obtain the current default LOD floating point level for 3D variables
Definition at line 152 of file datastatus.h.
|
inlinestatic |
Obtain the current default Refinement floating point level for 2D variables. This value, when reduced by the logarithm (base 2) of the region size in megabytes, is the actual (integer) default refinement level. For example, if the default floating refinement level is 5., and the region size is 4MB, then the default refinement level would be 5. -2. = 3.
Definition at line 146 of file datastatus.h.
|
inlinestatic |
Obtain the current default Refinement floating point level for 3D variables.
Definition at line 158 of file datastatus.h.
|
static |
Obtain the time-varying extents, based on the domain-defining variables. Return 0 on success.
|
inlinestatic |
Obtain the full size of the current data in user coordinates. Values in this array are in the order: sizex,sizey,sizez.
const | double[3] sizes array |
Definition at line 70 of file datastatus.h.
|
inlinestatic |
Obtain the full size of the current data in stretched user coordinates. Values in this array are in the order: sizex,sizey,sizez.
const | double[3] sizes array |
Definition at line 75 of file datastatus.h.
|
inlinestatic |
static getInstance() method is used to obtain the singleton instance of the Datastatus.
current | DataStatus instance |
Definition at line 56 of file datastatus.h.
|
inlinestatic |
Obtain the full extents of the current data in local coordinates. Values in this array are in the order: minx, miny, minz, maxx, maxy, maxz. By definition, the first three are zero.
const | double[6] extents array |
Definition at line 65 of file datastatus.h.
|
inlinestatic |
Find the max domain extent in stretched coords
float | maximum stretched extent |
Definition at line 259 of file datastatus.h.
References VetsUtil::Max().
|
inlinestatic |
Determine the maximum time step for which there is any data.
size_t | value of largest time step |
Definition at line 88 of file datastatus.h.
|
inlinestatic |
Determine the minimum time step for which there is any data.
size_t | value of smallest time step |
Definition at line 84 of file datastatus.h.
|
inlinestatic |
Determine the number of active variables. This includes variables in the VDC as well as any derived variables
Definition at line 116 of file datastatus.h.
|
inlinestatic |
Determine the number of active 2D variables. This includes 2D variables in the VDC as well as any 2D derived variables
Definition at line 113 of file datastatus.h.
|
inlinestatic |
Determine the number of active 3D variables. This includes 3D variables in the VDC as well as any 3D derived variables
Definition at line 110 of file datastatus.h.
|
inlinestatic |
Indicates the number of time steps in the current VDC.
Definition at line 92 of file datastatus.h.
|
inlinestatic |
Obtain the full extents of the current data in stretched local coordinates. Values in this array are in the order: minx, miny, minz, maxx, maxy, maxz.
const | double[6] extents array |
Definition at line 80 of file datastatus.h.
|
inlinestatic |
Return the current scene stretch factors
const | float* current stretch factors |
Definition at line 241 of file datastatus.h.
References VAPoR::Params::GetDefaultParams().
Referenced by VAPoR::Viewpoint::getStretchedCamPosLocal(), VAPoR::Viewpoint::getStretchedRotCtrLocal(), VAPoR::Viewpoint::setStretchedCamPosLocal(), and VAPoR::Viewpoint::setStretchedRotCtrLocal().
|
static |
Determine the size of a voxel in user coordinates, along a specific dimension, or its maximum or minimum dimension
[in] | timestep | of variable used to determine dimensions |
[in] | varname | Variable name used for determining dimension. |
[in] | reflevel | Refinement level at which voxel is measured, or -1 for maximum ref level |
[in] | dir | is 0,1,2 for x,y,z dimension. Dir is -1 for maximum, -2 for minimum. |
|
static |
Convert local user coordinates to stretched local user coordinates
[in] | fromCoords | local user coordinates |
[out] | toCoords | stretched local user coordinates |
void VAPoR::DataStatus::mapBoxToVox | ( | Box * | box, |
int | refLevel, | ||
int | lod, | ||
int | timestep, | ||
size_t | voxExts[6] | ||
) |
Map corners of box to voxel coordinates. Result is zero if box does not lie in data domain.
[in] | box | is Box to be mapped |
[in] | refLevel | is refinement level to be used in the mapping |
[in] | lod | is LOD level to be used for the mapping |
[in] | timestep | is time step to use in the mapping |
[out] | voxExts | Voxel extents of box, zeroes if not in data bounds |
|
static |
Perform a mapping of User coordinates to Voxel coordinates based on a specified variable
[in] | timestep | time step used in mapping |
[in] | varname | variable used in mapping |
[in] | uCoords | User coordinates |
[out] | vCoords | voxel coordinates |
[in] | reflevel | Refinement level used in the mapping |
|
static |
Perform a mapping of Voxel coordinates to user coordinates based on a specified variable
[in] | timestep | time step used in mapping |
[in] | varname | variable used in mapping |
[in] | vCoords | voxel coordinates |
[out] | uCoords | user coordinates |
[in] | reflevel | Refinement level used in the mapping |
|
static |
Determine the maximum compression level present for a variable at a timestep
[in] | varname | variable name |
[in] | timestep | Time Step |
|
static |
Determine the maximum refinement level present for a variable at a timestep
[in] | varname | variable name |
[in] | timestep | Time Step |
bool VAPoR::DataStatus::reset | ( | DataMgrV3_0 * | dm, |
size_t | cachesize | ||
) |
Reset the datastatus when a new datamgr is opened. This must be called whenever the data manager changes or when any new variables are defined.
[in] | dm | New data manager |
[in] | cachesize | cache size in megabytes |
|
inlinestatic |
Set the default LOD floating point level for 2D variables
[in] | q | default value to be set |
Definition at line 164 of file datastatus.h.
|
inlinestatic |
Set the default LOD floating point level for 3D variables
[in] | q | default value to be set |
Definition at line 170 of file datastatus.h.
|
inlinestatic |
Set the default Refinement floating point level for 2D variables
[in] | q | default value to be set |
Definition at line 176 of file datastatus.h.
|
inlinestatic |
Set the default Refinement floating point level for 3D variables
[in] | q | default value to be set |
Definition at line 182 of file datastatus.h.
|
static |
Set the fidelity default settings to match the current fidelity settings in a RenderParams
[in] | rp | RenderParams instance whose lod and refinement will be used for setting fidelity. |
|
inlinestatic |
Turn on or off the option of using lower accuracy when requested accuracy is not available
[in] | val | True to turn on this option |
Definition at line 281 of file datastatus.h.
|
inlinestatic |
Stretch a 3-vector based on current stretch factors
Definition at line 247 of file datastatus.h.
|
inlinestatic |
Stretch a 3-vector based on current stretch factor
Definition at line 253 of file datastatus.h.
|
inlinestatic |
Update DataStatus based on a stretch factor. This must be called whenver the stretch factor changes.
factor | 3-vector of new stretch factors |
Definition at line 316 of file datastatus.h.
|
inlinestatic |
Method indicates if user allows using lower accuracy, when specified LOD or refinement is not available.
bool | true if lower accuracy is requested. |
Definition at line 278 of file datastatus.h.