Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
itk::KspaceImageFilter< TPixelType > Class Template Reference

Simulates k-space acquisition of one slice with a single shot EPI sequence. Enables the simulation of various effects occuring during real MR acquisitions: More...

#include <itkKspaceImageFilter.h>

Inheritance diagram for itk::KspaceImageFilter< TPixelType >:
Collaboration diagram for itk::KspaceImageFilter< TPixelType >:

Public Types

typedef KspaceImageFilter Self
 
typedef SmartPointer< SelfPointer
 
typedef SmartPointer< const SelfConstPointer
 
typedef ImageSource< Image< vcl_complex< TPixelType >, 2 > > Superclass
 
typedef itk::Image< double, 2 > InputImageType
 
typedef InputImageType::Pointer InputImagePointerType
 
typedef Superclass::OutputImageType OutputImageType
 
typedef Superclass::OutputImageRegionType OutputImageRegionType
 
typedef itk::Matrix< double, 3, 3 > MatrixType
 
typedef itk::Point< double, 2 > Point2D
 
typedef itk::Vector< double, 3 > DoubleVectorType
 
typedef itk::Image< double, 3 > ItkDoubleImgType
 
- Public Types inherited from mitk::ImageSource< Image< vcl_complex< TPixelType >, 2 > >
typedef ImageSource Self
 
typedef BaseDataSource Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef mitk::Image OutputImageType
 Some convenient typedefs. More...
 
typedef OutputImageType OutputType
 
typedef OutputImageType::Pointer OutputImagePointer
 
typedef SlicedData::RegionType OutputImageRegionType
 

Public Member Functions

Pointer Clone () const
 
virtual const char * GetClassName () const
 
virtual void SetSpikesPerSlice (unsigned int _arg)
 Number of spikes per slice. Corresponding parameter in fiberfox parameter object specifies the number of spikes for the whole image and can thus not be used here. More...
 
virtual void SetZ (double _arg)
 Slice position, necessary for eddy current simulation. More...
 
virtual void SetUseConstantRandSeed (bool _arg)
 Use constant seed for random generator for reproducible results. ONLY USE FOR TESTING PURPOSES! More...
 
virtual void SetRotation (DoubleVectorType _arg)
 
virtual void SetTranslation (DoubleVectorType _arg)
 
virtual void SetZidx (int _arg)
 
virtual void SetFiberBundle (FiberBundle::Pointer _arg)
 
virtual void SetCoilPosition (DoubleVectorType _arg)
 
virtual InputImageType::Pointer GetKSpaceImage ()
 k-space magnitude image More...
 
virtual std::string GetSpikeLog ()
 
void SetParameters (FiberfoxParameters< double > *param)
 
void SetCompartmentImages (std::vector< InputImagePointerType > cImgs)
 One signal image per compartment. More...
 
void SetT2 (std::vector< double > t2Vector)
 One T2 relaxation constant per compartment image. More...
 
void SetT1 (std::vector< double > t1Vector)
 One T1 relaxation constant per compartment image. More...
 
void SetDiffusionGradientDirection (itk::Vector< double, 3 > g)
 Gradient direction is needed for eddy current simulation. More...
 
- Public Member Functions inherited from mitk::ImageSource< Image< vcl_complex< TPixelType >, 2 > >
virtual std::vector< std::string > GetClassHierarchy () const override
 
Pointer Clone () const
 
OutputTypeGetOutput ()
 Get the output data of this image source object. More...
 
const OutputTypeGetOutput () const
 
OutputTypeGetOutput (DataObjectPointerArraySizeType idx)
 
const OutputTypeGetOutput (DataObjectPointerArraySizeType idx) const
 
virtual itk::DataObject::Pointer MakeOutput (DataObjectPointerArraySizeType idx) override
 Make a DataObject of the correct type to used as the specified output. More...
 
virtual itk::DataObject::Pointer MakeOutput (const DataObjectIdentifierType &name) override
 
virtual vtkImageData * GetVtkImageData ()
 
virtual const vtkImageData * GetVtkImageData () const
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from mitk::ImageSource< Image< vcl_complex< TPixelType >, 2 > >
static const char * GetStaticNameOfClass ()
 
static Pointer New ()
 Method for creation through the object factory. More...
 

Protected Member Functions

 KspaceImageFilter ()
 
 ~KspaceImageFilter ()
 
double CoilSensitivity (DoubleVectorType &pos)
 
void BeforeThreadedGenerateData ()
 If an imaging filter needs to perform processing after the buffer has been allocated but before threads are spawned, the filter can can provide an implementation for BeforeThreadedGenerateData(). More...
 
void ThreadedGenerateData (const OutputImageRegionType &outputRegionForThread, ThreadIdType threadID)
 
void AfterThreadedGenerateData ()
 If an imaging filter needs to perform processing after all processing threads have completed, the filter can can provide an implementation for AfterThreadedGenerateData(). More...
 
double InterpolateFmapValue (itk::Point< float, 3 > itkP)
 
- Protected Member Functions inherited from mitk::ImageSource< Image< vcl_complex< TPixelType >, 2 > >
 ImageSource ()
 
virtual ~ImageSource ()
 
virtual void GenerateData () override
 A version of GenerateData() specific for image processing filters. More...
 
virtual void ThreadedGenerateData (const OutputImageRegionType &outputRegionForThread, itk::ThreadIdType threadId)
 If an imaging filter can be implemented as a multithreaded algorithm, the filter will provide an implementation of ThreadedGenerateData(). More...
 
virtual void PrepareOutputs () override
 This method is intentionally left blank. More...
 
virtual void AllocateOutputs ()
 The GenerateData method normally allocates the buffers for all of the outputs of a filter. More...
 
virtual unsigned int SplitRequestedRegion (unsigned int i, unsigned int num, OutputImageRegionType &splitRegion)
 Split the output's RequestedRegion into "num" pieces, returning region "i" as "splitRegion". More...
 

Protected Attributes

DoubleVectorType m_CoilPosition
 
FiberfoxParameters< double > * m_Parameters
 
vector< double > m_T2
 
vector< double > m_T1
 
vector< InputImagePointerTypem_CompartmentImages
 
itk::Vector< double, 3 > m_DiffusionGradientDirection
 
double m_Z
 
int m_Zidx
 
bool m_UseConstantRandSeed
 
unsigned int m_SpikesPerSlice
 
FiberBundle::Pointer m_FiberBundle
 
double m_Gamma
 
DoubleVectorType m_Rotation
 used to find correct point in frequency map (head motion) More...
 
DoubleVectorType m_Translation
 used to find correct point in frequency map (head motion) More...
 
bool m_IsBaseline
 
vcl_complex< double > m_Spike
 
MatrixType m_Transform
 
std::string m_SpikeLog
 
double m_CoilSensitivityFactor
 
InputImageType::Pointer m_KSpaceImage
 
InputImageType::Pointer m_TimeFromEchoImage
 
InputImageType::Pointer m_ReadoutTimeImage
 
AcquisitionTypem_ReadoutScheme
 

Additional Inherited Members

- Static Protected Member Functions inherited from mitk::ImageSource< Image< vcl_complex< TPixelType >, 2 > >
static ITK_THREAD_RETURN_TYPE ThreaderCallback (void *arg)
 Static function used as a "callback" by the MultiThreader. More...
 

Detailed Description

template<class TPixelType>
class itk::KspaceImageFilter< TPixelType >

Simulates k-space acquisition of one slice with a single shot EPI sequence. Enables the simulation of various effects occuring during real MR acquisitions:

  • T2 signal relaxation
  • Spikes
  • N/2 Ghosts
  • Aliasing (wrap around)
  • Image distortions (off-frequency effects)
  • Gibbs ringing
  • Eddy current effects Based on a discrete fourier transformation. See "Fiberfox: Facilitating the creation of realistic white matter software phantoms" (DOI: 10.1002/mrm.25045) for details.

Definition at line 52 of file itkKspaceImageFilter.h.

Member Typedef Documentation

template<class TPixelType >
typedef SmartPointer<const Self> itk::KspaceImageFilter< TPixelType >::ConstPointer

Definition at line 60 of file itkKspaceImageFilter.h.

template<class TPixelType >
typedef itk::Vector< double,3> itk::KspaceImageFilter< TPixelType >::DoubleVectorType

Definition at line 76 of file itkKspaceImageFilter.h.

template<class TPixelType >
typedef InputImageType::Pointer itk::KspaceImageFilter< TPixelType >::InputImagePointerType

Definition at line 71 of file itkKspaceImageFilter.h.

template<class TPixelType >
typedef itk::Image< double, 2 > itk::KspaceImageFilter< TPixelType >::InputImageType

Definition at line 70 of file itkKspaceImageFilter.h.

template<class TPixelType >
typedef itk::Image<double, 3> itk::KspaceImageFilter< TPixelType >::ItkDoubleImgType

Definition at line 77 of file itkKspaceImageFilter.h.

template<class TPixelType >
typedef itk::Matrix<double, 3, 3> itk::KspaceImageFilter< TPixelType >::MatrixType

Definition at line 74 of file itkKspaceImageFilter.h.

template<class TPixelType >
typedef Superclass::OutputImageRegionType itk::KspaceImageFilter< TPixelType >::OutputImageRegionType

Definition at line 73 of file itkKspaceImageFilter.h.

template<class TPixelType >
typedef Superclass::OutputImageType itk::KspaceImageFilter< TPixelType >::OutputImageType

Definition at line 72 of file itkKspaceImageFilter.h.

template<class TPixelType >
typedef itk::Point<double,2> itk::KspaceImageFilter< TPixelType >::Point2D

Definition at line 75 of file itkKspaceImageFilter.h.

template<class TPixelType >
typedef SmartPointer<Self> itk::KspaceImageFilter< TPixelType >::Pointer

Definition at line 59 of file itkKspaceImageFilter.h.

template<class TPixelType >
typedef KspaceImageFilter itk::KspaceImageFilter< TPixelType >::Self

Definition at line 58 of file itkKspaceImageFilter.h.

template<class TPixelType >
typedef ImageSource< Image< vcl_complex< TPixelType >, 2 > > itk::KspaceImageFilter< TPixelType >::Superclass

Definition at line 61 of file itkKspaceImageFilter.h.

Constructor & Destructor Documentation

template<class TPixelType >
itk::KspaceImageFilter< TPixelType >::KspaceImageFilter ( )
protected

Definition at line 39 of file itkKspaceImageFilter.cpp.

template<class TPixelType >
itk::KspaceImageFilter< TPixelType >::~KspaceImageFilter ( )
inlineprotected

Definition at line 99 of file itkKspaceImageFilter.h.

Member Function Documentation

template<class TPixelType >
void itk::KspaceImageFilter< TPixelType >::AfterThreadedGenerateData ( )
protectedvirtual

If an imaging filter needs to perform processing after all processing threads have completed, the filter can can provide an implementation for AfterThreadedGenerateData().

The execution flow in the default GenerateData() method will be: 1) Allocate the output buffer 2) Call BeforeThreadedGenerateData() 3) Spawn threads, calling ThreadedGenerateData() in each thread. 4) Call AfterThreadedGenerateData() Note that this flow of control is only available if a filter provides a ThreadedGenerateData() method and NOT a GenerateData() method.

Reimplemented from mitk::ImageSource< Image< vcl_complex< TPixelType >, 2 > >.

Definition at line 336 of file itkKspaceImageFilter.cpp.

References mitk::New().

template<class TPixelType >
void itk::KspaceImageFilter< TPixelType >::BeforeThreadedGenerateData ( void  )
protectedvirtual

If an imaging filter needs to perform processing after the buffer has been allocated but before threads are spawned, the filter can can provide an implementation for BeforeThreadedGenerateData().

The execution flow in the default GenerateData() method will be: 1) Allocate the output buffer 2) Call BeforeThreadedGenerateData() 3) Spawn threads, calling ThreadedGenerateData() in each thread. 4) Call AfterThreadedGenerateData() Note that this flow of control is only available if a filter provides a ThreadedGenerateData() method and NOT a GenerateData() method.

Reimplemented from mitk::ImageSource< Image< vcl_complex< TPixelType >, 2 > >.

Definition at line 52 of file itkKspaceImageFilter.cpp.

References mitk::New().

template<class TPixelType >
Pointer itk::KspaceImageFilter< TPixelType >::Clone ( ) const
template<class TPixelType >
double itk::KspaceImageFilter< TPixelType >::CoilSensitivity ( DoubleVectorType pos)
protected

Definition at line 131 of file itkKspaceImageFilter.cpp.

template<class TPixelType >
virtual const char* itk::KspaceImageFilter< TPixelType >::GetClassName ( ) const
virtual

Runtime information support.

Reimplemented from mitk::ImageSource< Image< vcl_complex< TPixelType >, 2 > >.

template<class TPixelType >
virtual InputImageType::Pointer itk::KspaceImageFilter< TPixelType >::GetKSpaceImage ( )
virtual

k-space magnitude image

template<class TPixelType >
virtual std::string itk::KspaceImageFilter< TPixelType >::GetSpikeLog ( )
virtual
template<class TPixelType >
double itk::KspaceImageFilter< TPixelType >::InterpolateFmapValue ( itk::Point< float, 3 >  itkP)
protected

Definition at line 397 of file itkKspaceImageFilter.cpp.

template<class TPixelType >
static Pointer itk::KspaceImageFilter< TPixelType >::New ( )
static

Method for creation through the object factory.

Referenced by itk::TractsToDWIImageFilter< PixelType >::SimulateKspaceAcquisition().

template<class TPixelType >
virtual void itk::KspaceImageFilter< TPixelType >::SetCoilPosition ( DoubleVectorType  _arg)
virtual
template<class TPixelType >
void itk::KspaceImageFilter< TPixelType >::SetCompartmentImages ( std::vector< InputImagePointerType cImgs)
inline

One signal image per compartment.

Definition at line 92 of file itkKspaceImageFilter.h.

template<class TPixelType >
void itk::KspaceImageFilter< TPixelType >::SetDiffusionGradientDirection ( itk::Vector< double, 3 >  g)
inline

Gradient direction is needed for eddy current simulation.

Definition at line 95 of file itkKspaceImageFilter.h.

template<class TPixelType >
virtual void itk::KspaceImageFilter< TPixelType >::SetFiberBundle ( FiberBundle::Pointer  _arg)
virtual
template<class TPixelType >
void itk::KspaceImageFilter< TPixelType >::SetParameters ( FiberfoxParameters< double > *  param)
inline

Definition at line 90 of file itkKspaceImageFilter.h.

template<class TPixelType >
virtual void itk::KspaceImageFilter< TPixelType >::SetRotation ( DoubleVectorType  _arg)
virtual
template<class TPixelType >
virtual void itk::KspaceImageFilter< TPixelType >::SetSpikesPerSlice ( unsigned int  _arg)
virtual

Number of spikes per slice. Corresponding parameter in fiberfox parameter object specifies the number of spikes for the whole image and can thus not be used here.

template<class TPixelType >
void itk::KspaceImageFilter< TPixelType >::SetT1 ( std::vector< double >  t1Vector)
inline

One T1 relaxation constant per compartment image.

Definition at line 94 of file itkKspaceImageFilter.h.

template<class TPixelType >
void itk::KspaceImageFilter< TPixelType >::SetT2 ( std::vector< double >  t2Vector)
inline

One T2 relaxation constant per compartment image.

Definition at line 93 of file itkKspaceImageFilter.h.

template<class TPixelType >
virtual void itk::KspaceImageFilter< TPixelType >::SetTranslation ( DoubleVectorType  _arg)
virtual
template<class TPixelType >
virtual void itk::KspaceImageFilter< TPixelType >::SetUseConstantRandSeed ( bool  _arg)
virtual

Use constant seed for random generator for reproducible results. ONLY USE FOR TESTING PURPOSES!

template<class TPixelType >
virtual void itk::KspaceImageFilter< TPixelType >::SetZ ( double  _arg)
virtual

Slice position, necessary for eddy current simulation.

template<class TPixelType >
virtual void itk::KspaceImageFilter< TPixelType >::SetZidx ( int  _arg)
virtual
template<class TPixelType >
void itk::KspaceImageFilter< TPixelType >::ThreadedGenerateData ( const OutputImageRegionType outputRegionForThread,
ThreadIdType  threadID 
)
protected

Definition at line 163 of file itkKspaceImageFilter.cpp.

References M_PI, and mitk::New().

Member Data Documentation

template<class TPixelType >
DoubleVectorType itk::KspaceImageFilter< TPixelType >::m_CoilPosition
protected

Definition at line 108 of file itkKspaceImageFilter.h.

template<class TPixelType >
double itk::KspaceImageFilter< TPixelType >::m_CoilSensitivityFactor
protected

Definition at line 128 of file itkKspaceImageFilter.h.

template<class TPixelType >
vector< InputImagePointerType > itk::KspaceImageFilter< TPixelType >::m_CompartmentImages
protected

Definition at line 112 of file itkKspaceImageFilter.h.

template<class TPixelType >
itk::Vector<double,3> itk::KspaceImageFilter< TPixelType >::m_DiffusionGradientDirection
protected

Definition at line 113 of file itkKspaceImageFilter.h.

template<class TPixelType >
FiberBundle::Pointer itk::KspaceImageFilter< TPixelType >::m_FiberBundle
protected

Definition at line 118 of file itkKspaceImageFilter.h.

template<class TPixelType >
double itk::KspaceImageFilter< TPixelType >::m_Gamma
protected

Definition at line 119 of file itkKspaceImageFilter.h.

template<class TPixelType >
bool itk::KspaceImageFilter< TPixelType >::m_IsBaseline
protected

Definition at line 123 of file itkKspaceImageFilter.h.

template<class TPixelType >
InputImageType::Pointer itk::KspaceImageFilter< TPixelType >::m_KSpaceImage
protected

Definition at line 129 of file itkKspaceImageFilter.h.

template<class TPixelType >
FiberfoxParameters<double>* itk::KspaceImageFilter< TPixelType >::m_Parameters
protected

Definition at line 109 of file itkKspaceImageFilter.h.

template<class TPixelType >
AcquisitionType* itk::KspaceImageFilter< TPixelType >::m_ReadoutScheme
protected

Definition at line 132 of file itkKspaceImageFilter.h.

template<class TPixelType >
InputImageType::Pointer itk::KspaceImageFilter< TPixelType >::m_ReadoutTimeImage
protected

Definition at line 131 of file itkKspaceImageFilter.h.

template<class TPixelType >
DoubleVectorType itk::KspaceImageFilter< TPixelType >::m_Rotation
protected

used to find correct point in frequency map (head motion)

Definition at line 120 of file itkKspaceImageFilter.h.

template<class TPixelType >
vcl_complex<double> itk::KspaceImageFilter< TPixelType >::m_Spike
protected

Definition at line 124 of file itkKspaceImageFilter.h.

template<class TPixelType >
std::string itk::KspaceImageFilter< TPixelType >::m_SpikeLog
protected

Definition at line 126 of file itkKspaceImageFilter.h.

template<class TPixelType >
unsigned int itk::KspaceImageFilter< TPixelType >::m_SpikesPerSlice
protected

Definition at line 117 of file itkKspaceImageFilter.h.

template<class TPixelType >
vector< double > itk::KspaceImageFilter< TPixelType >::m_T1
protected

Definition at line 111 of file itkKspaceImageFilter.h.

template<class TPixelType >
vector< double > itk::KspaceImageFilter< TPixelType >::m_T2
protected

Definition at line 110 of file itkKspaceImageFilter.h.

template<class TPixelType >
InputImageType::Pointer itk::KspaceImageFilter< TPixelType >::m_TimeFromEchoImage
protected

Definition at line 130 of file itkKspaceImageFilter.h.

template<class TPixelType >
MatrixType itk::KspaceImageFilter< TPixelType >::m_Transform
protected

Definition at line 125 of file itkKspaceImageFilter.h.

template<class TPixelType >
DoubleVectorType itk::KspaceImageFilter< TPixelType >::m_Translation
protected

used to find correct point in frequency map (head motion)

Definition at line 121 of file itkKspaceImageFilter.h.

template<class TPixelType >
bool itk::KspaceImageFilter< TPixelType >::m_UseConstantRandSeed
protected

Definition at line 116 of file itkKspaceImageFilter.h.

template<class TPixelType >
double itk::KspaceImageFilter< TPixelType >::m_Z
protected

Definition at line 114 of file itkKspaceImageFilter.h.

template<class TPixelType >
int itk::KspaceImageFilter< TPixelType >::m_Zidx
protected

Definition at line 115 of file itkKspaceImageFilter.h.


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