25 #ifndef WREADERNIFTI_H
26 #define WREADERNIFTI_H
32 #include <nifti1_io.h>
34 #include "core/common/math/WMatrix.h"
35 #include "core/dataHandler/WDataSet.h"
36 #include "core/dataHandler/io/WReader.h"
64 virtual std::shared_ptr< WDataSet >
load(
DataSetType dataSetType = W_DATASET_NONE );
91 typedef std::shared_ptr< std::vector< WVector3d > >
GradVec;
96 typedef std::shared_ptr< std::vector< float > >
BValues;
167 template <
typename T > std::shared_ptr< std::vector< T > >
copyArray(
const T* dataArray,
const size_t countVoxels,
const size_t vDim );
test class the nifti reader class
Reader for the NIfTI file format.
WMatrix< double > getQFormTransform() const
Returns the QForm transformation stored in the nifti file's header.
WMatrix< double > convertMatrix(const mat44 &in)
This function converts a 4x4 matrix from the NIfTI libs into the format used by OpenWalnut.
WMatrix< double > m_sform
the sform transform stored in the file header
WReaderNIfTI(std::string fileName)
Constructs a loader to be executed in its own thread and ets the data needed for the loader when exec...
GradVec readGradientsIfAvailable(unsigned int vDim)
Reads the additional gradient file if available.
WMatrix< double > getSFormTransform() const
Returns the SForm transformation stored in the nifti file's header.
WMatrix< double > m_qform
the qform transform stored in the file header
std::shared_ptr< std::vector< T > > copyArray(const T *dataArray, const size_t countVoxels, const size_t vDim)
This function allows one to copy the data given as a T* by niftilibio into a std::vector< T >
std::shared_ptr< std::vector< WVector3d > > GradVec
Shorthand type for a vector of gradients.
std::shared_ptr< std::vector< float > > BValues
Shorthand type for a vector of bvalues.
WMatrix< double > getStandardTransform() const
Returns a standard transformation.
virtual std::shared_ptr< WDataSet > load(DataSetType dataSetType=W_DATASET_NONE)
Loads the dataset.
BValues readBValuesIfAvailable(unsigned int vDim)
Reads the additional bval file if available.
Read some data from a given file.
DataSetType
Data set types.