28 #include "../common/WAssert.h"
29 #include "../common/WException.h"
30 #include "../common/WPrototyped.h"
31 #include "WDataTexture3D.h"
33 #include "WGridRegular3D.h"
34 #include "WValueSet.h"
36 #include "WDataSetSingle.h"
42 boost::shared_ptr< WGrid > newGrid )
46 WAssert( newValueSet,
"Need a value set for new data set." );
47 WAssert( newGrid,
"Need a grid for new data set." );
48 WAssert( newValueSet->size() == newGrid->size(),
49 "Number of grid position unequal number of values in value set." );
57 boost::shared_ptr< WGridRegular3D > regGrid = boost::dynamic_pointer_cast<
WGridRegular3D >(
m_grid );
58 if( regGrid && ( m_valueSet->dimension() < 5 ) && ( m_valueSet->dimension() != 0 ) )
115 return "WDataSetSingle";
120 return "A single dataset containing a number of WValues on a structured"
121 "grid. Single, in this case, means not time-dependent and not one type of"
122 "data for several subjects.";
139 case W_DT_UNSIGNED_CHAR:
147 case W_DT_SIGNED_INT:
160 WAssert(
false,
"Unknow data type in dataset." );
boost::shared_ptr< WGrid > m_grid
Stores the reference of the WGrid of this DataSetSingle instance.
static boost::shared_ptr< WPrototyped > getPrototype()
Returns a prototype instantiated with the true type of the deriving class.
A grid that has parallelepiped cells which all have the same proportion.
Base class for all data set types.
boost::shared_ptr< WValueSetBase > getValueSet() const
virtual WDataSetSingle::SPtr clone() const
Creates a copy (clone) of this instance.
osg::ref_ptr< WDataTexture3D > m_texture
The 3D texture representing this dataset.
boost::shared_ptr< WGrid > getGrid() const
virtual const std::string getName() const
Gets the name of this prototype.
boost::shared_ptr< WValueSetBase > m_valueSet
Stores the reference of the WValueSet of this DataSetSingle instance.
boost::shared_ptr< WProperties > m_infoProperties
The property object for the dataset containing only props whose purpose is "PV_PURPOSE_INFORMNATION"...
static boost::shared_ptr< WPrototyped > m_prototype
The prototype as singleton.
virtual ~WDataSetSingle()
Destroys this DataSet instance.
boost::shared_ptr< WDataSetSingle > SPtr
Convenience typedef for a boost::shared_ptr.
Base Class for all value set types.
WDataSetSingle()
Construct an empty and unusable instance.
virtual const std::string getDescription() const
Gets the description for this prototype.
virtual osg::ref_ptr< WDataTexture3D > getTexture() const
Returns the texture representation of the dataset.
This class allows simple creation of WGETexture3D by using a specified grid and value-set.
virtual bool isTexture() const
Determines whether this dataset can be used as a texture.
T getValueAt(size_t id)
Get the value stored at position of the value set.