SimpleITK  1.3.0.dev57
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
itk::simple::SymmetricForcesDemonsRegistrationFilter Class Reference

Deformably register two images using the demons algorithm. More...

#include <sitkSymmetricForcesDemonsRegistrationFilter.h>

+ Inheritance diagram for itk::simple::SymmetricForcesDemonsRegistrationFilter:
+ Collaboration diagram for itk::simple::SymmetricForcesDemonsRegistrationFilter:

Public Types

typedef BasicPixelIDTypeList PixelIDTypeList
 
typedef SymmetricForcesDemonsRegistrationFilter Self
 
- Public Types inherited from itk::simple::ImageFilter< 0 >
typedef ImageFilter Self
 
- Public Types inherited from itk::simple::ProcessObject
typedef ProcessObject Self
 

Public Member Functions

Image Execute (const Image &fixedImage, const Image &movingImage, const Image &initialDisplacementField)
 
Image Execute (const Image &fixedImage, const Image &movingImage)
 
Image Execute (const Image &fixedImage, const Image &movingImage, const Image &initialDisplacementField, const std::vector< double > &standardDeviations, uint32_t numberOfIterations, double maximumRMSError, bool smoothDisplacementField, bool smoothUpdateField, const std::vector< double > &updateFieldStandardDeviations, unsigned int maximumKernelWidth, double maximumError, double intensityDifferenceThreshold, bool useImageSpacing)
 
Image Execute (const Image &fixedImage, const Image &movingImage, const std::vector< double > &standardDeviations, uint32_t numberOfIterations, double maximumRMSError, bool smoothDisplacementField, bool smoothUpdateField, const std::vector< double > &updateFieldStandardDeviations, unsigned int maximumKernelWidth, double maximumError, double intensityDifferenceThreshold, bool useImageSpacing)
 
uint32_t GetElapsedIterations () const
 Number of iterations run. More...
 
double GetIntensityDifferenceThreshold () const
 
double GetMaximumError () const
 
unsigned int GetMaximumKernelWidth () const
 
double GetMaximumRMSError () const
 
double GetMetric () const
 
std::string GetName () const
 
uint32_t GetNumberOfIterations () const
 
double GetRMSChange () const
 
bool GetSmoothDisplacementField () const
 
bool GetSmoothUpdateField () const
 
std::vector< double > GetStandardDeviations () const
 
std::vector< double > GetUpdateFieldStandardDeviations () const
 
bool GetUseImageSpacing () const
 
SelfSetIntensityDifferenceThreshold (double IntensityDifferenceThreshold)
 
SelfSetMaximumError (double MaximumError)
 
SelfSetMaximumKernelWidth (unsigned int MaximumKernelWidth)
 
SelfSetMaximumRMSError (double MaximumRMSError)
 
SelfSetNumberOfIterations (uint32_t NumberOfIterations)
 
SelfSetSmoothDisplacementField (bool SmoothDisplacementField)
 
SelfSetSmoothUpdateField (bool SmoothUpdateField)
 
SelfSetStandardDeviations (const std::vector< double > &StandardDeviations)
 
SelfSetStandardDeviations (double value)
 
SelfSetUpdateFieldStandardDeviations (const std::vector< double > &UpdateFieldStandardDeviations)
 
SelfSetUpdateFieldStandardDeviations (double value)
 
SelfSetUseImageSpacing (bool UseImageSpacing)
 
SelfSmoothDisplacementFieldOff ()
 
SelfSmoothDisplacementFieldOn ()
 
SelfSmoothUpdateFieldOff ()
 
SelfSmoothUpdateFieldOn ()
 
 SymmetricForcesDemonsRegistrationFilter ()
 
std::string ToString () const
 
SelfUseImageSpacingOff ()
 
SelfUseImageSpacingOn ()
 
virtual ~SymmetricForcesDemonsRegistrationFilter ()
 
- Public Member Functions inherited from itk::simple::ImageFilter< 0 >
 ImageFilter ()
 
virtual ~ImageFilter ()=0
 
- Public Member Functions inherited from itk::simple::ProcessObject
virtual void Abort ()
 
virtual int AddCommand (itk::simple::EventEnum event, itk::simple::Command &cmd)
 Add a Command Object to observer the event. More...
 
virtual float GetProgress () const
 An Active Measurement of the progress of execution. More...
 
virtual bool HasCommand (itk::simple::EventEnum event) const
 Query of this object has any registered commands for event. More...
 
 ProcessObject ()
 
virtual void RemoveAllCommands ()
 Remove all registered commands. More...
 
virtual ~ProcessObject ()
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
virtual bool GetDebug () const
 
virtual void SetDebug (bool debugFlag)
 
virtual void SetNumberOfThreads (unsigned int n)
 
virtual unsigned int GetNumberOfThreads () const
 

Private Types

typedef Image(Self::* MemberFunctionType) (const Image *fixedImage, const Image *movingImage, const Image *initialDisplacementField)
 

Private Member Functions

template<class TImageType >
Image ExecuteInternal (const Image *fixedImage, const Image *movingImage, const Image *initialDisplacementField)
 

Private Attributes

itk::ProcessObjectm_Filter
 
double m_IntensityDifferenceThreshold
 
double m_MaximumError
 
unsigned int m_MaximumKernelWidth
 
double m_MaximumRMSError
 
nsstd::auto_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
 
uint32_t m_NumberOfIterations
 
nsstd::function< uint32_t()> m_pfGetElapsedIterations
 
nsstd::function< double()> m_pfGetMetric
 
double m_RMSChange
 
bool m_SmoothDisplacementField
 
bool m_SmoothUpdateField
 
std::vector< double > m_StandardDeviations
 
std::vector< double > m_UpdateFieldStandardDeviations
 
bool m_UseImageSpacing
 

Friends

struct detail::MemberFunctionAddressor< MemberFunctionType >
 

Additional Inherited Members

- Static Public Member Functions inherited from itk::simple::ProcessObject
static bool GetGlobalDefaultDebug ()
 
static void GlobalDefaultDebugOff ()
 
static void GlobalDefaultDebugOn ()
 
static void SetGlobalDefaultDebug (bool debugFlag)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static void SetGlobalWarningDisplay (bool flag)
 
static bool GetGlobalWarningDisplay ()
 
static void SetGlobalDefaultNumberOfThreads (unsigned int n)
 
static unsigned int GetGlobalDefaultNumberOfThreads ()
 
static double GetGlobalDefaultCoordinateTolerance ()
 Access the global tolerance to determine congruent spaces. More...
 
static void SetGlobalDefaultCoordinateTolerance (double)
 Access the global tolerance to determine congruent spaces. More...
 
static double GetGlobalDefaultDirectionTolerance ()
 Access the global tolerance to determine congruent spaces. More...
 
static void SetGlobalDefaultDirectionTolerance (double)
 Access the global tolerance to determine congruent spaces. More...
 
- Protected Member Functions inherited from itk::simple::ProcessObject
virtual unsigned long AddITKObserver (const itk::EventObject &, itk::Command *)
 
virtual itk::ProcessObjectGetActiveProcess ()
 
virtual void OnActiveProcessDelete ()
 
virtual void onCommandDelete (const itk::simple::Command *cmd) SITK_NOEXCEPT
 
virtual void PreUpdate (itk::ProcessObject *p)
 
virtual void RemoveITKObserver (EventCommand &e)
 
- Protected Member Functions inherited from itk::simple::NonCopyable
 NonCopyable ()
 
- Static Protected Member Functions inherited from itk::simple::ImageFilter< 0 >
static void FixNonZeroIndex (TImageType *img)
 
- Static Protected Member Functions inherited from itk::simple::ProcessObject
template<class TImageType >
static TImageType::ConstPointer CastImageToITK (const Image &img)
 
template<class TImageType >
static Image CastITKToImage (TImageType *img)
 
template<class TPixelType , unsigned int VImageDimension, unsigned int VLength, template< typename, unsigned int > class TVector>
static Image CastITKToImage (itk::Image< TVector< TPixelType, VLength >, VImageDimension > *img)
 
static const itk::EventObjectGetITKEventObject (EventEnum e)
 
template<typename T >
static std::ostream & ToStringHelper (std::ostream &os, const T &v)
 
static std::ostream & ToStringHelper (std::ostream &os, const char &v)
 
static std::ostream & ToStringHelper (std::ostream &os, const signed char &v)
 
static std::ostream & ToStringHelper (std::ostream &os, const unsigned char &v)
 

Detailed Description

Deformably register two images using the demons algorithm.

This class was contributed by Corinne Mattmann, ETH Zurich, Switzerland. based on a variation of the DemonsRegistrationFilter . The basic modification is to use equation (5) from Thirion's paper along with the modification for avoiding large deformations when gradients have small values.

SymmetricForcesDemonsRegistrationFilter implements the demons deformable algorithm that register two images by computing the deformation field which will map a moving image onto a fixed image.

A deformation field is represented as a image whose pixel type is some vector type with at least N elements, where N is the dimension of the fixed image. The vector type must support element access via operator []. It is assumed that the vector elements behave like floating point scalars.

This class is templated over the fixed image type, moving image type and the deformation field type.

The input fixed and moving images are set via methods SetFixedImage and SetMovingImage respectively. An initial deformation field maybe set via SetInitialDisplacementField or SetInput. If no initial field is set, a zero field is used as the initial condition.

The algorithm has one parameters: the number of iteration to be performed.

The output deformation field can be obtained via methods GetOutput or GetDisplacementField.

This class make use of the finite difference solver hierarchy. Update for each iteration is computed in DemonsRegistrationFunction .

Warning
This filter assumes that the fixed image type, moving image type and deformation field type all have the same number of dimensions.
See also
SymmetricForcesDemonsRegistrationFunction
DemonsRegistrationFilter
DemonsRegistrationFunction
itk::SymmetricForcesDemonsRegistrationFilter for the Doxygen on the original ITK class.

Definition at line 64 of file sitkSymmetricForcesDemonsRegistrationFilter.h.

Member Typedef Documentation

typedef Image(Self::* itk::simple::SymmetricForcesDemonsRegistrationFilter::MemberFunctionType) (const Image *fixedImage, const Image *movingImage, const Image *initialDisplacementField)
private

Setup for member function dispatching

Definition at line 238 of file sitkSymmetricForcesDemonsRegistrationFilter.h.

Define the pixels types supported by this filter

Definition at line 76 of file sitkSymmetricForcesDemonsRegistrationFilter.h.

Constructor & Destructor Documentation

virtual itk::simple::SymmetricForcesDemonsRegistrationFilter::~SymmetricForcesDemonsRegistrationFilter ( )
virtual

Destructor

itk::simple::SymmetricForcesDemonsRegistrationFilter::SymmetricForcesDemonsRegistrationFilter ( )

Default Constructor that takes no arguments and initializes default parameters

Member Function Documentation

Image itk::simple::SymmetricForcesDemonsRegistrationFilter::Execute ( const Image fixedImage,
const Image movingImage,
const Image initialDisplacementField 
)

Execute the filter on the input image

Image itk::simple::SymmetricForcesDemonsRegistrationFilter::Execute ( const Image fixedImage,
const Image movingImage 
)
Image itk::simple::SymmetricForcesDemonsRegistrationFilter::Execute ( const Image fixedImage,
const Image movingImage,
const Image initialDisplacementField,
const std::vector< double > &  standardDeviations,
uint32_t  numberOfIterations,
double  maximumRMSError,
bool  smoothDisplacementField,
bool  smoothUpdateField,
const std::vector< double > &  updateFieldStandardDeviations,
unsigned int  maximumKernelWidth,
double  maximumError,
double  intensityDifferenceThreshold,
bool  useImageSpacing 
)

Execute the filter on the input image with the given parameters

Image itk::simple::SymmetricForcesDemonsRegistrationFilter::Execute ( const Image fixedImage,
const Image movingImage,
const std::vector< double > &  standardDeviations,
uint32_t  numberOfIterations,
double  maximumRMSError,
bool  smoothDisplacementField,
bool  smoothUpdateField,
const std::vector< double > &  updateFieldStandardDeviations,
unsigned int  maximumKernelWidth,
double  maximumError,
double  intensityDifferenceThreshold,
bool  useImageSpacing 
)
template<class TImageType >
Image itk::simple::SymmetricForcesDemonsRegistrationFilter::ExecuteInternal ( const Image fixedImage,
const Image movingImage,
const Image initialDisplacementField 
)
private
uint32_t itk::simple::SymmetricForcesDemonsRegistrationFilter::GetElapsedIterations ( ) const
inline

Number of iterations run.

This is an active measurement. It may be accessed while the filter is being executing in command call-backs and can be accessed after execution.

Definition at line 199 of file sitkSymmetricForcesDemonsRegistrationFilter.h.

double itk::simple::SymmetricForcesDemonsRegistrationFilter::GetIntensityDifferenceThreshold ( ) const
inline
double itk::simple::SymmetricForcesDemonsRegistrationFilter::GetMaximumError ( ) const
inline

Set/Get the desired maximum error of the Guassian kernel approximate.

Definition at line 170 of file sitkSymmetricForcesDemonsRegistrationFilter.h.

unsigned int itk::simple::SymmetricForcesDemonsRegistrationFilter::GetMaximumKernelWidth ( ) const
inline

Set/Get the desired limits of the Gaussian kernel width.

Definition at line 160 of file sitkSymmetricForcesDemonsRegistrationFilter.h.

double itk::simple::SymmetricForcesDemonsRegistrationFilter::GetMaximumRMSError ( ) const
inline
double itk::simple::SymmetricForcesDemonsRegistrationFilter::GetMetric ( ) const
inline

Get the metric value. The metric value is the mean square difference in intensity between the fixed image and transforming moving image computed over the the overlapping region between the two images. This value is calculated for the current iteration

This is an active measurement. It may be accessed while the filter is being executing in command call-backs and can be accessed after execution.

Definition at line 216 of file sitkSymmetricForcesDemonsRegistrationFilter.h.

std::string itk::simple::SymmetricForcesDemonsRegistrationFilter::GetName ( ) const
inlinevirtual

Name of this class

Implements itk::simple::ProcessObject.

Definition at line 219 of file sitkSymmetricForcesDemonsRegistrationFilter.h.

uint32_t itk::simple::SymmetricForcesDemonsRegistrationFilter::GetNumberOfIterations ( ) const
inline
double itk::simple::SymmetricForcesDemonsRegistrationFilter::GetRMSChange ( ) const
inline

Set/Get the root mean squared change of the previous iteration. May not be used by all solvers.

This is a measurement. Its value is updated in the Execute methods, so the value will only be valid after an execution.

Definition at line 207 of file sitkSymmetricForcesDemonsRegistrationFilter.h.

bool itk::simple::SymmetricForcesDemonsRegistrationFilter::GetSmoothDisplacementField ( ) const
inline

Set/Get whether the displacement field is smoothed (regularized). Smoothing the displacement yields a solution elastic in nature. If SmoothDisplacementField is on, then the displacement field is smoothed with a Gaussian whose standard deviations are specified with SetStandardDeviations()

Definition at line 122 of file sitkSymmetricForcesDemonsRegistrationFilter.h.

bool itk::simple::SymmetricForcesDemonsRegistrationFilter::GetSmoothUpdateField ( ) const
inline

Set/Get whether the update field is smoothed (regularized). Smoothing the update field yields a solution viscous in nature. If SmoothUpdateField is on, then the update field is smoothed with a Gaussian whose standard deviations are specified with SetUpdateFieldStandardDeviations()

Definition at line 136 of file sitkSymmetricForcesDemonsRegistrationFilter.h.

std::vector<double> itk::simple::SymmetricForcesDemonsRegistrationFilter::GetStandardDeviations ( ) const
inline

Set/Get the Gaussian smoothing standard deviations for the displacement field. The values are set with respect to pixel coordinates.

Definition at line 92 of file sitkSymmetricForcesDemonsRegistrationFilter.h.

std::vector<double> itk::simple::SymmetricForcesDemonsRegistrationFilter::GetUpdateFieldStandardDeviations ( ) const
inline

Set the Gaussian smoothing standard deviations for the update field. The values are set with respect to pixel coordinates.

Definition at line 150 of file sitkSymmetricForcesDemonsRegistrationFilter.h.

bool itk::simple::SymmetricForcesDemonsRegistrationFilter::GetUseImageSpacing ( ) const
inline
Self& itk::simple::SymmetricForcesDemonsRegistrationFilter::SetIntensityDifferenceThreshold ( double  IntensityDifferenceThreshold)
inline

Set/Get the threshold below which the absolute difference of intensity yields a match. When the intensities match between a moving and fixed image pixel, the update vector (for that iteration) will be the zero vector. Default is 0.001.

Definition at line 175 of file sitkSymmetricForcesDemonsRegistrationFilter.h.

Self& itk::simple::SymmetricForcesDemonsRegistrationFilter::SetMaximumError ( double  MaximumError)
inline

Set/Get the desired maximum error of the Guassian kernel approximate.

Definition at line 165 of file sitkSymmetricForcesDemonsRegistrationFilter.h.

Self& itk::simple::SymmetricForcesDemonsRegistrationFilter::SetMaximumKernelWidth ( unsigned int  MaximumKernelWidth)
inline

Set/Get the desired limits of the Gaussian kernel width.

Definition at line 155 of file sitkSymmetricForcesDemonsRegistrationFilter.h.

Self& itk::simple::SymmetricForcesDemonsRegistrationFilter::SetMaximumRMSError ( double  MaximumRMSError)
inline
Self& itk::simple::SymmetricForcesDemonsRegistrationFilter::SetNumberOfIterations ( uint32_t  NumberOfIterations)
inline
Self& itk::simple::SymmetricForcesDemonsRegistrationFilter::SetSmoothDisplacementField ( bool  SmoothDisplacementField)
inline

Set/Get whether the displacement field is smoothed (regularized). Smoothing the displacement yields a solution elastic in nature. If SmoothDisplacementField is on, then the displacement field is smoothed with a Gaussian whose standard deviations are specified with SetStandardDeviations()

Definition at line 113 of file sitkSymmetricForcesDemonsRegistrationFilter.h.

Self& itk::simple::SymmetricForcesDemonsRegistrationFilter::SetSmoothUpdateField ( bool  SmoothUpdateField)
inline

Set/Get whether the update field is smoothed (regularized). Smoothing the update field yields a solution viscous in nature. If SmoothUpdateField is on, then the update field is smoothed with a Gaussian whose standard deviations are specified with SetUpdateFieldStandardDeviations()

Definition at line 127 of file sitkSymmetricForcesDemonsRegistrationFilter.h.

Self& itk::simple::SymmetricForcesDemonsRegistrationFilter::SetStandardDeviations ( const std::vector< double > &  StandardDeviations)
inline

Set/Get the Gaussian smoothing standard deviations for the displacement field. The values are set with respect to pixel coordinates.

Definition at line 83 of file sitkSymmetricForcesDemonsRegistrationFilter.h.

Self& itk::simple::SymmetricForcesDemonsRegistrationFilter::SetStandardDeviations ( double  value)
inline

Set the values of the StandardDeviations vector all to value

Definition at line 86 of file sitkSymmetricForcesDemonsRegistrationFilter.h.

Self& itk::simple::SymmetricForcesDemonsRegistrationFilter::SetUpdateFieldStandardDeviations ( const std::vector< double > &  UpdateFieldStandardDeviations)
inline

Set the Gaussian smoothing standard deviations for the update field. The values are set with respect to pixel coordinates.

Definition at line 141 of file sitkSymmetricForcesDemonsRegistrationFilter.h.

Self& itk::simple::SymmetricForcesDemonsRegistrationFilter::SetUpdateFieldStandardDeviations ( double  value)
inline

Set the values of the UpdateFieldStandardDeviations vector all to value

Definition at line 144 of file sitkSymmetricForcesDemonsRegistrationFilter.h.

Self& itk::simple::SymmetricForcesDemonsRegistrationFilter::SetUseImageSpacing ( bool  UseImageSpacing)
inline
Self& itk::simple::SymmetricForcesDemonsRegistrationFilter::SmoothDisplacementFieldOff ( )
inline
Self& itk::simple::SymmetricForcesDemonsRegistrationFilter::SmoothDisplacementFieldOn ( )
inline

Set the value of SmoothDisplacementField to true or false respectfully.

Definition at line 116 of file sitkSymmetricForcesDemonsRegistrationFilter.h.

Self& itk::simple::SymmetricForcesDemonsRegistrationFilter::SmoothUpdateFieldOff ( )
inline
Self& itk::simple::SymmetricForcesDemonsRegistrationFilter::SmoothUpdateFieldOn ( )
inline

Set the value of SmoothUpdateField to true or false respectfully.

Definition at line 130 of file sitkSymmetricForcesDemonsRegistrationFilter.h.

std::string itk::simple::SymmetricForcesDemonsRegistrationFilter::ToString ( ) const
virtual

Print ourselves out

Reimplemented from itk::simple::ProcessObject.

Self& itk::simple::SymmetricForcesDemonsRegistrationFilter::UseImageSpacingOff ( )
inline
Self& itk::simple::SymmetricForcesDemonsRegistrationFilter::UseImageSpacingOn ( )
inline

Set the value of UseImageSpacing to true or false respectfully.

Definition at line 186 of file sitkSymmetricForcesDemonsRegistrationFilter.h.

Friends And Related Function Documentation

Member Data Documentation

itk::ProcessObject* itk::simple::SymmetricForcesDemonsRegistrationFilter::m_Filter
private
double itk::simple::SymmetricForcesDemonsRegistrationFilter::m_IntensityDifferenceThreshold
private
double itk::simple::SymmetricForcesDemonsRegistrationFilter::m_MaximumError
private
unsigned int itk::simple::SymmetricForcesDemonsRegistrationFilter::m_MaximumKernelWidth
private
double itk::simple::SymmetricForcesDemonsRegistrationFilter::m_MaximumRMSError
private
nsstd::auto_ptr<detail::MemberFunctionFactory<MemberFunctionType> > itk::simple::SymmetricForcesDemonsRegistrationFilter::m_MemberFactory
private
uint32_t itk::simple::SymmetricForcesDemonsRegistrationFilter::m_NumberOfIterations
private
nsstd::function<uint32_t()> itk::simple::SymmetricForcesDemonsRegistrationFilter::m_pfGetElapsedIterations
private
nsstd::function<double()> itk::simple::SymmetricForcesDemonsRegistrationFilter::m_pfGetMetric
private
double itk::simple::SymmetricForcesDemonsRegistrationFilter::m_RMSChange
private
bool itk::simple::SymmetricForcesDemonsRegistrationFilter::m_SmoothDisplacementField
private
bool itk::simple::SymmetricForcesDemonsRegistrationFilter::m_SmoothUpdateField
private
std::vector<double> itk::simple::SymmetricForcesDemonsRegistrationFilter::m_StandardDeviations
private
std::vector<double> itk::simple::SymmetricForcesDemonsRegistrationFilter::m_UpdateFieldStandardDeviations
private
bool itk::simple::SymmetricForcesDemonsRegistrationFilter::m_UseImageSpacing
private

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