25 #ifndef WDATASETRAWHARDI_H
26 #define WDATASETRAWHARDI_H
32 #include "../common/math/linearAlgebra/WVectorFixed.h"
33 #include "WDataSetSingle.h"
55 std::shared_ptr< WGrid > newGrid,
56 std::shared_ptr< std::vector< WVector3d > > newGradients,
57 double diffusionBValue = 1.0 );
71 std::shared_ptr< WGrid > newGrid,
72 std::shared_ptr< std::vector< WVector3d > > newGradients,
73 std::shared_ptr< std::vector< float > > diffusionBValues );
94 virtual WDataSetSingle::SPtr clone( std::shared_ptr< WValueSetBase > newValueSet, std::shared_ptr< WGrid > newGrid )
const;
153 virtual const std::string
getName()
const;
220 void init( std::shared_ptr< WValueSetBase > newValueSet,
221 std::shared_ptr< WGrid > newGrid,
222 std::shared_ptr< std::vector< WVector3d > > newGradients );
261 std::shared_ptr< WValueSet< T > > vs = std::dynamic_pointer_cast< WValueSet< T > >(
m_valueSet );
265 result[ idx ] = signal[ *cit ];
This data set type contains raw HARDI and its gradients.
virtual const std::string getDescription() const
Gets the description for this prototype.
virtual const std::string getName() const
Gets the name of this prototype.
std::shared_ptr< std::vector< WVector3d > > m_gradients
Gradients of measurements.
std::vector< size_t > m_zeroGradientIndexes
The indexes for the which gradient is zero.
std::vector< size_t > const & getNonZeroGradientIndexes() const
Get the indexes of non-zero gradients.
virtual ~WDataSetRawHARDI()
Destroys this DataSet instance.
WValue< T > getNonZeroGradientSignals(size_t index) const
Returns only the measurements for which the gradient was non-zero.
std::vector< size_t > const & getZeroGradientIndexes() const
Get the indexes of zero gradients.
virtual WDataSetSingle::SPtr clone() const
Creates a copy (clone) of this instance.
std::shared_ptr< std::vector< float > > m_diffusionBValues
Strength (b-value) of the so-called magnetic diffusion gradient.
const WVector3d & getGradient(size_t index) const
Returns the gradient for the index.
void buildGradientIndexes()
Build indexes for the zero and non-zero gradients.
static std::shared_ptr< WPrototyped > m_prototype
The prototype as singleton.
std::vector< size_t > m_nonZeroGradientIndexes
The indexes for the which gradient is non-zero.
double getDiffusionBValue() const
Returns the b-value of the diffusion.
WDataSetRawHARDI()
Construct an empty and unusable instance.
std::shared_ptr< std::vector< float > > getDiffusionBValues() const
Returns the b-values of the diffusion if there are different values.
static std::shared_ptr< WPrototyped > getPrototype()
Returns a prototype instantiated with the true type of the deriving class.
std::shared_ptr< std::vector< WVector3d > > getOrientations() const
Get the orientations.
std::size_t getNumberOfMeasurements() const
Returns the count of measurements per voxel, which is equal to the count of the used gradients.
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.
A data set consisting of a set of values based on a grid.
std::shared_ptr< WValueSetBase > m_valueSet
Stores the reference of the WValueSet of this DataSetSingle instance.
std::shared_ptr< WDataSetSingle > SPtr
Convenience typedef for a std::shared_ptr.
Base class for all higher level values like tensors, vectors, matrices and so on.