NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions > Class Template Reference

This filter integrates a time varying velocity field, using fourth order Runge-Kutta. This filter is basically a tidied up version of that in ANTS: http://www.picsl.upenn.edu/ANTS/ However, ANTS has the four timepoints back to front. I don't know if this is intentional. More...

Inheritance diagram for itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >:
Inheritance graph
[legend]
Collaboration diagram for itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >:
Collaboration graph
[legend]

Public Types

typedef
FourthOrderRungeKuttaVelocityFieldIntegrationFilter 
Self
 
typedef ImageToImageFilter
< Image< Vector< TScalarType,
NDimensions >, NDimensions+1 >
, Image< Vector< TScalarType,
NDimensions >, NDimensions > > 
Superclass
 
typedef SmartPointer< SelfPointer
 
typedef SmartPointer< const SelfConstPointer
 
typedef Vector< TScalarType,
NDimensions > 
TimeVaryingVelocityPixelType
 
typedef Image
< TimeVaryingVelocityPixelType,
NDimensions+1 > 
TimeVaryingVelocityImageType
 
typedef
TimeVaryingVelocityImageType::RegionType 
TimeVaryingVelocityRegionType
 
typedef
TimeVaryingVelocityImageType::IndexType 
TimeVaryingVelocityIndexType
 
typedef
TimeVaryingVelocityImageType::SizeType 
TimeVaryingVelocitySizeType
 
typedef
TimeVaryingVelocityImageType::PointType 
TimeVaryingVelocityPointType
 
typedef
TimeVaryingVelocityImageType::SpacingType 
TimeVaryingVelocitySpacingType
 
typedef
TimeVaryingVelocityImageType::DirectionType 
TimeVaryingVelocityDirectionType
 
typedef TScalarType MaskPixelType
 
typedef Image< MaskPixelType,
NDimensions > 
MaskImageType
 
typedef MaskImageType::Pointer MaskImagePointer
 
typedef MaskImageType::IndexType MaskImageIndexType
 
typedef MaskImageType::PointType MaskImagePointType
 
typedef Vector< TScalarType,
NDimensions > 
DisplacementPixelType
 
typedef Image
< DisplacementPixelType,
NDimensions > 
DisplacementImageType
 
typedef
DisplacementImageType::RegionType 
DisplacementImageRegionType
 
typedef
DisplacementImageType::IndexType 
DisplacementImageIndexType
 
typedef
DisplacementImageType::SizeType 
DisplacementImageSizeType
 
typedef
DisplacementImageType::PointType 
DisplacementImagePointType
 
typedef
DisplacementImageType::SpacingType 
DisplacementImageSpacingType
 
typedef
DisplacementImageType::DirectionType 
DisplacementImageDirectionType
 
typedef
VectorLinearInterpolateImageFunction
< TimeVaryingVelocityImageType,
TScalarType > 
TimeVaryingVelocityFieldInterpolatorType
 
typedef
TimeVaryingVelocityFieldInterpolatorType::Pointer 
TimeVaryingVelocityFieldInterpolatorPointer
 
typedef Point< TScalarType,
NDimensions+1 > 
TimeVaryingPointType
 
typedef Image< TScalarType,
NDimensions > 
ThicknessImageType
 
typedef
ThicknessImageType::PixelType 
ThicknessImagePixelType
 
typedef ThicknessImageType::Pointer ThicknessImagePointer
 
typedef
NearestNeighborInterpolateImageFunction
< ThicknessImageType,
TScalarType > 
ThicknessImageInterpolatorType
 
typedef
ThicknessImageInterpolatorType::Pointer 
ThicknessImageInterpolatorPointer
 

Public Member Functions

virtual const char * GetClassName () const
 
 itkStaticConstMacro (Dimension, unsigned int, NDimensions)
 
virtual void SetStartTime (float _arg)
 
virtual float GetStartTime ()
 
virtual void SetFinishTime (float _arg)
 
virtual float GetFinishTime ()
 
virtual void SetDeltaTime (float _arg)
 
virtual float GetDeltaTime ()
 
virtual void SetCalculateThickness (bool _arg)
 
virtual bool GetCalculateThickness ()
 
virtual float GetMaxThickness ()
 
virtual float GetMaxDisplacement ()
 
virtual float GetFieldEnergy ()
 
void SetVoxelsToIntegrateMaskImage (MaskImageType *image)
 
void SetMaxDistanceMaskImage (ThicknessImageType *maxDistance)
 
void SetGreyWhiteInterfaceMaskImage (MaskImageType *greyWhiteInterface)
 
ThicknessImageTypeGetCalculatedThicknessImage ()
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

 FourthOrderRungeKuttaVelocityFieldIntegrationFilter ()
 
 ~FourthOrderRungeKuttaVelocityFieldIntegrationFilter ()
 
void PrintSelf (std::ostream &os, Indent indent) const
 
virtual void BeforeThreadedGenerateData ()
 
virtual void ThreadedGenerateData (const DisplacementImageRegionType &regionForThread, ThreadIdType threadId)
 
virtual void AfterThreadedGenerateData ()
 

Detailed Description

template<typename TScalarType, unsigned int NDimensions = 3>
class itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >

This filter integrates a time varying velocity field, using fourth order Runge-Kutta. This filter is basically a tidied up version of that in ANTS: http://www.picsl.upenn.edu/ANTS/ However, ANTS has the four timepoints back to front. I don't know if this is intentional.

Also note, that I was reading Numerical Recipes in C, page 711, the bit on fourth-order Runge-Kutta method. If you are reading this, bear in mind that we are integrating through time. This means that for a 3D image, with x,y,z ordinates, and a time ordinate, that it is the time ordinate (index 3) that corresponds to x_n in Numerical Recipes. So, for a small shift in time, given by DeltaTime in this class, and h in Numerical Recipes, we calculate a new point location (x,y,z), analagous to y_n in Numerical Recipes.

Note also that we have start time and end time, normally, 0 and 1 respectively. If you reverse these you are integrating backwards, which computes the inverse. Also delta time controls the size of the step. We essentially start at start time (0), and at each step we add delta time (0.1 say) until we exceed end time (1). So, in effect this can be independent of the size of the time dimension of your velocity field. You could have delta time = 0.1, and have the size of your time dimension = 3.

The mask image, set using SetMaskImage, determines which voxels are integrated. Any value in this mask apart from zero, will cause that voxel to be integrated. It is assumed that this is the same size, as the input image (but obviously, only 1 time dimension).

The max distance mask is used to stop the integration if the Euclidean distance of a point has gone above that in the mask.

Once this class has integrated all the points in the mask, it is possible to compute a thickness image, as described in Das et. al. NeuroImage 2009 doi:10.1016/j.neuroimage.2008.12.016. To do this, a mask is set, currently called the SetGreyWhiteInterfaceMask method. For each of these voxels, the computed thickness value, is propogated through the velocity field. This could be done in another filter, with a small amount of refactoring, but it is in here for now. The result can be obtained by setting CalculateThickness to true, calling an Update and then GetCalculatedThicknessImage after the update.

Member Typedef Documentation

template<typename TScalarType , unsigned int NDimensions = 3>
typedef SmartPointer<const Self> itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::ConstPointer
template<typename TScalarType , unsigned int NDimensions = 3>
typedef DisplacementImageType::DirectionType itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::DisplacementImageDirectionType
template<typename TScalarType , unsigned int NDimensions = 3>
typedef DisplacementImageType::IndexType itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::DisplacementImageIndexType
template<typename TScalarType , unsigned int NDimensions = 3>
typedef DisplacementImageType::PointType itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::DisplacementImagePointType
template<typename TScalarType , unsigned int NDimensions = 3>
typedef DisplacementImageType::RegionType itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::DisplacementImageRegionType
template<typename TScalarType , unsigned int NDimensions = 3>
typedef DisplacementImageType::SizeType itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::DisplacementImageSizeType
template<typename TScalarType , unsigned int NDimensions = 3>
typedef DisplacementImageType::SpacingType itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::DisplacementImageSpacingType
template<typename TScalarType , unsigned int NDimensions = 3>
typedef Image< DisplacementPixelType, NDimensions> itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::DisplacementImageType
template<typename TScalarType , unsigned int NDimensions = 3>
typedef Vector< TScalarType, NDimensions > itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::DisplacementPixelType
template<typename TScalarType , unsigned int NDimensions = 3>
typedef MaskImageType::IndexType itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::MaskImageIndexType
template<typename TScalarType , unsigned int NDimensions = 3>
typedef MaskImageType::Pointer itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::MaskImagePointer
template<typename TScalarType , unsigned int NDimensions = 3>
typedef MaskImageType::PointType itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::MaskImagePointType
template<typename TScalarType , unsigned int NDimensions = 3>
typedef Image< MaskPixelType, NDimensions> itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::MaskImageType
template<typename TScalarType , unsigned int NDimensions = 3>
typedef TScalarType itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::MaskPixelType
template<typename TScalarType , unsigned int NDimensions = 3>
typedef SmartPointer<Self> itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::Pointer
template<typename TScalarType , unsigned int NDimensions = 3>
typedef FourthOrderRungeKuttaVelocityFieldIntegrationFilter itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::Self

Standard ITK "Self" typedefs.

template<typename TScalarType , unsigned int NDimensions = 3>
typedef ImageToImageFilter<Image< Vector<TScalarType, NDimensions>, NDimensions + 1>, Image< Vector<TScalarType, NDimensions>, NDimensions> > itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::Superclass
template<typename TScalarType , unsigned int NDimensions = 3>
typedef ThicknessImageInterpolatorType::Pointer itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::ThicknessImageInterpolatorPointer
template<typename TScalarType , unsigned int NDimensions = 3>
typedef NearestNeighborInterpolateImageFunction<ThicknessImageType, TScalarType> itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::ThicknessImageInterpolatorType
template<typename TScalarType , unsigned int NDimensions = 3>
typedef ThicknessImageType::PixelType itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::ThicknessImagePixelType
template<typename TScalarType , unsigned int NDimensions = 3>
typedef ThicknessImageType::Pointer itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::ThicknessImagePointer
template<typename TScalarType , unsigned int NDimensions = 3>
typedef Image<TScalarType, NDimensions> itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::ThicknessImageType
template<typename TScalarType , unsigned int NDimensions = 3>
typedef Point<TScalarType, NDimensions + 1> itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::TimeVaryingPointType
template<typename TScalarType , unsigned int NDimensions = 3>
typedef TimeVaryingVelocityImageType::DirectionType itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::TimeVaryingVelocityDirectionType
template<typename TScalarType , unsigned int NDimensions = 3>
typedef TimeVaryingVelocityFieldInterpolatorType::Pointer itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::TimeVaryingVelocityFieldInterpolatorPointer
template<typename TScalarType , unsigned int NDimensions = 3>
typedef VectorLinearInterpolateImageFunction< TimeVaryingVelocityImageType, TScalarType > itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::TimeVaryingVelocityFieldInterpolatorType
template<typename TScalarType , unsigned int NDimensions = 3>
typedef Image< TimeVaryingVelocityPixelType, NDimensions + 1 > itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::TimeVaryingVelocityImageType
template<typename TScalarType , unsigned int NDimensions = 3>
typedef TimeVaryingVelocityImageType::IndexType itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::TimeVaryingVelocityIndexType
template<typename TScalarType , unsigned int NDimensions = 3>
typedef Vector< TScalarType, NDimensions > itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::TimeVaryingVelocityPixelType

Standard typedefs.

template<typename TScalarType , unsigned int NDimensions = 3>
typedef TimeVaryingVelocityImageType::PointType itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::TimeVaryingVelocityPointType
template<typename TScalarType , unsigned int NDimensions = 3>
typedef TimeVaryingVelocityImageType::RegionType itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::TimeVaryingVelocityRegionType
template<typename TScalarType , unsigned int NDimensions = 3>
typedef TimeVaryingVelocityImageType::SizeType itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::TimeVaryingVelocitySizeType
template<typename TScalarType , unsigned int NDimensions = 3>
typedef TimeVaryingVelocityImageType::SpacingType itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::TimeVaryingVelocitySpacingType

Constructor & Destructor Documentation

template<typename TScalarType , unsigned int NDimensions = 3>
itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::FourthOrderRungeKuttaVelocityFieldIntegrationFilter ( )
protected
template<typename TScalarType , unsigned int NDimensions = 3>
itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::~FourthOrderRungeKuttaVelocityFieldIntegrationFilter ( )
inlineprotected

Member Function Documentation

template<typename TScalarType , unsigned int NDimensions = 3>
virtual void itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::AfterThreadedGenerateData ( )
protectedvirtual
template<typename TScalarType , unsigned int NDimensions = 3>
virtual void itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::BeforeThreadedGenerateData ( )
protectedvirtual
template<typename TScalarType , unsigned int NDimensions = 3>
ThicknessImageType* itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::GetCalculatedThicknessImage ( )
inline

Get the calculated thickness image.

template<typename TScalarType , unsigned int NDimensions = 3>
virtual bool itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::GetCalculateThickness ( )
virtual
template<typename TScalarType , unsigned int NDimensions = 3>
virtual const char* itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::GetClassName ( ) const
virtual

Run-time type information (and related methods).

template<typename TScalarType , unsigned int NDimensions = 3>
virtual float itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::GetDeltaTime ( )
virtual
template<typename TScalarType , unsigned int NDimensions = 3>
virtual float itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::GetFieldEnergy ( )
virtual

Get the field energy, the sum of the Euclidean norm of each velocity vector.

template<typename TScalarType , unsigned int NDimensions = 3>
virtual float itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::GetFinishTime ( )
virtual
template<typename TScalarType , unsigned int NDimensions = 3>
virtual float itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::GetMaxDisplacement ( )
virtual

Get the maximum displacement after the last update.

template<typename TScalarType , unsigned int NDimensions = 3>
virtual float itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::GetMaxThickness ( )
virtual

Get the maximum thickness after the last update.

template<typename TScalarType , unsigned int NDimensions = 3>
virtual float itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::GetStartTime ( )
virtual
template<typename TScalarType , unsigned int NDimensions = 3>
itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::itkStaticConstMacro ( Dimension  ,
unsigned  int,
NDimensions   
)

Get the number of dimensions we are working in.

template<typename TScalarType , unsigned int NDimensions = 3>
static Pointer itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::New ( )
static

Method for creation through the object factory.

template<typename TScalarType , unsigned int NDimensions = 3>
void itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
protected
template<typename TScalarType , unsigned int NDimensions = 3>
virtual void itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::SetCalculateThickness ( bool  _arg)
virtual

Flag to control thickness calculation. Default false=off.

template<typename TScalarType , unsigned int NDimensions = 3>
virtual void itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::SetDeltaTime ( float  _arg)
virtual

Delta time.

template<typename TScalarType , unsigned int NDimensions = 3>
virtual void itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::SetFinishTime ( float  _arg)
virtual

Finish time.

template<typename TScalarType , unsigned int NDimensions = 3>
void itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::SetGreyWhiteInterfaceMaskImage ( MaskImageType greyWhiteInterface)
inline

Set the grey white interface mask. The grey white interface mask memory is managed externally to this class.

template<typename TScalarType , unsigned int NDimensions = 3>
void itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::SetMaxDistanceMaskImage ( ThicknessImageType maxDistance)
inline

Set a distance mask, which is used to stop integrating if euclidean distance is greater than this mask value. The mask image memory is managed externally to this class.

template<typename TScalarType , unsigned int NDimensions = 3>
virtual void itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::SetStartTime ( float  _arg)
virtual

Start time.

template<typename TScalarType , unsigned int NDimensions = 3>
void itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::SetVoxelsToIntegrateMaskImage ( MaskImageType image)
inline

Set a binary mask such that only voxels within mask are integrated. The mask image memory is managed externally to this class.

template<typename TScalarType , unsigned int NDimensions = 3>
virtual void itk::FourthOrderRungeKuttaVelocityFieldIntegrationFilter< TScalarType, NDimensions >::ThreadedGenerateData ( const DisplacementImageRegionType regionForThread,
ThreadIdType  threadId 
)
protectedvirtual

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