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::DWIWriter< TPixelType, VImageDimension > Class Template Reference

#include <itkDWIWriter.h>

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

Detailed Description

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

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

The data format has two types:

******in data.txt****** b1.txt grad1.txt dwi1.nii.gz


All shells are stored in one file. Or ******in data.txt****** b1.txt grad1.txt dwi1.nii.gz b2.txt grad2.txt dwi2.nii.gz b3.txt grad3.txt dwi3.nii.gz


Each line is for a single shell data if it is set to store each shell.

dwi.hdr can be stored as VectorImage b.txt and grad.txt, dwi.nii.gz 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 60 of file itkDWIWriter.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 B0ImageType 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 DWIWriter 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

virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual std::string GetBFile ()
 
virtual std::string GetConfigurationFile ()
 
virtual std::string GetDWIFile ()
 
const DWIImageTypeGetInput ()
 
virtual const MaskImageTypeGetMaskImage () const
 
virtual const char * GetNameOfClass () const
 
virtual std::string GetOrientationFile ()
 
virtual bool GetOutputEachShell ()
 
virtual bool GetUseRelativePath ()
 
 itkGetObjectMacro (SamplingSchemeQSpace, SamplingSchemeQSpaceType)
 
 itkGetObjectMacro (B0Image, B0ImageType)
 
virtual void OutputEachShellOff ()
 
virtual void OutputEachShellOn ()
 
virtual void SetB0Image (B0ImageType *_arg)
 
virtual void SetBFile (std::string _arg)
 
virtual void SetConfigurationFile (std::string _arg)
 
virtual void SetDWIFile (std::string _arg)
 
void SetInput (const DWIImageType *input)
 
virtual void SetMaskImage (MaskImageType *_arg)
 
virtual void SetOrientationFile (std::string _arg)
 
virtual void SetOutputEachShell (bool _arg)
 
virtual void SetSamplingSchemeQSpace (SamplingSchemeQSpaceType *_arg)
 
virtual void SetUseRelativePath (bool _arg)
 
virtual void UseRelativePathOff ()
 
virtual void UseRelativePathOn ()
 
void WriteToConfigurationFile (const std::string &file)
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

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

Private Member Functions

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

Private Attributes

B0ImageType::Pointer m_B0Image
 
std::string m_BFile
 
std::string m_ConfigurationFile
 
std::string m_DWIFile
 
MaskImageType::Pointer m_MaskImage
 
std::string m_OrientationFile
 
bool m_OutputEachShell
 
SamplingSchemeQSpacePointer m_SamplingSchemeQSpace
 
bool m_UseRelativePath
 

Member Typedef Documentation

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

Definition at line 95 of file itkDWIWriter.h.

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

Definition at line 73 of file itkDWIWriter.h.

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

Definition at line 92 of file itkDWIWriter.h.

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

Definition at line 94 of file itkDWIWriter.h.

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

Definition at line 93 of file itkDWIWriter.h.

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

Definition at line 91 of file itkDWIWriter.h.

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

Definition at line 96 of file itkDWIWriter.h.

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

Definition at line 88 of file itkDWIWriter.h.

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

Definition at line 76 of file itkDWIWriter.h.

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

Definition at line 85 of file itkDWIWriter.h.

template<class TPixelType, unsigned int VImageDimension = 3>
typedef B0ImageType itk::DWIWriter< TPixelType, VImageDimension >::MaskImageType

Definition at line 77 of file itkDWIWriter.h.

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

Definition at line 80 of file itkDWIWriter.h.

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

Definition at line 79 of file itkDWIWriter.h.

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

Definition at line 87 of file itkDWIWriter.h.

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

Definition at line 67 of file itkDWIWriter.h.

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

Definition at line 86 of file itkDWIWriter.h.

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

Definition at line 99 of file itkDWIWriter.h.

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

Definition at line 98 of file itkDWIWriter.h.

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

Standard class typedefs.

Definition at line 65 of file itkDWIWriter.h.

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

Definition at line 84 of file itkDWIWriter.h.

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

Definition at line 89 of file itkDWIWriter.h.

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

Definition at line 82 of file itkDWIWriter.h.

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

Definition at line 81 of file itkDWIWriter.h.

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

Definition at line 66 of file itkDWIWriter.h.

Constructor & Destructor Documentation

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

Definition at line 29 of file itkDWIWriter.hxx.

References itk::DWIWriter< TPixelType, VImageDimension >::SetInput().

+ Here is the call graph for this function:

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

Definition at line 156 of file itkDWIWriter.h.

References ITK_OVERRIDE.

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

Member Function Documentation

template<class TPixelType, unsigned int VImageDimension = 3>
virtual::itk::LightObject::Pointer itk::DWIWriter< TPixelType, VImageDimension >::CreateAnother ( void  ) const
template<class TPixelType , unsigned int VImageDimension>
void itk::DWIWriter< TPixelType, VImageDimension >::GenerateData ( void  )
protectedvirtual

Does the real work.

Definition at line 167 of file itkDWIWriter.hxx.

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

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

+ 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::DWIWriter< TPixelType, VImageDimension >::GetBFile ( )
virtual
template<class TPixelType, unsigned int VImageDimension = 3>
virtual std::string itk::DWIWriter< TPixelType, VImageDimension >::GetConfigurationFile ( )
virtual
template<class TPixelType, unsigned int VImageDimension = 3>
virtual std::string itk::DWIWriter< TPixelType, VImageDimension >::GetDWIFile ( )
virtual
template<class TPixelType , unsigned int VImageDimension>
const DWIWriter< TPixelType, VImageDimension >::DWIImageType * itk::DWIWriter< TPixelType, VImageDimension >::GetInput ( void  )

Definition at line 52 of file itkDWIWriter.hxx.

References itk::DWIWriter< TPixelType, VImageDimension >::WriteToConfigurationFile().

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Run-time type information (and related methods).

template<class TPixelType, unsigned int VImageDimension = 3>
virtual std::string itk::DWIWriter< TPixelType, VImageDimension >::GetOrientationFile ( )
virtual
template<class TPixelType, unsigned int VImageDimension = 3>
virtual bool itk::DWIWriter< TPixelType, VImageDimension >::GetOutputEachShell ( )
virtual
template<class TPixelType, unsigned int VImageDimension = 3>
virtual bool itk::DWIWriter< TPixelType, VImageDimension >::GetUseRelativePath ( )
virtual
template<class TPixelType, unsigned int VImageDimension = 3>
itk::DWIWriter< TPixelType, VImageDimension >::itkGetObjectMacro ( SamplingSchemeQSpace  ,
SamplingSchemeQSpaceType   
)
template<class TPixelType, unsigned int VImageDimension = 3>
itk::DWIWriter< TPixelType, VImageDimension >::itkGetObjectMacro ( B0Image  ,
B0ImageType   
)
template<class TPixelType, unsigned int VImageDimension = 3>
static Pointer itk::DWIWriter< TPixelType, VImageDimension >::New ( )
static

Method for creation through the object factory.

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

Definition at line 178 of file itkDWIWriter.hxx.

References PrintVar2, and PrintVar4.

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

+ Here is the caller graph for this function:

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

Set/Get the mask image.

template<class TPixelType, unsigned int VImageDimension = 3>
virtual void itk::DWIWriter< TPixelType, VImageDimension >::SetBFile ( std::string  _arg)
virtual
template<class TPixelType, unsigned int VImageDimension = 3>
virtual void itk::DWIWriter< TPixelType, VImageDimension >::SetConfigurationFile ( std::string  _arg)
virtual
template<class TPixelType, unsigned int VImageDimension = 3>
virtual void itk::DWIWriter< TPixelType, VImageDimension >::SetDWIFile ( std::string  _arg)
virtual
template<class TPixelType , unsigned int VImageDimension>
void itk::DWIWriter< TPixelType, VImageDimension >::SetInput ( const DWIImageType input)

Definition at line 43 of file itkDWIWriter.hxx.

References itk::DWIWriter< TPixelType, VImageDimension >::GetInput().

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

+ 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::DWIWriter< TPixelType, VImageDimension >::SetMaskImage ( MaskImageType _arg)
virtual

Set/Get the mask image.

template<class TPixelType, unsigned int VImageDimension = 3>
virtual void itk::DWIWriter< TPixelType, VImageDimension >::SetOrientationFile ( std::string  _arg)
virtual
template<class TPixelType, unsigned int VImageDimension = 3>
virtual void itk::DWIWriter< TPixelType, VImageDimension >::SetOutputEachShell ( bool  _arg)
virtual

Output each shell

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

If set true, relative paths are used in configuration file

template<class TPixelType, unsigned int VImageDimension = 3>
virtual void itk::DWIWriter< TPixelType, VImageDimension >::UseRelativePathOff ( )
virtual
template<class TPixelType, unsigned int VImageDimension = 3>
virtual void itk::DWIWriter< TPixelType, VImageDimension >::UseRelativePathOn ( )
virtual
template<class TPixelType , unsigned int VImageDimension>
void itk::DWIWriter< TPixelType, VImageDimension >::WriteToConfigurationFile ( const std::string &  file)

The data format has two types:

******in data.txt****** b1.txt grad1.txt dwi1.nii.gz


All shells are stored in one file. Or ******in data.txt****** b1.txt grad1.txt dwi1.nii.gz b2.txt grad2.txt dwi2.nii.gz b3.txt grad3.txt dwi3.nii.gz


Each line is for a single shell data if it is set to store each shell.

Definition at line 66 of file itkDWIWriter.hxx.

References itk::DWIWriter< TPixelType, VImageDimension >::GenerateData(), utl::GetFileExtension(), utl::GetPath(), itk::IsImageEmpty(), utl::RoundNumber(), itk::SaveImage(), utl::SaveVector(), and utlException.

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

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

Definition at line 178 of file itkDWIWriter.h.

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

Definition at line 174 of file itkDWIWriter.h.

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

Definition at line 172 of file itkDWIWriter.h.

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

Definition at line 173 of file itkDWIWriter.h.

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

Definition at line 177 of file itkDWIWriter.h.

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

Definition at line 175 of file itkDWIWriter.h.

template<class TPixelType, unsigned int VImageDimension = 3>
bool itk::DWIWriter< TPixelType, VImageDimension >::m_OutputEachShell
private

Definition at line 170 of file itkDWIWriter.h.

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

Definition at line 167 of file itkDWIWriter.h.

template<class TPixelType, unsigned int VImageDimension = 3>
bool itk::DWIWriter< TPixelType, VImageDimension >::m_UseRelativePath
private

Definition at line 169 of file itkDWIWriter.h.


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