OpenWalnut  1.5.0dev
Public Member Functions | Static Public Member Functions | Static Protected Attributes | Private Member Functions | Private Attributes | List of all members
WDataSetRawHARDI Class Reference

This data set type contains raw HARDI and its gradients. More...

#include <WDataSetRawHARDI.h>

+ Inheritance diagram for WDataSetRawHARDI:
+ Collaboration diagram for WDataSetRawHARDI:

Public Member Functions

 WDataSetRawHARDI (std::shared_ptr< WValueSetBase > newValueSet, std::shared_ptr< WGrid > newGrid, std::shared_ptr< std::vector< WVector3d > > newGradients, double diffusionBValue=1.0)
 Constructs an instance out of: More...
 
 WDataSetRawHARDI (std::shared_ptr< WValueSetBase > newValueSet, std::shared_ptr< WGrid > newGrid, std::shared_ptr< std::vector< WVector3d > > newGradients, std::shared_ptr< std::vector< float > > diffusionBValues)
 Constructs an instance out of: More...
 
 WDataSetRawHARDI ()
 Construct an empty and unusable instance. More...
 
virtual ~WDataSetRawHARDI ()
 Destroys this DataSet instance. More...
 
virtual WDataSetSingle::SPtr clone (std::shared_ptr< WValueSetBase > newValueSet, std::shared_ptr< WGrid > newGrid) const
 Creates a copy (clone) of this instance but allows one to change the valueset. More...
 
virtual WDataSetSingle::SPtr clone (std::shared_ptr< WValueSetBase > newValueSet) const
 Creates a copy (clone) of this instance but allows one to change the valueset. More...
 
virtual WDataSetSingle::SPtr clone (std::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...
 
const WVector3dgetGradient (size_t index) const
 Returns the gradient for the index. More...
 
std::size_t getNumberOfMeasurements () const
 Returns the count of measurements per voxel, which is equal to the count of the used gradients. 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...
 
std::shared_ptr< std::vector< WVector3d > > getOrientations () const
 Get the orientations. More...
 
std::vector< size_t > const & getZeroGradientIndexes () const
 Get the indexes of zero gradients. More...
 
std::vector< size_t > const & getNonZeroGradientIndexes () const
 Get the indexes of non-zero gradients. More...
 
template<typename T >
WValue< T > getNonZeroGradientSignals (size_t index) const
 Returns only the measurements for which the gradient was non-zero. More...
 
double getDiffusionBValue () const
 Returns the b-value of the diffusion. More...
 
std::shared_ptr< std::vector< float > > getDiffusionBValues () const
 Returns the b-values of the diffusion if there are different values. More...
 
- Public Member Functions inherited from WDataSetSingle
 WDataSetSingle (std::shared_ptr< WValueSetBase > newValueSet, std::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...
 
std::shared_ptr< WValueSetBasegetValueSet () const
 
std::shared_ptr< WGridgetGrid () const
 
template<typename T >
OW_API_DEPRECATEDgetValueAt (size_t id)
 Get the scalar value stored at id-th position of the array of the value set. More...
 
double OW_API_DEPRECATED getValueAt (size_t id) const
 Get the scalar value stored at id-th position of the array of the value set. More...
 
double getSingleRawValue (size_t id) const
 Get the raw scalar value stored at id-th position of the raw array of the value set. More...
 
virtual bool isTexture () const
 Determines whether this dataset can be used as a texture. 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 std::shared_ptr< WDataSetVectorisVectorDataSet ()
 Checks if this dataset is a vector dataset. More...
 
std::shared_ptr< WPropertiesgetProperties () const
 Return a pointer to the properties object of the dataset. More...
 
std::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 std::shared_ptr< WPrototypedgetPrototype ()
 Returns a prototype instantiated with the true type of the deriving class. More...
 
- Static Public Member Functions inherited from WDataSetSingle
static std::shared_ptr< WPrototypedgetPrototype ()
 Returns a prototype instantiated with the true type of the deriving class. More...
 
- Static Public Member Functions inherited from WDataSet
static std::shared_ptr< WPrototypedgetPrototype ()
 Returns a prototype instantiated with the true type of the deriving class. More...
 

Static Protected Attributes

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

Private Member Functions

void init (std::shared_ptr< WValueSetBase > newValueSet, std::shared_ptr< WGrid > newGrid, std::shared_ptr< std::vector< WVector3d > > newGradients)
 Makes only such initialization which is common to all contructors. More...
 
void buildGradientIndexes ()
 Build indexes for the zero and non-zero gradients. More...
 

Private Attributes

std::shared_ptr< std::vector< WVector3d > > m_gradients
 Gradients of measurements. More...
 
std::shared_ptr< std::vector< float > > m_diffusionBValues
 Strength (b-value) of the so-called magnetic diffusion gradient. More...
 
std::vector< size_t > m_zeroGradientIndexes
 The indexes for the which gradient is zero. More...
 
std::vector< size_t > m_nonZeroGradientIndexes
 The indexes for the which gradient is non-zero. More...
 

Additional Inherited Members

- Public Types inherited from WDataSetSingle
typedef std::shared_ptr< WDataSetSingleSPtr
 Convenience typedef for a std::shared_ptr. More...
 
typedef std::shared_ptr< const WDataSetSingleConstSPtr
 Convenience typedef for a std::shared_ptr; const. More...
 
- Public Types inherited from WDataSet
typedef std::shared_ptr< WDataSetSPtr
 Shared pointer abbreviation to a instance of this class. More...
 
typedef std::shared_ptr< const WDataSetConstSPtr
 Shared pointer abbreviation to a const instance of this class. More...
 
- Protected Attributes inherited from WDataSetSingle
std::shared_ptr< WGridm_grid
 Stores the reference of the WGrid of this DataSetSingle instance. More...
 
std::shared_ptr< WValueSetBasem_valueSet
 Stores the reference of the WValueSet of this DataSetSingle instance. More...
 
- Protected Attributes inherited from WDataSet
std::shared_ptr< WPropertiesm_properties
 The property object for the dataset. More...
 
std::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 raw HARDI and its gradients.

Definition at line 40 of file WDataSetRawHARDI.h.

Constructor & Destructor Documentation

◆ WDataSetRawHARDI() [1/3]

WDataSetRawHARDI::WDataSetRawHARDI ( std::shared_ptr< WValueSetBase newValueSet,
std::shared_ptr< WGrid newGrid,
std::shared_ptr< std::vector< WVector3d > >  newGradients,
double  diffusionBValue = 1.0 
)

Constructs an instance out of:

  • an appropriate value set with a vector of measure values for each voxel,
  • a grid and
  • the gradients used during the measurement of the different values.
Parameters
newValueSetthe vector value set to use
newGridthe grid which maps world space to the value set
newGradientsthe Gradients of the
diffusionBValueStrength of the gradient

Definition at line 48 of file WDataSetRawHARDI.cpp.

References init().

+ Here is the call graph for this function:

◆ WDataSetRawHARDI() [2/3]

WDataSetRawHARDI::WDataSetRawHARDI ( std::shared_ptr< WValueSetBase newValueSet,
std::shared_ptr< WGrid newGrid,
std::shared_ptr< std::vector< WVector3d > >  newGradients,
std::shared_ptr< std::vector< float > >  diffusionBValues 
)

Constructs an instance out of:

  • an appropriate value set with a vector of measure values for each voxel,
  • a grid and
  • the gradients used during the measurement of the different values.
Parameters
newValueSetthe vector value set to use
newGridthe grid which maps world space to the value set
newGradientsthe Gradients of the
diffusionBValuesStrength of the gradient for every gradient

Definition at line 57 of file WDataSetRawHARDI.cpp.

References init().

+ Here is the call graph for this function:

◆ WDataSetRawHARDI() [3/3]

WDataSetRawHARDI::WDataSetRawHARDI ( )

Construct an empty and unusable instance.

This is needed for the prototype mechanism.

Definition at line 84 of file WDataSetRawHARDI.cpp.

Referenced by clone(), and getPrototype().

+ Here is the caller graph for this function:

◆ ~WDataSetRawHARDI()

WDataSetRawHARDI::~WDataSetRawHARDI ( )
virtual

Destroys this DataSet instance.

Definition at line 89 of file WDataSetRawHARDI.cpp.

Member Function Documentation

◆ buildGradientIndexes()

void WDataSetRawHARDI::buildGradientIndexes ( )
private

Build indexes for the zero and non-zero gradients.

Definition at line 67 of file WDataSetRawHARDI.cpp.

References m_gradients, m_nonZeroGradientIndexes, and m_zeroGradientIndexes.

Referenced by init().

+ Here is the caller graph for this function:

◆ clone() [1/4]

WDataSetSingle::SPtr WDataSetRawHARDI::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 108 of file WDataSetRawHARDI.cpp.

References getDiffusionBValues(), WDataSetSingle::getGrid(), WDataSetSingle::getValueSet(), m_gradients, and WDataSetRawHARDI().

+ Here is the call graph for this function:

◆ clone() [2/4]

WDataSetSingle::SPtr WDataSetRawHARDI::clone ( std::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 103 of file WDataSetRawHARDI.cpp.

References getDiffusionBValues(), WDataSetSingle::getValueSet(), m_gradients, and WDataSetRawHARDI().

+ Here is the call graph for this function:

◆ clone() [3/4]

WDataSetSingle::SPtr WDataSetRawHARDI::clone ( std::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 98 of file WDataSetRawHARDI.cpp.

References getDiffusionBValues(), WDataSetSingle::getGrid(), m_gradients, and WDataSetRawHARDI().

+ Here is the call graph for this function:

◆ clone() [4/4]

WDataSetSingle::SPtr WDataSetRawHARDI::clone ( std::shared_ptr< WValueSetBase newValueSet,
std::shared_ptr< WGrid newGrid 
) 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.

Parameters
newValueSetthe new valueset.
newGridthe new grid.
Returns
the clone

Reimplemented from WDataSetSingle.

Definition at line 93 of file WDataSetRawHARDI.cpp.

References getDiffusionBValues(), m_gradients, and WDataSetRawHARDI().

+ Here is the call graph for this function:

◆ getDescription()

const std::string WDataSetRawHARDI::getDescription ( ) const
virtual

Gets the description for this prototype.

Returns
the description

Reimplemented from WDataSetSingle.

Definition at line 158 of file WDataSetRawHARDI.cpp.

◆ getDiffusionBValue()

double WDataSetRawHARDI::getDiffusionBValue ( ) const

Returns the b-value of the diffusion.

Returns
b-value as double

Definition at line 137 of file WDataSetRawHARDI.cpp.

References m_diffusionBValues.

◆ getDiffusionBValues()

std::shared_ptr< std::vector< float > > WDataSetRawHARDI::getDiffusionBValues ( ) const

Returns the b-values of the diffusion if there are different values.

Returns
a vector of b-values

Definition at line 143 of file WDataSetRawHARDI.cpp.

References m_diffusionBValues.

Referenced by clone().

+ Here is the caller graph for this function:

◆ getGradient()

const WVector3d & WDataSetRawHARDI::getGradient ( size_t  index) const

Returns the gradient for the index.

Returns
gradient of measurement
Parameters
index

Definition at line 123 of file WDataSetRawHARDI.cpp.

References m_gradients.

◆ getName()

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

Gets the name of this prototype.

Returns
the name.

Reimplemented from WDataSetSingle.

Definition at line 153 of file WDataSetRawHARDI.cpp.

◆ getNonZeroGradientIndexes()

std::vector< size_t > const & WDataSetRawHARDI::getNonZeroGradientIndexes ( ) const
inline

Get the indexes of non-zero gradients.

Returns
Returns the indexes for the which gradient is non-zero.

Definition at line 252 of file WDataSetRawHARDI.h.

References m_nonZeroGradientIndexes.

◆ getNonZeroGradientSignals()

template<typename T >
WValue< T > WDataSetRawHARDI::getNonZeroGradientSignals ( size_t  index) const

Returns only the measurements for which the gradient was non-zero.

Parameters
indexthe index of the voxel.
Returns
non-zero gradient signals

Definition at line 257 of file WDataSetRawHARDI.h.

References m_nonZeroGradientIndexes, and WDataSetSingle::m_valueSet.

◆ getNumberOfMeasurements()

std::size_t WDataSetRawHARDI::getNumberOfMeasurements ( ) const

Returns the count of measurements per voxel, which is equal to the count of the used gradients.

Returns
measurements per voxel

Definition at line 148 of file WDataSetRawHARDI.cpp.

References m_gradients.

◆ getOrientations()

std::shared_ptr< std::vector< WVector3d > > WDataSetRawHARDI::getOrientations ( ) const

Get the orientations.

Returns
A vector of orientations.

Definition at line 132 of file WDataSetRawHARDI.cpp.

References m_gradients.

◆ getPrototype()

std::shared_ptr< WPrototyped > WDataSetRawHARDI::getPrototype ( )
static

Returns a prototype instantiated with the true type of the deriving class.

Returns
the prototype.

Definition at line 113 of file WDataSetRawHARDI.cpp.

References m_prototype, and WDataSetRawHARDI().

+ Here is the call graph for this function:

◆ getZeroGradientIndexes()

std::vector< size_t > const & WDataSetRawHARDI::getZeroGradientIndexes ( ) const
inline

Get the indexes of zero gradients.

Returns
Returns the indexes for the which gradient is zero.

Definition at line 247 of file WDataSetRawHARDI.h.

References m_zeroGradientIndexes.

◆ init()

void WDataSetRawHARDI::init ( std::shared_ptr< WValueSetBase newValueSet,
std::shared_ptr< WGrid newGrid,
std::shared_ptr< std::vector< WVector3d > >  newGradients 
)
private

Makes only such initialization which is common to all contructors.

Parameters
newValueSetThe value set
newGridThe grid
newGradientsThe gradients

Definition at line 36 of file WDataSetRawHARDI.cpp.

References buildGradientIndexes().

Referenced by WDataSetRawHARDI().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_diffusionBValues

std::shared_ptr< std::vector< float > > WDataSetRawHARDI::m_diffusionBValues
private

Strength (b-value) of the so-called magnetic diffusion gradient.

The vector contains only one value, incase all gradients (except b0 images) share the same b-value.

Definition at line 234 of file WDataSetRawHARDI.h.

Referenced by getDiffusionBValue(), and getDiffusionBValues().

◆ m_gradients

std::shared_ptr< std::vector< WVector3d > > WDataSetRawHARDI::m_gradients
private

Gradients of measurements.

Definition at line 228 of file WDataSetRawHARDI.h.

Referenced by buildGradientIndexes(), clone(), getGradient(), getNumberOfMeasurements(), and getOrientations().

◆ m_nonZeroGradientIndexes

std::vector< size_t > WDataSetRawHARDI::m_nonZeroGradientIndexes
private

The indexes for the which gradient is non-zero.

Definition at line 244 of file WDataSetRawHARDI.h.

Referenced by buildGradientIndexes(), getNonZeroGradientIndexes(), and getNonZeroGradientSignals().

◆ m_prototype

std::shared_ptr< WPrototyped > WDataSetRawHARDI::m_prototype = std::shared_ptr< WPrototyped >()
staticprotected

The prototype as singleton.

Definition at line 210 of file WDataSetRawHARDI.h.

Referenced by getPrototype().

◆ m_zeroGradientIndexes

std::vector< size_t > WDataSetRawHARDI::m_zeroGradientIndexes
private

The indexes for the which gradient is zero.

Definition at line 239 of file WDataSetRawHARDI.h.

Referenced by buildGradientIndexes(), and getZeroGradientIndexes().


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