|
OpenWalnut
1.2.5
|
A data set consisting of a set of values based on a grid. More...
#include <WDataSetSingle.h>
Inheritance diagram for WDataSetSingle:Public Types | |
| typedef boost::shared_ptr < WDataSetSingle > | SPtr |
| Convenience typedef for a boost::shared_ptr. | |
| typedef boost::shared_ptr < const WDataSetSingle > | ConstSPtr |
| Convenience typedef for a boost::shared_ptr; const. | |
Public Member Functions | |
| WDataSetSingle (boost::shared_ptr< WValueSetBase > newValueSet, boost::shared_ptr< WGrid > newGrid) | |
| Constructs an instance out of a value set and a grid. | |
| WDataSetSingle () | |
| Construct an empty and unusable instance. | |
| virtual | ~WDataSetSingle () |
| Destroys this DataSet instance. | |
| virtual WDataSetSingle::SPtr | clone (boost::shared_ptr< WValueSetBase > newValueSet) const |
| Creates a copy (clone) of this instance but allows to change the valueset. | |
| virtual WDataSetSingle::SPtr | clone (boost::shared_ptr< WGrid > newGrid) const |
| Creates a copy (clone) of this instance but allows to change the grid. | |
| virtual WDataSetSingle::SPtr | clone () const |
| Creates a copy (clone) of this instance. | |
| boost::shared_ptr< WValueSetBase > | getValueSet () const |
| boost::shared_ptr< WGrid > | getGrid () const |
| template<typename T > | |
| T | getValueAt (size_t id) |
| Get the value stored at position of the value set. | |
| double | getValueAt (size_t id) const |
| Get the value stored at position of the value set. | |
| virtual bool | isTexture () const |
| Determines whether this dataset can be used as a texture. | |
| virtual osg::ref_ptr < WDataTexture3D > | getTexture () const |
| Returns the texture representation of the dataset. | |
| virtual const std::string | getName () const |
| Gets the name of this prototype. | |
| virtual const std::string | getDescription () const |
| Gets the description for this prototype. | |
Public Member Functions inherited from WDataSet | |
| WDataSet () | |
| This constructor should be used if a dataSet does not stem from a file. | |
| virtual | ~WDataSet () |
| Since WDataSet is a base class and thus should be polymorphic we add virtual destructor. | |
| void | setFileName (const std::string fileName) |
| Set the name of the file that this data set stems from. | |
| std::string | getFileName () const |
| Get the name of the file that this data set stems from. | |
| virtual boost::shared_ptr < WDataSetVector > | isVectorDataSet () |
| Checks if this dataset is a vector dataset. | |
| boost::shared_ptr< WProperties > | getProperties () const |
| Return a pointer to the properties object of the dataset. | |
| boost::shared_ptr< WProperties > | getInformationProperties () const |
| Return a pointer to the information properties object of the dataset. | |
Public Member Functions inherited from WTransferable | |
| WTransferable () | |
| Default constructor. | |
| virtual | ~WTransferable () |
| Destructor. | |
Public Member Functions inherited from WPrototyped | |
| WPrototyped () | |
| Default constructor. | |
| virtual | ~WPrototyped () |
| Destructor. | |
| template<typename T > | |
| bool | isA () |
| Checks whether the actual prototype has the specified runtime type. | |
Static Public Member Functions | |
| static boost::shared_ptr < WPrototyped > | getPrototype () |
| Returns a prototype instantiated with the true type of the deriving class. | |
Protected Attributes | |
| boost::shared_ptr< WGrid > | m_grid |
| Stores the reference of the WGrid of this DataSetSingle instance. | |
| boost::shared_ptr< WValueSetBase > | m_valueSet |
| Stores the reference of the WValueSet of this DataSetSingle instance. | |
Protected Attributes inherited from WDataSet | |
| boost::shared_ptr< WProperties > | m_properties |
| The property object for the dataset. | |
| boost::shared_ptr< WProperties > | m_infoProperties |
| The property object for the dataset containing only props whose purpose is "PV_PURPOSE_INFORMNATION". | |
Static Protected Attributes | |
| static boost::shared_ptr < WPrototyped > | m_prototype = boost::shared_ptr< WPrototyped >() |
| The prototype as singleton. | |
Static Protected Attributes inherited from WDataSet | |
Private Attributes | |
| osg::ref_ptr< WDataTexture3D > | m_texture |
| The 3D texture representing this dataset. | |
A data set consisting of a set of values based on a grid.
Definition at line 47 of file WDataSetSingle.h.
| typedef boost::shared_ptr< const WDataSetSingle > WDataSetSingle::ConstSPtr |
Convenience typedef for a boost::shared_ptr; const.
Definition at line 59 of file WDataSetSingle.h.
| typedef boost::shared_ptr< WDataSetSingle > WDataSetSingle::SPtr |
Convenience typedef for a boost::shared_ptr.
Definition at line 54 of file WDataSetSingle.h.
| WDataSetSingle::WDataSetSingle | ( | boost::shared_ptr< WValueSetBase > | newValueSet, |
| boost::shared_ptr< WGrid > | newGrid | ||
| ) |
Constructs an instance out of a value set and a grid.
| newValueSet | the value set to use |
| newGrid | the grid which maps world space to the value set |
Definition at line 41 of file WDataSetSingle.cpp.
References m_grid, WDataSet::m_infoProperties, m_texture, and m_valueSet.
| WDataSetSingle::WDataSetSingle | ( | ) |
Construct an empty and unusable instance.
This is useful for prototypes.
Definition at line 64 of file WDataSetSingle.cpp.
Referenced by clone(), and getPrototype().
|
virtual |
Destroys this DataSet instance.
Definition at line 73 of file WDataSetSingle.cpp.
|
virtual |
Creates a copy (clone) of this instance but allows to change the valueset.
Unlike copy construction, this is a very useful function if you want to keep the dynamic type of your dataset even if you just have a WDataSetSingle.
| newValueSet | the new valueset. |
Reimplemented in WDataSetSegmentation, WDataSetRawHARDI, WDataSetScalar, WDataSetSphericalHarmonics, WDataSetVector, and WDataSetDTI.
Definition at line 77 of file WDataSetSingle.cpp.
References getGrid(), and WDataSetSingle().
|
virtual |
Creates a copy (clone) of this instance but allows to change the grid.
Unlike copy construction, this is a very useful function if you want to keep the dynamic type of your dataset even if you just have a WDataSetSingle.
| newGrid | the new grid. |
Reimplemented in WDataSetSegmentation, WDataSetRawHARDI, WDataSetScalar, WDataSetSphericalHarmonics, WDataSetVector, and WDataSetDTI.
Definition at line 82 of file WDataSetSingle.cpp.
References getValueSet(), and WDataSetSingle().
|
virtual |
Creates a copy (clone) of this instance.
Unlike copy construction, this is a very useful function if you want to keep the dynamic type of your dataset even if you just have a WDataSetSingle.
Reimplemented in WDataSetSegmentation, WDataSetRawHARDI, WDataSetScalar, WDataSetSphericalHarmonics, WDataSetVector, and WDataSetDTI.
Definition at line 87 of file WDataSetSingle.cpp.
References getGrid(), getValueSet(), and WDataSetSingle().
|
virtual |
Gets the description for this prototype.
Reimplemented from WDataSet.
Reimplemented in WDataSetRawHARDI, WDataSetSphericalHarmonics, and WDataSetSegmentation.
Definition at line 118 of file WDataSetSingle.cpp.
| boost::shared_ptr< WGrid > WDataSetSingle::getGrid | ( | ) | const |
Definition at line 97 of file WDataSetSingle.cpp.
References m_grid.
Referenced by WDataSetDTI::clone(), WDataSetVector::clone(), WDataSetSphericalHarmonics::clone(), WDataSetScalar::clone(), WDataSetRawHARDI::clone(), clone(), and WDataSetSegmentation::clone().
|
virtual |
Gets the name of this prototype.
Reimplemented from WDataSet.
Reimplemented in WDataSetRawHARDI, WDataSetSphericalHarmonics, and WDataSetSegmentation.
Definition at line 113 of file WDataSetSingle.cpp.
|
static |
Returns a prototype instantiated with the true type of the deriving class.
Reimplemented from WDataSet.
Reimplemented in WDataSetSegmentation, WDataSetScalar, WDataSetRawHARDI, WDataSetSphericalHarmonics, and WDataSetVector.
Definition at line 125 of file WDataSetSingle.cpp.
References m_prototype, and WDataSetSingle().
|
virtual |
Returns the texture representation of the dataset.
May throw an exception if no texture is available.
Reimplemented from WDataSet.
Definition at line 108 of file WDataSetSingle.cpp.
References m_texture.
| T WDataSetSingle::getValueAt | ( | size_t | id | ) |
Get the value stored at position of the value set.
This is the grid position only for scalar data sets.
| id | The id'th value in the data set |
Definition at line 196 of file WDataSetSingle.h.
References WValueSet< T >::getScalar(), and m_valueSet.
Referenced by WDataSetSegmentation::getCSFProbability(), WDataSetSegmentation::getGMProbability(), and WDataSetSegmentation::getWMProbability().
| double WDataSetSingle::getValueAt | ( | size_t | id | ) | const |
Get the value stored at position of the value set.
This is the grid position only for scalar data sets.
| id | The id'th value in the data set |
Definition at line 135 of file WDataSetSingle.cpp.
References getValueSet().
| boost::shared_ptr< WValueSetBase > WDataSetSingle::getValueSet | ( | ) | const |
Definition at line 92 of file WDataSetSingle.cpp.
References m_valueSet.
Referenced by WDataSetDTI::clone(), WDataSetVector::clone(), WDataSetSphericalHarmonics::clone(), WDataSetScalar::clone(), WDataSetRawHARDI::clone(), clone(), WDataSetSegmentation::clone(), WDataSetSegmentation::copyDataSetsToArray(), getValueAt(), WDataSetVector::getVectorAt(), and WDataSetSingleTest::testGetValueSet().
|
virtual |
Determines whether this dataset can be used as a texture.
Reimplemented from WDataSet.
Reimplemented in WDataSetSphericalHarmonics, and WDataSetVector.
Definition at line 102 of file WDataSetSingle.cpp.
References m_texture.
|
protected |
Stores the reference of the WGrid of this DataSetSingle instance.
Definition at line 181 of file WDataSetSingle.h.
Referenced by WDataSetVector::eigenVectorInterpolate(), WDataSetSegmentation::getCSFProbability(), WDataSetSegmentation::getGMProbability(), getGrid(), WDataSetScalar::getValueAt(), WDataSetSegmentation::getWMProbability(), WDataSetVector::interpolate(), WDataSetScalar::interpolate(), and WDataSetSingle().
|
staticprotected |
The prototype as singleton.
Reimplemented from WDataSet.
Reimplemented in WDataSetSegmentation, WDataSetRawHARDI, WDataSetScalar, WDataSetSphericalHarmonics, WDataSetVector, and WDataSetDTI.
Definition at line 176 of file WDataSetSingle.h.
Referenced by getPrototype().
|
private |
The 3D texture representing this dataset.
Definition at line 193 of file WDataSetSingle.h.
Referenced by getTexture(), isTexture(), and WDataSetSingle().
|
protected |
Stores the reference of the WValueSet of this DataSetSingle instance.
Reimplemented in WDataSetSphericalHarmonics.
Definition at line 186 of file WDataSetSingle.h.
Referenced by WDataSetVector::eigenVectorInterpolate(), WDataSetScalar::getHistogram(), WDataSetScalar::getMax(), WDataSetScalar::getMin(), WDataSetRawHARDI::getNonZeroGradientSignals(), WDataSetDTI::getTensor(), getValueAt(), getValueSet(), WDataSetVector::interpolate(), WDataSetScalar::interpolate(), and WDataSetSingle().
1.8.1