OpenWalnut  1.4.0
Public Types | Public Member Functions | Static Public Member Functions | Static Protected Attributes | Private Attributes | List of all members
WDataSetSphericalHarmonics Class Reference

This data set type contains spherical harmonic coefficients as values. More...

#include <WDataSetSphericalHarmonics.h>

+ Inheritance diagram for WDataSetSphericalHarmonics:

Public Types

typedef boost::shared_ptr< WDataSetSphericalHarmonicsSPtr
 Convenience typedef for a boost::shared_ptr. More...
 
typedef boost::shared_ptr< const WDataSetSphericalHarmonicsConstSPtr
 Convenience typedef for a boost::shared_ptr; const. More...
 
- Public Types inherited from WDataSetSingle
typedef boost::shared_ptr< WDataSetSingleSPtr
 Convenience typedef for a boost::shared_ptr. More...
 
typedef boost::shared_ptr< const WDataSetSingleConstSPtr
 Convenience typedef for a boost::shared_ptr; const. More...
 
- Public Types inherited from WDataSet
typedef boost::shared_ptr< WDataSetSPtr
 Shared pointer abbreviation to a instance of this class. More...
 
typedef boost::shared_ptr< const WDataSetConstSPtr
 Shared pointer abbreviation to a const instance of this class. More...
 

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. More...
 
 WDataSetSphericalHarmonics ()
 Construct an empty and unusable instance. More...
 
virtual ~WDataSetSphericalHarmonics ()
 Destroys this DataSet instance. More...
 
virtual WDataSetSingle::SPtr clone (boost::shared_ptr< WValueSetBase > newValueSet) const
 Creates a copy (clone) of this instance but allows one to change the valueset. More...
 
virtual WDataSetSingle::SPtr clone (boost::shared_ptr< WGrid > newGrid) const
 Creates a copy (clone) of this instance but allows one to change the grid. More...
 
virtual WDataSetSingle::SPtr clone () const
 Creates a copy (clone) of this instance. More...
 
WSymmetricSphericalHarmonic< double > interpolate (const WPosition &pos, bool *success) const
 Interpolates the field of spherical harmonics at the given position. More...
 
WSymmetricSphericalHarmonic< double > getSphericalHarmonicAt (size_t index) const
 Get the spherical harmonic on the given position in value set. More...
 
virtual const std::string getName () const
 Gets the name of this prototype. More...
 
virtual const std::string getDescription () const
 Gets the description for this prototype. More...
 
virtual bool isTexture () const
 Determines whether this dataset can be used as a texture. More...
 
- Public Member Functions inherited from WDataSetSingle
 WDataSetSingle (boost::shared_ptr< WValueSetBase > newValueSet, boost::shared_ptr< WGrid > newGrid)
 Constructs an instance out of a value set and a grid. More...
 
 WDataSetSingle ()
 Construct an empty and unusable instance. More...
 
virtual ~WDataSetSingle ()
 Destroys this DataSet instance. More...
 
boost::shared_ptr< WValueSetBasegetValueSet () const
 
boost::shared_ptr< WGridgetGrid () const
 
template<typename T >
getValueAt (size_t id)
 Get the value stored at position of the value set. More...
 
double getValueAt (size_t id) const
 Get the value stored at position of the value set. More...
 
virtual osg::ref_ptr< WDataTexture3DgetTexture () const
 Returns the texture representation of the dataset. More...
 
- Public Member Functions inherited from WDataSet
 WDataSet ()
 This constructor should be used if a dataSet does not stem from a file. More...
 
virtual ~WDataSet ()
 Since WDataSet is a base class and thus should be polymorphic we add virtual destructor. More...
 
void setFilename (const std::string filename)
 Set the name of the file that this data set stems from. More...
 
std::string getFilename () const
 Get the name of the file that this data set stems from. More...
 
OW_API_DEPRECATED void setFileName (const std::string filename)
 Set the name of the file that this data set stems from. More...
 
OW_API_DEPRECATED std::string getFileName () const
 Get the name of the file that this data set stems from. More...
 
virtual boost::shared_ptr< WDataSetVectorisVectorDataSet ()
 Checks if this dataset is a vector dataset. More...
 
boost::shared_ptr< WPropertiesgetProperties () const
 Return a pointer to the properties object of the dataset. More...
 
boost::shared_ptr< WPropertiesgetInformationProperties () const
 Return a pointer to the information properties object of the dataset. More...
 
- Public Member Functions inherited from WTransferable
 WTransferable ()
 Default constructor. More...
 
virtual ~WTransferable ()
 Destructor. More...
 
- Public Member Functions inherited from WPrototyped
 WPrototyped ()
 Default constructor. More...
 
virtual ~WPrototyped ()
 Destructor. More...
 
template<typename T >
bool isA ()
 Checks whether the actual prototype has the specified runtime type. More...
 

Static Public Member Functions

static boost::shared_ptr< WPrototypedgetPrototype ()
 Returns a prototype instantiated with the true type of the deriving class. More...
 
- Static Public Member Functions inherited from WDataSetSingle
static boost::shared_ptr< WPrototypedgetPrototype ()
 Returns a prototype instantiated with the true type of the deriving class. More...
 
- Static Public Member Functions inherited from WDataSet
static boost::shared_ptr< WPrototypedgetPrototype ()
 Returns a prototype instantiated with the true type of the deriving class. More...
 

Static Protected Attributes

static boost::shared_ptr< WPrototypedm_prototype = boost::shared_ptr< WPrototyped >()
 The prototype as singleton. More...
 
- Static Protected Attributes inherited from WDataSetSingle
static boost::shared_ptr< WPrototypedm_prototype = boost::shared_ptr< WPrototyped >()
 The prototype as singleton. More...
 
- Static Protected Attributes inherited from WDataSet
static boost::shared_ptr< WPrototypedm_prototype = boost::shared_ptr< WPrototyped >()
 The prototype as singleton. More...
 

Private Attributes

boost::shared_ptr< WGridRegular3Dm_gridRegular3D
 The regular 3d grid of the data set. More...
 
boost::shared_ptr< WValueSetBasem_valueSet
 The valueset of the data set. More...
 

Additional Inherited Members

- Protected Attributes inherited from WDataSetSingle
boost::shared_ptr< WGridm_grid
 Stores the reference of the WGrid of this DataSetSingle instance. More...
 
boost::shared_ptr< WValueSetBasem_valueSet
 Stores the reference of the WValueSet of this DataSetSingle instance. More...
 
- Protected Attributes inherited from WDataSet
boost::shared_ptr< WPropertiesm_properties
 The property object for the dataset. More...
 
boost::shared_ptr< WPropertiesm_infoProperties
 The property object for the dataset containing only props whose purpose is "PV_PURPOSE_INFORMNATION". More...
 

Detailed Description

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.

Member Typedef Documentation

Convenience typedef for a boost::shared_ptr; const.

Definition at line 53 of file WDataSetSphericalHarmonics.h.

Convenience typedef for a boost::shared_ptr.

Definition at line 48 of file WDataSetSphericalHarmonics.h.

Constructor & Destructor Documentation

WDataSetSphericalHarmonics::WDataSetSphericalHarmonics ( boost::shared_ptr< WValueSetBase newValueSet,
boost::shared_ptr< WGrid newGrid 
)

Constructs an instance out of an appropriate value set and a grid.

Parameters
newValueSetthe value set with the spherical harmonics coefficients to use
newGridthe grid which maps world space to the value set

Definition at line 40 of file WDataSetSphericalHarmonics.cpp.

References m_gridRegular3D.

WDataSetSphericalHarmonics::WDataSetSphericalHarmonics ( )

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.

Member Function Documentation

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.

Parameters
newValueSetthe new valueset.
Returns
the clone

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.

Parameters
newGridthe new grid.
Returns
the clone

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.

Returns
the clone

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.

Returns
the description

Reimplemented from WDataSetSingle.

Definition at line 146 of file WDataSetSphericalHarmonics.cpp.

const std::string WDataSetSphericalHarmonics::getName ( ) const
virtual

Gets the name of this prototype.

Returns
the name.

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.

Returns
the prototype.

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.

Parameters
indexthe position where to get the spherical harmonic from
Returns
the spherical harmonic

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.

Parameters
posposition to interpolate
successif the position was inside the grid
Returns
Interpolated spherical harmonic.

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.

Returns
true if usable as texture.

Reimplemented from WDataSetSingle.

Definition at line 151 of file WDataSetSphericalHarmonics.cpp.

Member Data Documentation

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 >()
staticprotected

The prototype as singleton.

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.

Definition at line 164 of file WDataSetSphericalHarmonics.h.

Referenced by getSphericalHarmonicAt(), and interpolate().


The documentation for this class was generated from the following files: