Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
itk::TractsToDWIImageFilter< PixelType > Class Template Reference

Generates artificial diffusion weighted image volume from the input fiberbundle using a generic multicompartment model. See "Fiberfox: Facilitating the creation of realistic white matter software phantoms" (DOI: 10.1002/mrm.25045) for details. More...

#include <itkTractsToDWIImageFilter.h>

Inheritance diagram for itk::TractsToDWIImageFilter< PixelType >:
Collaboration diagram for itk::TractsToDWIImageFilter< PixelType >:

Public Types

typedef TractsToDWIImageFilter Self
 
typedef ImageSource< itk::VectorImage< PixelType, 3 > > Superclass
 
typedef SmartPointer< SelfPointer
 
typedef SmartPointer< const SelfConstPointer
 
typedef Superclass::OutputImageType OutputImageType
 
typedef itk::Image< double, 4 > ItkDoubleImgType4D
 
typedef itk::Image< double, 3 > ItkDoubleImgType
 
typedef itk::Image< float, 3 > ItkFloatImgType
 
typedef itk::Image< unsigned char, 3 > ItkUcharImgType
 
typedef mitk::FiberBundle::Pointer FiberBundleType
 
typedef itk::VectorImage< double, 3 > DoubleDwiType
 
typedef itk::Matrix< double, 3, 3 > MatrixType
 
typedef itk::Image< double, 2 > SliceType
 
typedef itk::VnlForwardFFTImageFilter< SliceType >::OutputImageType ComplexSliceType
 
typedef itk::VectorImage< vcl_complex< double >, 3 > ComplexDwiType
 
typedef itk::Vector< double, 3 > DoubleVectorType
 

Public Member Functions

Pointer Clone () const
 
virtual const char * GetClassName () const
 
virtual void SetFiberBundle (FiberBundleType _arg)
 Input fiber bundle. More...
 
virtual void SetInputImage (typename OutputImageType::Pointer _arg)
 Input diffusion-weighted image. If no fiber bundle is set, then the acquisition is simulated for this image without a new diffusion simulation. More...
 
virtual void SetUseConstantRandSeed (bool _arg)
 Seed for random generator. More...
 
void SetParameters (FiberfoxParameters< double > param)
 
FiberfoxParameters< double > GetParameters ()
 
std::vector< ItkDoubleImgType::Pointer > GetVolumeFractions ()
 
mitk::LevelWindow GetLevelWindow ()
 
virtual std::string GetStatusText ()
 
virtual DoubleDwiType::Pointer GetPhaseImage ()
 
virtual DoubleDwiType::Pointer GetKspaceImage ()
 
virtual mitk::PointSet::Pointer GetCoilPointset ()
 
void GenerateData ()
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

 TractsToDWIImageFilter ()
 
virtual ~TractsToDWIImageFilter ()
 
itk::Point< float, 3 > GetItkPoint (double point[3])
 
itk::Vector< double, 3 > GetItkVector (double point[3])
 
vnl_vector_fixed< double, 3 > GetVnlVector (double point[3])
 
vnl_vector_fixed< double, 3 > GetVnlVector (Vector< float, 3 > &vector)
 
double RoundToNearest (double num)
 
std::string GetTime ()
 
bool PrepareLogFile ()
 
void PrintToLog (string m, bool addTime=true, bool linebreak=true, bool stdOut=true)
 
DoubleDwiType::Pointer SimulateKspaceAcquisition (std::vector< DoubleDwiType::Pointer > &images)
 
void SimulateExtraAxonalSignal (ItkUcharImgType::IndexType index, double intraAxonalVolume, int g=-1)
 
void SimulateMotion (int g=-1)
 
void CheckVolumeFractionImages ()
 
ItkDoubleImgType::Pointer NormalizeInsideMask (ItkDoubleImgType::Pointer image)
 
void InitializeData ()
 
void InitializeFiberData ()
 
double InterpolateValue (itk::Point< float, 3 > itkP, ItkDoubleImgType::Pointer img)
 

Protected Attributes

mitk::FiberfoxParameters< double > m_Parameters
 
FiberBundleType m_FiberBundle
 
OutputImageType::Pointer m_InputImage
 
OutputImageType::Pointer m_OutputImage
 
DoubleDwiType::Pointer m_PhaseImage
 
DoubleDwiType::Pointer m_KspaceImage
 
mitk::LevelWindow m_LevelWindow
 
std::vector< ItkDoubleImgType::Pointer > m_VolumeFractions
 
std::string m_StatusText
 
itk::TimeProbe m_TimeProbe
 
bool m_UseConstantRandSeed
 
bool m_MaskImageSet
 
ofstream m_Logfile
 
std::string m_MotionLog
 
std::string m_SpikeLog
 
FiberBundleType m_FiberBundleWorkingCopy
 we work on an upsampled version of the input bundle More...
 
FiberBundleType m_FiberBundleTransformed
 transformed bundle simulating headmotion More...
 
itk::Vector< double, 3 > m_WorkingSpacing
 
itk::Point< double, 3 > m_WorkingOrigin
 
ImageRegion< 3 > m_WorkingImageRegion
 
double m_VoxelVolume
 
std::vector< DoubleDwiType::Pointer > m_CompartmentImages
 
ItkUcharImgType::Pointer m_TransformedMaskImage
 copy of mask image (changes for each motion step) More...
 
ItkUcharImgType::Pointer m_UpsampledMaskImage
 helper image for motion simulation More...
 
DoubleVectorType m_Rotation
 
DoubleVectorType m_Translation
 
std::vector< DoubleVectorTypem_Rotations
 stores the individual rotation of each volume (needed for k-space simulation to obtain correct frequency map position) More...
 
std::vector< DoubleVectorTypem_Translations
 stores the individual translation of each volume (needed for k-space simulation to obtain correct frequency map position) More...
 
double m_mmRadius
 
double m_SegmentVolume
 
bool m_UseRelativeNonFiberVolumeFractions
 
mitk::PointSet::Pointer m_CoilPointset
 
int m_MotionCounter
 
int m_NumMotionVolumes
 
itk::Statistics::MersenneTwisterRandomVariateGenerator::Pointer m_RandGen
 

Detailed Description

template<class PixelType>
class itk::TractsToDWIImageFilter< PixelType >

Generates artificial diffusion weighted image volume from the input fiberbundle using a generic multicompartment model. See "Fiberfox: Facilitating the creation of realistic white matter software phantoms" (DOI: 10.1002/mrm.25045) for details.

Definition at line 38 of file itkTractsToDWIImageFilter.h.

Member Typedef Documentation

template<class PixelType>
typedef itk::VectorImage< vcl_complex< double >, 3 > itk::TractsToDWIImageFilter< PixelType >::ComplexDwiType

Definition at line 58 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
typedef itk::VnlForwardFFTImageFilter<SliceType>::OutputImageType itk::TractsToDWIImageFilter< PixelType >::ComplexSliceType

Definition at line 57 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
typedef SmartPointer< const Self > itk::TractsToDWIImageFilter< PixelType >::ConstPointer

Definition at line 46 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
typedef itk::VectorImage< double, 3 > itk::TractsToDWIImageFilter< PixelType >::DoubleDwiType

Definition at line 54 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
typedef itk::Vector< double,3> itk::TractsToDWIImageFilter< PixelType >::DoubleVectorType

Definition at line 59 of file itkTractsToDWIImageFilter.h.

Definition at line 53 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
typedef itk::Image<double, 3> itk::TractsToDWIImageFilter< PixelType >::ItkDoubleImgType

Definition at line 50 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
typedef itk::Image<double, 4> itk::TractsToDWIImageFilter< PixelType >::ItkDoubleImgType4D

Definition at line 49 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
typedef itk::Image<float, 3> itk::TractsToDWIImageFilter< PixelType >::ItkFloatImgType

Definition at line 51 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
typedef itk::Image<unsigned char, 3> itk::TractsToDWIImageFilter< PixelType >::ItkUcharImgType

Definition at line 52 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
typedef itk::Matrix<double, 3, 3> itk::TractsToDWIImageFilter< PixelType >::MatrixType

Definition at line 55 of file itkTractsToDWIImageFilter.h.

Definition at line 48 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
typedef SmartPointer< Self > itk::TractsToDWIImageFilter< PixelType >::Pointer

Definition at line 45 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
typedef TractsToDWIImageFilter itk::TractsToDWIImageFilter< PixelType >::Self

Definition at line 43 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
typedef itk::Image< double, 2 > itk::TractsToDWIImageFilter< PixelType >::SliceType

Definition at line 56 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
typedef ImageSource< itk::VectorImage< PixelType, 3 > > itk::TractsToDWIImageFilter< PixelType >::Superclass

Definition at line 44 of file itkTractsToDWIImageFilter.h.

Constructor & Destructor Documentation

template<class PixelType >
itk::TractsToDWIImageFilter< PixelType >::~TractsToDWIImageFilter ( )
protectedvirtual

Definition at line 71 of file itkTractsToDWIImageFilter.cpp.

Member Function Documentation

template<class PixelType >
void itk::TractsToDWIImageFilter< PixelType >::CheckVolumeFractionImages ( )
protected

Definition at line 375 of file itkTractsToDWIImageFilter.cpp.

References mitk::New().

template<class PixelType>
Pointer itk::TractsToDWIImageFilter< PixelType >::Clone ( ) const
template<class PixelType >
void itk::TractsToDWIImageFilter< PixelType >::GenerateData ( )

Definition at line 863 of file itkTractsToDWIImageFilter.cpp.

References max(), min(), and mitk::New().

template<class PixelType>
virtual const char* itk::TractsToDWIImageFilter< PixelType >::GetClassName ( ) const
virtual
template<class PixelType>
virtual mitk::PointSet::Pointer itk::TractsToDWIImageFilter< PixelType >::GetCoilPointset ( )
virtual
template<class PixelType >
itk::Point< float, 3 > itk::TractsToDWIImageFilter< PixelType >::GetItkPoint ( double  point[3])
protected

Definition at line 1615 of file itkTractsToDWIImageFilter.cpp.

template<class PixelType >
itk::Vector< double, 3 > itk::TractsToDWIImageFilter< PixelType >::GetItkVector ( double  point[3])
protected

Definition at line 1625 of file itkTractsToDWIImageFilter.cpp.

template<class PixelType>
virtual DoubleDwiType::Pointer itk::TractsToDWIImageFilter< PixelType >::GetKspaceImage ( )
virtual
template<class PixelType>
mitk::LevelWindow itk::TractsToDWIImageFilter< PixelType >::GetLevelWindow ( )
inline
template<class PixelType>
FiberfoxParameters<double> itk::TractsToDWIImageFilter< PixelType >::GetParameters ( )
inline
template<class PixelType>
virtual DoubleDwiType::Pointer itk::TractsToDWIImageFilter< PixelType >::GetPhaseImage ( )
virtual
template<class PixelType>
virtual std::string itk::TractsToDWIImageFilter< PixelType >::GetStatusText ( )
virtual
template<class PixelType >
std::string itk::TractsToDWIImageFilter< PixelType >::GetTime ( )
protected

Definition at line 1660 of file itkTractsToDWIImageFilter.cpp.

template<class PixelType >
vnl_vector_fixed< double, 3 > itk::TractsToDWIImageFilter< PixelType >::GetVnlVector ( double  point[3])
protected

Definition at line 1635 of file itkTractsToDWIImageFilter.cpp.

template<class PixelType >
vnl_vector_fixed< double, 3 > itk::TractsToDWIImageFilter< PixelType >::GetVnlVector ( Vector< float, 3 > &  vector)
protected

Definition at line 1645 of file itkTractsToDWIImageFilter.cpp.

template<class PixelType>
std::vector< ItkDoubleImgType::Pointer > itk::TractsToDWIImageFilter< PixelType >::GetVolumeFractions ( )
inline
template<class PixelType >
void itk::TractsToDWIImageFilter< PixelType >::InitializeData ( )
protected
template<class PixelType >
void itk::TractsToDWIImageFilter< PixelType >::InitializeFiberData ( )
protected

Definition at line 741 of file itkTractsToDWIImageFilter.cpp.

References M_PI.

template<class PixelType >
double itk::TractsToDWIImageFilter< PixelType >::InterpolateValue ( itk::Point< float, 3 >  itkP,
ItkDoubleImgType::Pointer  img 
)
protected

Definition at line 1544 of file itkTractsToDWIImageFilter.cpp.

template<class PixelType>
static Pointer itk::TractsToDWIImageFilter< PixelType >::New ( )
static

Referenced by main().

template<class PixelType >
TractsToDWIImageFilter< PixelType >::ItkDoubleImgType::Pointer itk::TractsToDWIImageFilter< PixelType >::NormalizeInsideMask ( ItkDoubleImgType::Pointer  image)
protected

Definition at line 343 of file itkTractsToDWIImageFilter.cpp.

References max(), min(), and mitk::New().

template<class PixelType >
bool itk::TractsToDWIImageFilter< PixelType >::PrepareLogFile ( )
protected

Definition at line 774 of file itkTractsToDWIImageFilter.cpp.

References mitk::IOUtil::GetTempPath(), max(), and MITK_ERROR.

template<class PixelType >
void itk::TractsToDWIImageFilter< PixelType >::PrintToLog ( string  m,
bool  addTime = true,
bool  linebreak = true,
bool  stdOut = true 
)
protected

Prepares the log file and returns true if successful or false if failed.

Definition at line 1227 of file itkTractsToDWIImageFilter.cpp.

template<class PixelType >
double itk::TractsToDWIImageFilter< PixelType >::RoundToNearest ( double  num)
protected

Definition at line 1655 of file itkTractsToDWIImageFilter.cpp.

template<class PixelType>
virtual void itk::TractsToDWIImageFilter< PixelType >::SetFiberBundle ( FiberBundleType  _arg)
virtual

Input fiber bundle.

Input

template<class PixelType>
virtual void itk::TractsToDWIImageFilter< PixelType >::SetInputImage ( typename OutputImageType::Pointer  _arg)
virtual

Input diffusion-weighted image. If no fiber bundle is set, then the acquisition is simulated for this image without a new diffusion simulation.

template<class PixelType>
void itk::TractsToDWIImageFilter< PixelType >::SetParameters ( FiberfoxParameters< double >  param)
inline
Parameters
paramSimulation parameters.

Definition at line 69 of file itkTractsToDWIImageFilter.h.

References itk::TractsToDWIImageFilter< PixelType >::m_Parameters.

template<class PixelType>
virtual void itk::TractsToDWIImageFilter< PixelType >::SetUseConstantRandSeed ( bool  _arg)
virtual

Seed for random generator.

template<class PixelType >
void itk::TractsToDWIImageFilter< PixelType >::SimulateExtraAxonalSignal ( ItkUcharImgType::IndexType  index,
double  intraAxonalVolume,
int  g = -1 
)
protected

Generate signal of non-fiber compartments.

Definition at line 1377 of file itkTractsToDWIImageFilter.cpp.

References MITK_ERROR.

template<class PixelType >
TractsToDWIImageFilter< PixelType >::DoubleDwiType::Pointer itk::TractsToDWIImageFilter< PixelType >::SimulateKspaceAcquisition ( std::vector< DoubleDwiType::Pointer > &  images)
protected

Transform generated image compartment by compartment, channel by channel and slice by slice using DFT and add k-space artifacts/effects.

Definition at line 78 of file itkTractsToDWIImageFilter.cpp.

References mitk::DiffusionSignalModel< ScalarType >::GetT1(), mitk::DiffusionSignalModel< ScalarType >::GetT2(), M_PI, mitk::New(), itk::DftImageFilter< TPixelType >::New(), itk::KspaceImageFilter< TPixelType >::New(), and mitk::PointSet::New().

template<class PixelType >
void itk::TractsToDWIImageFilter< PixelType >::SimulateMotion ( int  g = -1)
protected

Move fibers to simulate headmotion

Definition at line 1257 of file itkTractsToDWIImageFilter.cpp.

Member Data Documentation

template<class PixelType>
mitk::PointSet::Pointer itk::TractsToDWIImageFilter< PixelType >::m_CoilPointset
protected

Definition at line 151 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
std::vector< DoubleDwiType::Pointer > itk::TractsToDWIImageFilter< PixelType >::m_CompartmentImages
protected

Definition at line 141 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
FiberBundleType itk::TractsToDWIImageFilter< PixelType >::m_FiberBundle
protected

Definition at line 115 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
FiberBundleType itk::TractsToDWIImageFilter< PixelType >::m_FiberBundleTransformed
protected

transformed bundle simulating headmotion

Definition at line 136 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
FiberBundleType itk::TractsToDWIImageFilter< PixelType >::m_FiberBundleWorkingCopy
protected

we work on an upsampled version of the input bundle

Definition at line 135 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
OutputImageType::Pointer itk::TractsToDWIImageFilter< PixelType >::m_InputImage
protected

Definition at line 116 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
DoubleDwiType::Pointer itk::TractsToDWIImageFilter< PixelType >::m_KspaceImage
protected

Definition at line 121 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
mitk::LevelWindow itk::TractsToDWIImageFilter< PixelType >::m_LevelWindow
protected
template<class PixelType>
ofstream itk::TractsToDWIImageFilter< PixelType >::m_Logfile
protected

Definition at line 130 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
bool itk::TractsToDWIImageFilter< PixelType >::m_MaskImageSet
protected

Definition at line 129 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
double itk::TractsToDWIImageFilter< PixelType >::m_mmRadius
protected

Definition at line 148 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
int itk::TractsToDWIImageFilter< PixelType >::m_MotionCounter
protected

Definition at line 152 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
std::string itk::TractsToDWIImageFilter< PixelType >::m_MotionLog
protected

Definition at line 131 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
int itk::TractsToDWIImageFilter< PixelType >::m_NumMotionVolumes
protected

Definition at line 153 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
OutputImageType::Pointer itk::TractsToDWIImageFilter< PixelType >::m_OutputImage
protected

Definition at line 119 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
DoubleDwiType::Pointer itk::TractsToDWIImageFilter< PixelType >::m_PhaseImage
protected

Definition at line 120 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
itk::Statistics::MersenneTwisterRandomVariateGenerator::Pointer itk::TractsToDWIImageFilter< PixelType >::m_RandGen
protected
template<class PixelType>
DoubleVectorType itk::TractsToDWIImageFilter< PixelType >::m_Rotation
protected

Definition at line 144 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
std::vector< DoubleVectorType > itk::TractsToDWIImageFilter< PixelType >::m_Rotations
protected

stores the individual rotation of each volume (needed for k-space simulation to obtain correct frequency map position)

Definition at line 146 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
double itk::TractsToDWIImageFilter< PixelType >::m_SegmentVolume
protected

Definition at line 149 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
std::string itk::TractsToDWIImageFilter< PixelType >::m_SpikeLog
protected

Definition at line 132 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
std::string itk::TractsToDWIImageFilter< PixelType >::m_StatusText
protected

Definition at line 124 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
itk::TimeProbe itk::TractsToDWIImageFilter< PixelType >::m_TimeProbe
protected

Definition at line 127 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
ItkUcharImgType::Pointer itk::TractsToDWIImageFilter< PixelType >::m_TransformedMaskImage
protected

copy of mask image (changes for each motion step)

Definition at line 142 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
DoubleVectorType itk::TractsToDWIImageFilter< PixelType >::m_Translation
protected

Definition at line 145 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
std::vector< DoubleVectorType > itk::TractsToDWIImageFilter< PixelType >::m_Translations
protected

stores the individual translation of each volume (needed for k-space simulation to obtain correct frequency map position)

Definition at line 147 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
ItkUcharImgType::Pointer itk::TractsToDWIImageFilter< PixelType >::m_UpsampledMaskImage
protected

helper image for motion simulation

Definition at line 143 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
bool itk::TractsToDWIImageFilter< PixelType >::m_UseConstantRandSeed
protected

Definition at line 128 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
bool itk::TractsToDWIImageFilter< PixelType >::m_UseRelativeNonFiberVolumeFractions
protected

Definition at line 150 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
std::vector< ItkDoubleImgType::Pointer > itk::TractsToDWIImageFilter< PixelType >::m_VolumeFractions
protected
template<class PixelType>
double itk::TractsToDWIImageFilter< PixelType >::m_VoxelVolume
protected

Definition at line 140 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
ImageRegion<3> itk::TractsToDWIImageFilter< PixelType >::m_WorkingImageRegion
protected

Definition at line 139 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
itk::Point<double,3> itk::TractsToDWIImageFilter< PixelType >::m_WorkingOrigin
protected

Definition at line 138 of file itkTractsToDWIImageFilter.h.

template<class PixelType>
itk::Vector<double,3> itk::TractsToDWIImageFilter< PixelType >::m_WorkingSpacing
protected

Definition at line 137 of file itkTractsToDWIImageFilter.h.


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