DMRITool  v0.1.1-139-g860d86b4
Diffusion MRI Tool
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
itk::DWIReader< TPixelType, VImageDimension > Class Template Reference

#include <itkDWIReader.h>

+ Inheritance diagram for itk::DWIReader< TPixelType, VImageDimension >:
+ Collaboration diagram for itk::DWIReader< TPixelType, VImageDimension >:

Detailed Description

template<class TPixelType, unsigned int VImageDimension = 3>
class itk::DWIReader< TPixelType, VImageDimension >

Load gradient file, b values and DWI files (with optional index file)

The data format has two types:

******in data.txt******************* 650 grad1.txt dwi1.nii index1.txt 1500 grad2.txt dwi2.nii index2.txt 3000 grad3.txt dwi3.nii index3.txt


Each line is for a single shell data. If the dimension N in grad.txt is smaller than the dimension M in dwi.nii, the first M-N dimension in dwi.hpp is for b0 image index.txt (optional) shows the index requested for reading. dwi.hdr can be stored as VectorImage or Image

******in data.txt********************* b1.txt grad1.txt dwi1.nii index1.txt b2.txt grad2.txt dwi2.nii index2.txt b3.txt grad3.txt dwi3.nii index3.txt


b.txt and grad.txt should have the same dimension

Author
Jian Cheng (JC), jian..nosp@m.chen.nosp@m.g.198.nosp@m.3@gm.nosp@m.ail.c.nosp@m.om

Definition at line 59 of file itkDWIReader.h.

Public Types

typedef B0ImageType::DirectionType B0DirectionType
 
typedef Image< TPixelType, VImageDimension > B0ImageType
 
typedef B0ImageType::IndexType B0IndexType
 
typedef B0ImageType::PixelType B0PixelType
 
typedef B0ImageType::RegionType B0RegionType
 
typedef B0ImageType::SizeType B0SizeType
 
typedef B0ImageType::SpacingType B0SpacingType
 
typedef DWIImageType::DirectionType DirectionType
 
typedef VectorImage< TPixelType, VImageDimension > DWIImageType
 
typedef DWIImageType::IndexType IndexType
 
typedef Image< double, VImageDimension > MaskImageType
 
typedef utl_shared_ptr< MatrixTypeMatrixPointer
 
typedef utl::NDArray< double, 2 > MatrixType
 
typedef DWIImageType::PixelType PixelType
 
typedef SmartPointer< SelfPointer
 
typedef DWIImageType::RegionType RegionType
 
typedef SamplingSchemeQSpaceType::Pointer SamplingSchemeQSpacePointer
 
typedef SamplingSchemeQSpace< double > SamplingSchemeQSpaceType
 
typedef DWIReader Self
 
typedef DWIImageType::SizeType SizeType
 
typedef DWIImageType::SpacingType SpacingType
 
typedef utl_shared_ptr< STDVectorTypeSTDVectorPointer
 
typedef std::vector< double > STDVectorType
 
typedef ImageSource< VectorImage< TPixelType, VImageDimension > > Superclass
 

Public Member Functions

void CorrectDWI ()
 
virtual void CorrectDWIValuesOff ()
 
virtual void CorrectDWIValuesOn ()
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual std::string GetConfigurationFile ()
 
virtual bool GetCorrectDWIValues ()
 
DWIImageType::Pointer GetDWIImage ()
 
virtual bool GetIsInput4DImage ()
 
virtual const MaskImageTypeGetMaskImage () const
 
virtual const char * GetNameOfClass () const
 
virtual bool GetNormalizeDWI ()
 
virtual bool GetShowWarnings ()
 
virtual void IsInput4DImageOff ()
 
virtual void IsInput4DImageOn ()
 
 itkGetObjectMacro (B0Image, B0ImageType)
 
 itkGetObjectMacro (SamplingSchemeQSpace, SamplingSchemeQSpaceType)
 
void NormalizeDWI ()
 
virtual void NormalizeDWIOff ()
 
virtual void NormalizeDWIOn ()
 
void ReadFromConfigurationFile (const std::string &file)
 
virtual void SetB0Image (B0ImageType *_arg)
 
virtual void SetConfigurationFile (std::string _arg)
 
virtual void SetCorrectDWIValues (bool _arg)
 
virtual void SetIsInput4DImage (bool _arg)
 
virtual void SetMaskImage (MaskImageType *_arg)
 
virtual void SetNormalizeDWI (bool _arg)
 
virtual void SetSamplingSchemeQSpace (SamplingSchemeQSpaceType *_arg)
 
virtual void SetShowWarnings (bool _arg)
 
virtual void ShowWarningsOff ()
 
virtual void ShowWarningsOn ()
 

Static Public Member Functions

static bool DetermineIsInput4DImage (const std::string &dataStr)
 
static Pointer New ()
 

Protected Member Functions

 DWIReader ()
 
virtual void GenerateData () ITK_OVERRIDE
 
void PrintSelf (std::ostream &os, Indent indent) const ITK_OVERRIDE
 
virtual ~DWIReader ()
 

Private Member Functions

 DWIReader (const Self &)
 
void operator= (const Self &)
 

Private Attributes

B0ImageType::Pointer m_B0Image
 
std::string m_ConfigurationFile
 
bool m_CorrectDWIValues
 
bool m_IsInput4DImage
 
MaskImageType::Pointer m_MaskImage
 
bool m_NormalizeDWI
 
SamplingSchemeQSpacePointer m_SamplingSchemeQSpace
 
bool m_ShowWarnings
 

Member Typedef Documentation

template<class TPixelType , unsigned int VImageDimension = 3>
typedef B0ImageType::DirectionType itk::DWIReader< TPixelType, VImageDimension >::B0DirectionType

Definition at line 94 of file itkDWIReader.h.

template<class TPixelType , unsigned int VImageDimension = 3>
typedef Image<TPixelType, VImageDimension> itk::DWIReader< TPixelType, VImageDimension >::B0ImageType

Definition at line 72 of file itkDWIReader.h.

template<class TPixelType , unsigned int VImageDimension = 3>
typedef B0ImageType::IndexType itk::DWIReader< TPixelType, VImageDimension >::B0IndexType

Definition at line 91 of file itkDWIReader.h.

template<class TPixelType , unsigned int VImageDimension = 3>
typedef B0ImageType::PixelType itk::DWIReader< TPixelType, VImageDimension >::B0PixelType

Definition at line 93 of file itkDWIReader.h.

template<class TPixelType , unsigned int VImageDimension = 3>
typedef B0ImageType::RegionType itk::DWIReader< TPixelType, VImageDimension >::B0RegionType

Definition at line 92 of file itkDWIReader.h.

template<class TPixelType , unsigned int VImageDimension = 3>
typedef B0ImageType::SizeType itk::DWIReader< TPixelType, VImageDimension >::B0SizeType

Definition at line 90 of file itkDWIReader.h.

template<class TPixelType , unsigned int VImageDimension = 3>
typedef B0ImageType::SpacingType itk::DWIReader< TPixelType, VImageDimension >::B0SpacingType

Definition at line 95 of file itkDWIReader.h.

template<class TPixelType , unsigned int VImageDimension = 3>
typedef DWIImageType::DirectionType itk::DWIReader< TPixelType, VImageDimension >::DirectionType

Definition at line 87 of file itkDWIReader.h.

template<class TPixelType , unsigned int VImageDimension = 3>
typedef VectorImage<TPixelType, VImageDimension> itk::DWIReader< TPixelType, VImageDimension >::DWIImageType

Definition at line 75 of file itkDWIReader.h.

template<class TPixelType , unsigned int VImageDimension = 3>
typedef DWIImageType::IndexType itk::DWIReader< TPixelType, VImageDimension >::IndexType

Definition at line 84 of file itkDWIReader.h.

template<class TPixelType , unsigned int VImageDimension = 3>
typedef Image<double, VImageDimension> itk::DWIReader< TPixelType, VImageDimension >::MaskImageType

Definition at line 76 of file itkDWIReader.h.

template<class TPixelType , unsigned int VImageDimension = 3>
typedef utl_shared_ptr<MatrixType> itk::DWIReader< TPixelType, VImageDimension >::MatrixPointer

Definition at line 79 of file itkDWIReader.h.

template<class TPixelType , unsigned int VImageDimension = 3>
typedef utl::NDArray<double,2> itk::DWIReader< TPixelType, VImageDimension >::MatrixType

Definition at line 78 of file itkDWIReader.h.

template<class TPixelType , unsigned int VImageDimension = 3>
typedef DWIImageType::PixelType itk::DWIReader< TPixelType, VImageDimension >::PixelType

Definition at line 86 of file itkDWIReader.h.

template<class TPixelType , unsigned int VImageDimension = 3>
typedef SmartPointer< Self > itk::DWIReader< TPixelType, VImageDimension >::Pointer

Definition at line 66 of file itkDWIReader.h.

template<class TPixelType , unsigned int VImageDimension = 3>
typedef DWIImageType::RegionType itk::DWIReader< TPixelType, VImageDimension >::RegionType

Definition at line 85 of file itkDWIReader.h.

template<class TPixelType , unsigned int VImageDimension = 3>
typedef SamplingSchemeQSpaceType::Pointer itk::DWIReader< TPixelType, VImageDimension >::SamplingSchemeQSpacePointer

Definition at line 98 of file itkDWIReader.h.

template<class TPixelType , unsigned int VImageDimension = 3>
typedef SamplingSchemeQSpace<double> itk::DWIReader< TPixelType, VImageDimension >::SamplingSchemeQSpaceType

Definition at line 97 of file itkDWIReader.h.

template<class TPixelType , unsigned int VImageDimension = 3>
typedef DWIReader itk::DWIReader< TPixelType, VImageDimension >::Self

Standard class typedefs.

Definition at line 64 of file itkDWIReader.h.

template<class TPixelType , unsigned int VImageDimension = 3>
typedef DWIImageType::SizeType itk::DWIReader< TPixelType, VImageDimension >::SizeType

Definition at line 83 of file itkDWIReader.h.

template<class TPixelType , unsigned int VImageDimension = 3>
typedef DWIImageType::SpacingType itk::DWIReader< TPixelType, VImageDimension >::SpacingType

Definition at line 88 of file itkDWIReader.h.

template<class TPixelType , unsigned int VImageDimension = 3>
typedef utl_shared_ptr<STDVectorType > itk::DWIReader< TPixelType, VImageDimension >::STDVectorPointer

Definition at line 81 of file itkDWIReader.h.

template<class TPixelType , unsigned int VImageDimension = 3>
typedef std::vector<double> itk::DWIReader< TPixelType, VImageDimension >::STDVectorType

Definition at line 80 of file itkDWIReader.h.

template<class TPixelType , unsigned int VImageDimension = 3>
typedef ImageSource< VectorImage<TPixelType, VImageDimension> > itk::DWIReader< TPixelType, VImageDimension >::Superclass

Definition at line 65 of file itkDWIReader.h.

Constructor & Destructor Documentation

template<class TPixelType , unsigned int VImageDimension>
itk::DWIReader< TPixelType, VImageDimension >::DWIReader ( )
protected

Definition at line 33 of file itkDWIReader.hxx.

References itk::DWIReader< TPixelType, VImageDimension >::DetermineIsInput4DImage().

+ Here is the call graph for this function:

template<class TPixelType , unsigned int VImageDimension = 3>
virtual itk::DWIReader< TPixelType, VImageDimension >::~DWIReader ( )
inlineprotectedvirtual

Definition at line 178 of file itkDWIReader.h.

References ITK_OVERRIDE.

template<class TPixelType , unsigned int VImageDimension = 3>
itk::DWIReader< TPixelType, VImageDimension >::DWIReader ( const Self )
private

Member Function Documentation

template<class TPixelType , unsigned int VImageDimension>
void itk::DWIReader< TPixelType, VImageDimension >::CorrectDWI ( )

correct DWI values if they are negative or they are larger than values in b0 image

Definition at line 502 of file itkDWIReader.hxx.

References itk::IsImageEmpty(), utl::max(), itk::DWIReader< TPixelType, VImageDimension >::NormalizeDWI(), utlGlobalException, and utlShowPosition.

Referenced by itk::DWIReader< TPixelType, VImageDimension >::ReadFromConfigurationFile().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class TPixelType , unsigned int VImageDimension = 3>
virtual void itk::DWIReader< TPixelType, VImageDimension >::CorrectDWIValuesOff ( )
virtual
template<class TPixelType , unsigned int VImageDimension = 3>
virtual void itk::DWIReader< TPixelType, VImageDimension >::CorrectDWIValuesOn ( )
virtual
template<class TPixelType , unsigned int VImageDimension = 3>
virtual::itk::LightObject::Pointer itk::DWIReader< TPixelType, VImageDimension >::CreateAnother ( void  ) const
template<class TPixelType , unsigned int VImageDimension>
bool itk::DWIReader< TPixelType, VImageDimension >::DetermineIsInput4DImage ( const std::string &  dataStr)
static

Definition at line 50 of file itkDWIReader.hxx.

References itk::DWIReader< TPixelType, VImageDimension >::ReadFromConfigurationFile().

Referenced by itk::DWIReader< TPixelType, VImageDimension >::DWIReader().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class TPixelType , unsigned int VImageDimension>
void itk::DWIReader< TPixelType, VImageDimension >::GenerateData ( void  )
protectedvirtual

Does the real work.

Definition at line 628 of file itkDWIReader.hxx.

References itk::DWIReader< TPixelType, VImageDimension >::PrintSelf(), and utlGlobalException.

Referenced by itk::DWIReader< TPixelType, VImageDimension >::NormalizeDWI().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class TPixelType , unsigned int VImageDimension = 3>
virtual std::string itk::DWIReader< TPixelType, VImageDimension >::GetConfigurationFile ( )
virtual
template<class TPixelType , unsigned int VImageDimension = 3>
virtual bool itk::DWIReader< TPixelType, VImageDimension >::GetCorrectDWIValues ( )
virtual
template<class TPixelType , unsigned int VImageDimension = 3>
DWIImageType::Pointer itk::DWIReader< TPixelType, VImageDimension >::GetDWIImage ( )
inline

Definition at line 111 of file itkDWIReader.h.

template<class TPixelType , unsigned int VImageDimension = 3>
virtual bool itk::DWIReader< TPixelType, VImageDimension >::GetIsInput4DImage ( )
virtual
template<class TPixelType , unsigned int VImageDimension = 3>
virtual const MaskImageType* itk::DWIReader< TPixelType, VImageDimension >::GetMaskImage ( ) const
virtual
template<class TPixelType , unsigned int VImageDimension = 3>
virtual const char* itk::DWIReader< TPixelType, VImageDimension >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

template<class TPixelType , unsigned int VImageDimension = 3>
virtual bool itk::DWIReader< TPixelType, VImageDimension >::GetNormalizeDWI ( )
virtual
template<class TPixelType , unsigned int VImageDimension = 3>
virtual bool itk::DWIReader< TPixelType, VImageDimension >::GetShowWarnings ( )
virtual
template<class TPixelType , unsigned int VImageDimension = 3>
virtual void itk::DWIReader< TPixelType, VImageDimension >::IsInput4DImageOff ( )
virtual
template<class TPixelType , unsigned int VImageDimension = 3>
virtual void itk::DWIReader< TPixelType, VImageDimension >::IsInput4DImageOn ( )
virtual
template<class TPixelType , unsigned int VImageDimension = 3>
itk::DWIReader< TPixelType, VImageDimension >::itkGetObjectMacro ( B0Image  ,
B0ImageType   
)
template<class TPixelType , unsigned int VImageDimension = 3>
itk::DWIReader< TPixelType, VImageDimension >::itkGetObjectMacro ( SamplingSchemeQSpace  ,
SamplingSchemeQSpaceType   
)
template<class TPixelType , unsigned int VImageDimension = 3>
static Pointer itk::DWIReader< TPixelType, VImageDimension >::New ( )
static

Method for creation through the object factory.

template<class TPixelType , unsigned int VImageDimension>
void itk::DWIReader< TPixelType, VImageDimension >::NormalizeDWI ( )

normalize DWI images using b0 image

Definition at line 596 of file itkDWIReader.hxx.

References itk::DWIReader< TPixelType, VImageDimension >::GenerateData(), utlGlobalException, and utlShowPosition.

Referenced by itk::DWIReader< TPixelType, VImageDimension >::CorrectDWI().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class TPixelType , unsigned int VImageDimension = 3>
virtual void itk::DWIReader< TPixelType, VImageDimension >::NormalizeDWIOff ( )
virtual
template<class TPixelType , unsigned int VImageDimension = 3>
virtual void itk::DWIReader< TPixelType, VImageDimension >::NormalizeDWIOn ( )
virtual
template<class TPixelType , unsigned int VImageDimension = 3>
void itk::DWIReader< TPixelType, VImageDimension >::operator= ( const Self )
private
template<class TPixelType , unsigned int VImageDimension>
void itk::DWIReader< TPixelType, VImageDimension >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
protected

Definition at line 650 of file itkDWIReader.hxx.

References itk::IsImageEmpty(), PrintVar1, and PrintVar3.

Referenced by itk::DWIReader< TPixelType, VImageDimension >::GenerateData().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class TPixelType , unsigned int VImageDimension>
void itk::DWIReader< TPixelType, VImageDimension >::ReadFromConfigurationFile ( const std::string &  file)

The data format has two types:

******in data.txt******************* 650 grad1.txt dwi1.nii index1.txt 1500 grad2.txt dwi2.nii index2.txt 3000 grad3.txt dwi3.nii index3.txt


Each line is for a single shell data. If the dimension N in grad.txt is smaller than the dimension M in dwi.nii, the first M-N dimension in dwi.hpp is for b0 image index.txt (optional) shows the index requested for reading. dwi.hdr can be stored as VectorImage or Image

******in data.txt********************* b1.txt grad1.txt dwi1.nii index1.txt b2.txt grad2.txt dwi2.nii index2.txt b3.txt grad3.txt dwi3.nii index3.txt


b.txt and grad.txt should have the same dimension

Definition at line 74 of file itkDWIReader.hxx.

References spams::abs(), itk::DWIReader< TPixelType, VImageDimension >::CorrectDWI(), utl::GetPath(), utl::IsFileExist(), itk::IsImageEmpty(), utl::IsInVector(), utl::IsNumber(), itk::PrintVariableLengthVector(), utl::PrintVector(), utl::ReadLinesFirstlineCheck(), utl::ReadVector(), utlGlobalException, utlPrintVar, utlShowPosition, and itk::VerifyImageInformation().

Referenced by itk::DWIReader< TPixelType, VImageDimension >::DetermineIsInput4DImage().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class TPixelType , unsigned int VImageDimension = 3>
virtual void itk::DWIReader< TPixelType, VImageDimension >::SetB0Image ( B0ImageType _arg)
virtual

Set/Get the mask image.

template<class TPixelType , unsigned int VImageDimension = 3>
virtual void itk::DWIReader< TPixelType, VImageDimension >::SetConfigurationFile ( std::string  _arg)
virtual
template<class TPixelType , unsigned int VImageDimension = 3>
virtual void itk::DWIReader< TPixelType, VImageDimension >::SetCorrectDWIValues ( bool  _arg)
virtual

If set on, correct values

template<class TPixelType , unsigned int VImageDimension = 3>
virtual void itk::DWIReader< TPixelType, VImageDimension >::SetIsInput4DImage ( bool  _arg)
virtual

If set on, convert 4D DWI image into 3D VectorImage

template<class TPixelType , unsigned int VImageDimension = 3>
virtual void itk::DWIReader< TPixelType, VImageDimension >::SetMaskImage ( MaskImageType _arg)
virtual

Set/Get the mask image.

template<class TPixelType , unsigned int VImageDimension = 3>
virtual void itk::DWIReader< TPixelType, VImageDimension >::SetNormalizeDWI ( bool  _arg)
virtual

If set on, output DWI Image will be normalized using B0Image

template<class TPixelType , unsigned int VImageDimension = 3>
virtual void itk::DWIReader< TPixelType, VImageDimension >::SetSamplingSchemeQSpace ( SamplingSchemeQSpaceType _arg)
virtual
template<class TPixelType , unsigned int VImageDimension = 3>
virtual void itk::DWIReader< TPixelType, VImageDimension >::SetShowWarnings ( bool  _arg)
virtual

if it is true, print some warnings if the dwi values are abnormal (i.e. zero, negative, larger than b0 value)

template<class TPixelType , unsigned int VImageDimension = 3>
virtual void itk::DWIReader< TPixelType, VImageDimension >::ShowWarningsOff ( )
virtual
template<class TPixelType , unsigned int VImageDimension = 3>
virtual void itk::DWIReader< TPixelType, VImageDimension >::ShowWarningsOn ( )
virtual

Member Data Documentation

template<class TPixelType , unsigned int VImageDimension = 3>
B0ImageType::Pointer itk::DWIReader< TPixelType, VImageDimension >::m_B0Image
private

Definition at line 201 of file itkDWIReader.h.

template<class TPixelType , unsigned int VImageDimension = 3>
std::string itk::DWIReader< TPixelType, VImageDimension >::m_ConfigurationFile
private

Definition at line 196 of file itkDWIReader.h.

template<class TPixelType , unsigned int VImageDimension = 3>
bool itk::DWIReader< TPixelType, VImageDimension >::m_CorrectDWIValues
private

Definition at line 194 of file itkDWIReader.h.

template<class TPixelType , unsigned int VImageDimension = 3>
bool itk::DWIReader< TPixelType, VImageDimension >::m_IsInput4DImage
private

Definition at line 193 of file itkDWIReader.h.

template<class TPixelType , unsigned int VImageDimension = 3>
MaskImageType::Pointer itk::DWIReader< TPixelType, VImageDimension >::m_MaskImage
private

Definition at line 200 of file itkDWIReader.h.

template<class TPixelType , unsigned int VImageDimension = 3>
bool itk::DWIReader< TPixelType, VImageDimension >::m_NormalizeDWI
private

Definition at line 191 of file itkDWIReader.h.

template<class TPixelType , unsigned int VImageDimension = 3>
SamplingSchemeQSpacePointer itk::DWIReader< TPixelType, VImageDimension >::m_SamplingSchemeQSpace
private

Definition at line 189 of file itkDWIReader.h.

template<class TPixelType , unsigned int VImageDimension = 3>
bool itk::DWIReader< TPixelType, VImageDimension >::m_ShowWarnings
private

Definition at line 198 of file itkDWIReader.h.


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