OpenWalnut
1.4.0
|
This data set type contains spherical harmonic coefficients as values. More...
#include <WDataSetSphericalHarmonics.h>
Public Types | |
typedef boost::shared_ptr < WDataSetSphericalHarmonics > | SPtr |
Convenience typedef for a boost::shared_ptr. | |
typedef boost::shared_ptr < const WDataSetSphericalHarmonics > | ConstSPtr |
Convenience typedef for a boost::shared_ptr; const. | |
Public Member Functions | |
WDataSetSphericalHarmonics (boost::shared_ptr< WValueSetBase > newValueSet, boost::shared_ptr< WGrid > newGrid) | |
Constructs an instance out of an appropriate value set and a grid. | |
WDataSetSphericalHarmonics () | |
Construct an empty and unusable instance. | |
virtual | ~WDataSetSphericalHarmonics () |
Destroys this DataSet instance. | |
virtual WDataSetSingle::SPtr | clone (boost::shared_ptr< WValueSetBase > newValueSet) const |
Creates a copy (clone) of this instance but allows one to change the valueset. | |
virtual WDataSetSingle::SPtr | clone (boost::shared_ptr< WGrid > newGrid) const |
Creates a copy (clone) of this instance but allows one to change the grid. | |
virtual WDataSetSingle::SPtr | clone () const |
Creates a copy (clone) of this instance. | |
WSymmetricSphericalHarmonic < double > | interpolate (const WPosition &pos, bool *success) const |
Interpolates the field of spherical harmonics at the given position. | |
WSymmetricSphericalHarmonic < double > | getSphericalHarmonicAt (size_t index) const |
Get the spherical harmonic on the given position in value set. | |
virtual const std::string | getName () const |
Gets the name of this prototype. | |
virtual const std::string | getDescription () const |
Gets the description for this prototype. | |
virtual bool | isTexture () const |
Determines whether this dataset can be used as a texture. | |
Static Public Member Functions | |
static boost::shared_ptr < WPrototyped > | getPrototype () |
Returns a prototype instantiated with the true type of the deriving class. | |
Static Protected Attributes | |
static boost::shared_ptr < WPrototyped > | m_prototype = boost::shared_ptr< WPrototyped >() |
The prototype as singleton. | |
Private Attributes | |
boost::shared_ptr< WGridRegular3D > | m_gridRegular3D |
The regular 3d grid of the data set. | |
boost::shared_ptr< WValueSetBase > | m_valueSet |
The valueset of the data set. |
This data set type contains spherical harmonic coefficients as values.
The index scheme is like in the Descoteaux paper "Regularized, Fast, and Robust Analytical Q-Ball Imaging".
Definition at line 42 of file WDataSetSphericalHarmonics.h.
typedef boost::shared_ptr< const WDataSetSphericalHarmonics > WDataSetSphericalHarmonics::ConstSPtr |
Convenience typedef for a boost::shared_ptr; const.
Reimplemented from WDataSetSingle.
Definition at line 53 of file WDataSetSphericalHarmonics.h.
typedef boost::shared_ptr< WDataSetSphericalHarmonics > WDataSetSphericalHarmonics::SPtr |
Convenience typedef for a boost::shared_ptr.
Reimplemented from WDataSetSingle.
Definition at line 48 of file WDataSetSphericalHarmonics.h.
WDataSetSphericalHarmonics::WDataSetSphericalHarmonics | ( | boost::shared_ptr< WValueSetBase > | newValueSet, |
boost::shared_ptr< WGrid > | newGrid | ||
) |
Constructs an instance out of an appropriate value set and a grid.
newValueSet | the value set with the spherical harmonics coefficients to use |
newGrid | the grid which maps world space to the value set |
Definition at line 40 of file WDataSetSphericalHarmonics.cpp.
References m_gridRegular3D.
Construct an empty and unusable instance.
This is needed for the prototype mechanism.
Definition at line 49 of file WDataSetSphericalHarmonics.cpp.
Referenced by clone(), and getPrototype().
WDataSetSphericalHarmonics::~WDataSetSphericalHarmonics | ( | ) | [virtual] |
Destroys this DataSet instance.
Definition at line 54 of file WDataSetSphericalHarmonics.cpp.
WDataSetSingle::SPtr WDataSetSphericalHarmonics::clone | ( | boost::shared_ptr< WValueSetBase > | newValueSet | ) | const [virtual] |
Creates a copy (clone) of this instance but allows one 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 from WDataSetSingle.
Definition at line 58 of file WDataSetSphericalHarmonics.cpp.
References WDataSetSingle::getGrid(), and WDataSetSphericalHarmonics().
WDataSetSingle::SPtr WDataSetSphericalHarmonics::clone | ( | boost::shared_ptr< WGrid > | newGrid | ) | const [virtual] |
Creates a copy (clone) of this instance but allows one 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 from WDataSetSingle.
Definition at line 63 of file WDataSetSphericalHarmonics.cpp.
References WDataSetSingle::getValueSet(), and WDataSetSphericalHarmonics().
WDataSetSingle::SPtr WDataSetSphericalHarmonics::clone | ( | ) | const [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 from WDataSetSingle.
Definition at line 68 of file WDataSetSphericalHarmonics.cpp.
References WDataSetSingle::getGrid(), WDataSetSingle::getValueSet(), and WDataSetSphericalHarmonics().
const std::string WDataSetSphericalHarmonics::getDescription | ( | ) | const [virtual] |
Gets the description for this prototype.
Reimplemented from WDataSetSingle.
Definition at line 146 of file WDataSetSphericalHarmonics.cpp.
const std::string WDataSetSphericalHarmonics::getName | ( | ) | const [virtual] |
Gets the name of this prototype.
Reimplemented from WDataSetSingle.
Definition at line 141 of file WDataSetSphericalHarmonics.cpp.
boost::shared_ptr< WPrototyped > WDataSetSphericalHarmonics::getPrototype | ( | ) | [static] |
Returns a prototype instantiated with the true type of the deriving class.
Reimplemented from WDataSetSingle.
Definition at line 73 of file WDataSetSphericalHarmonics.cpp.
References m_prototype, and WDataSetSphericalHarmonics().
WSymmetricSphericalHarmonic< double > WDataSetSphericalHarmonics::getSphericalHarmonicAt | ( | size_t | index | ) | const |
Get the spherical harmonic on the given position in value set.
index | the position where to get the spherical harmonic from |
Definition at line 135 of file WDataSetSphericalHarmonics.cpp.
References m_valueSet.
WSymmetricSphericalHarmonic< double > WDataSetSphericalHarmonics::interpolate | ( | const WPosition & | pos, |
bool * | success | ||
) | const |
Interpolates the field of spherical harmonics at the given position.
pos | position to interpolate |
success | if the position was inside the grid |
Definition at line 83 of file WDataSetSphericalHarmonics.cpp.
References m_gridRegular3D, and m_valueSet.
bool WDataSetSphericalHarmonics::isTexture | ( | ) | const [virtual] |
Determines whether this dataset can be used as a texture.
Reimplemented from WDataSetSingle.
Definition at line 151 of file WDataSetSphericalHarmonics.cpp.
boost::shared_ptr< WGridRegular3D > WDataSetSphericalHarmonics::m_gridRegular3D [private] |
The regular 3d grid of the data set.
Definition at line 159 of file WDataSetSphericalHarmonics.h.
Referenced by interpolate(), and WDataSetSphericalHarmonics().
boost::shared_ptr< WPrototyped > WDataSetSphericalHarmonics::m_prototype = boost::shared_ptr< WPrototyped >() [static, protected] |
The prototype as singleton.
Reimplemented from WDataSetSingle.
Definition at line 153 of file WDataSetSphericalHarmonics.h.
Referenced by getPrototype().
boost::shared_ptr< WValueSetBase > WDataSetSphericalHarmonics::m_valueSet [private] |
The valueset of the data set.
Reimplemented from WDataSetSingle.
Definition at line 164 of file WDataSetSphericalHarmonics.h.
Referenced by getSphericalHarmonicAt(), and interpolate().