Class DiffeomorphicDemonsRegistrationFilter
java.lang.Object
org.itk.simple.ProcessObject
org.itk.simple.ImageFilter
org.itk.simple.DiffeomorphicDemonsRegistrationFilter
Deformably register two images using a diffeomorphic demons algorithm.
This class was contributed by Tom Vercauteren, INRIA & Mauna Kea
Technologies, based on a variation of the DemonsRegistrationFilter . The basic modification is to use diffeomorphism exponentials.
See T. Vercauteren, X. Pennec, A. Perchant and N. Ayache, "Non-
parametric Diffeomorphic Image Registration with the Demons
Algorithm", Proc. of MICCAI 2007.
DiffeomorphicDemonsRegistrationFilter 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 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 .
Tom Vercauteren, INRIA & Mauna Kea Technologies
WARNING:
This filter assumes that the fixed image type, moving image type and
deformation field type all have the same number of dimensions.
 This implementation was taken from the Insight Journal paper: https://doi.org/10.54294/ux2obj
See:
 DemonsRegistrationFilter
 DemonsRegistrationFunction
 itk::DiffeomorphicDemonsRegistrationFilter for the Doxygen on the original ITK class.
C++ includes: sitkDiffeomorphicDemonsRegistrationFilter.h
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic final class
- 
Field SummaryFields inherited from class org.itk.simple.ProcessObjectswigCMemOwn
- 
Constructor SummaryConstructorsModifierConstructorDescriptionitk::simple::DiffeomorphicDemonsRegistrationFilter::DiffeomorphicDemonsRegistrationFilter() Default Constructor that takes no arguments and initializes default parametersprotectedDiffeomorphicDemonsRegistrationFilter(long cPtr, boolean cMemoryOwn) 
- 
Method SummaryModifier and TypeMethodDescriptionvoiddelete()virtual itk::simple::DiffeomorphicDemonsRegistrationFilter::~DiffeomorphicDemonsRegistrationFilter() DestructorImage itk::simple::DiffeomorphicDemonsRegistrationFilter::Execute(const Image &fixedImage, const Image &movingImage, const Image &initialDisplacementField) Execute the filter on the input imageImage itk::simple::DiffeomorphicDemonsRegistrationFilter::Execute(const Image &fixedImage, const Image &movingImage, const Image &initialDisplacementField) Execute the filter on the input imageprotected voidfinalize()protected static longlonguint32_t itk::simple::DiffeomorphicDemonsRegistrationFilter::GetElapsedIterations() const Number of iterations run.doubledouble itk::simple::DiffeomorphicDemonsRegistrationFilter::GetIntensityDifferenceThreshold() constdoubledouble itk::simple::DiffeomorphicDemonsRegistrationFilter::GetMaximumError() const Set/Get the desired maximum error of the Guassian kernel approximate.longunsigned int itk::simple::DiffeomorphicDemonsRegistrationFilter::GetMaximumKernelWidth() const Set/Get the desired limits of the Gaussian kernel width.doubledouble itk::simple::DiffeomorphicDemonsRegistrationFilter::GetMaximumRMSError() constdoubledouble itk::simple::DiffeomorphicDemonsRegistrationFilter::GetMaximumUpdateStepLength() constdoubledouble itk::simple::DiffeomorphicDemonsRegistrationFilter::GetMetric() const Get the metric value.getName()std::string itk::simple::DiffeomorphicDemonsRegistrationFilter::GetName() const Name of this classlonguint32_t itk::simple::DiffeomorphicDemonsRegistrationFilter::GetNumberOfIterations() constdoubledouble itk::simple::DiffeomorphicDemonsRegistrationFilter::GetRMSChange() const Set/Get the root mean squared change of the previous iteration.booleanbool itk::simple::DiffeomorphicDemonsRegistrationFilter::GetSmoothDisplacementField() const Set/Get whether the displacement field is smoothed (regularized).booleanbool itk::simple::DiffeomorphicDemonsRegistrationFilter::GetSmoothUpdateField() const Set/Get whether the update field is smoothed (regularized).std::vector<double> itk::simple::DiffeomorphicDemonsRegistrationFilter::GetStandardDeviations() const Set/Get the Gaussian smoothing standard deviations for the displacement field.std::vector<double> itk::simple::DiffeomorphicDemonsRegistrationFilter::GetUpdateFieldStandardDeviations() const Set the Gaussian smoothing standard deviations for the update field.booleanbool itk::simple::DiffeomorphicDemonsRegistrationFilter::GetUseFirstOrderExp() const Use a first-order approximation of the exponential.UseGradientTypeType itk::simple::DiffeomorphicDemonsRegistrationFilter::GetUseGradientType() constbooleanbool itk::simple::DiffeomorphicDemonsRegistrationFilter::GetUseImageSpacing() constvoidsetIntensityDifferenceThreshold(double IntensityDifferenceThreshold) Self& itk::simple::DiffeomorphicDemonsRegistrationFilter::SetIntensityDifferenceThreshold(double IntensityDifferenceThreshold) Set/Get the threshold below which the absolute difference of intensity yields a match.voidsetMaximumError(double MaximumError) Self& itk::simple::DiffeomorphicDemonsRegistrationFilter::SetMaximumError(double MaximumError) Set/Get the desired maximum error of the Guassian kernel approximate.voidsetMaximumKernelWidth(long MaximumKernelWidth) Self& itk::simple::DiffeomorphicDemonsRegistrationFilter::SetMaximumKernelWidth(unsigned int MaximumKernelWidth) Set/Get the desired limits of the Gaussian kernel width.voidsetMaximumRMSError(double MaximumRMSError) Self& itk::simple::DiffeomorphicDemonsRegistrationFilter::SetMaximumRMSError(double MaximumRMSError)voidsetMaximumUpdateStepLength(double MaximumUpdateStepLength) Self& itk::simple::DiffeomorphicDemonsRegistrationFilter::SetMaximumUpdateStepLength(double MaximumUpdateStepLength) Set/Get the maximum length in terms of pixels of the vectors in the update buffer.voidsetNumberOfIterations(long NumberOfIterations) Self& itk::simple::DiffeomorphicDemonsRegistrationFilter::SetNumberOfIterations(uint32_t NumberOfIterations)voidsetSmoothDisplacementField(boolean SmoothDisplacementField) Self& itk::simple::DiffeomorphicDemonsRegistrationFilter::SetSmoothDisplacementField(bool SmoothDisplacementField) Set/Get whether the displacement field is smoothed (regularized).voidsetSmoothUpdateField(boolean SmoothUpdateField) Self& itk::simple::DiffeomorphicDemonsRegistrationFilter::SetSmoothUpdateField(bool SmoothUpdateField) Set/Get whether the update field is smoothed (regularized).voidsetStandardDeviations(double value) Self& itk::simple::DiffeomorphicDemonsRegistrationFilter::SetStandardDeviations(std::vector< double > StandardDeviations) Set/Get the Gaussian smoothing standard deviations for the displacement field.voidsetStandardDeviations(VectorDouble StandardDeviations) Self& itk::simple::DiffeomorphicDemonsRegistrationFilter::SetStandardDeviations(std::vector< double > StandardDeviations) Set/Get the Gaussian smoothing standard deviations for the displacement field.voidsetUpdateFieldStandardDeviations(double value) Self& itk::simple::DiffeomorphicDemonsRegistrationFilter::SetUpdateFieldStandardDeviations(std::vector< double > UpdateFieldStandardDeviations) Set the Gaussian smoothing standard deviations for the update field.voidsetUpdateFieldStandardDeviations(VectorDouble UpdateFieldStandardDeviations) Self& itk::simple::DiffeomorphicDemonsRegistrationFilter::SetUpdateFieldStandardDeviations(std::vector< double > UpdateFieldStandardDeviations) Set the Gaussian smoothing standard deviations for the update field.voidsetUseFirstOrderExp(boolean UseFirstOrderExp) Self& itk::simple::DiffeomorphicDemonsRegistrationFilter::SetUseFirstOrderExp(bool UseFirstOrderExp) Use a first-order approximation of the exponential.voidSelf& itk::simple::DiffeomorphicDemonsRegistrationFilter::SetUseGradientType(UseGradientTypeType UseGradientType)voidsetUseImageSpacing(boolean UseImageSpacing) Self& itk::simple::DiffeomorphicDemonsRegistrationFilter::SetUseImageSpacing(bool UseImageSpacing)voidSelf& itk::simple::DiffeomorphicDemonsRegistrationFilter::SmoothDisplacementFieldOff()voidSelf& itk::simple::DiffeomorphicDemonsRegistrationFilter::SmoothDisplacementFieldOn() Set the value of SmoothDisplacementField to true or false respectfully.voidSelf& itk::simple::DiffeomorphicDemonsRegistrationFilter::SmoothUpdateFieldOff()voidSelf& itk::simple::DiffeomorphicDemonsRegistrationFilter::SmoothUpdateFieldOn() Set the value of SmoothUpdateField to true or false respectfully.voidvoid itk::simple::DiffeomorphicDemonsRegistrationFilter::StopRegistration() This is an active measurement.protected static longtoString()std::string itk::simple::DiffeomorphicDemonsRegistrationFilter::ToString() const Print ourselves outvoidSelf& itk::simple::DiffeomorphicDemonsRegistrationFilter::UseFirstOrderExpOff()voidSelf& itk::simple::DiffeomorphicDemonsRegistrationFilter::UseFirstOrderExpOn() Set the value of UseFirstOrderExp to true or false respectfully.voidSelf& itk::simple::DiffeomorphicDemonsRegistrationFilter::UseImageSpacingOff()voidSelf& itk::simple::DiffeomorphicDemonsRegistrationFilter::UseImageSpacingOn() Set the value of UseImageSpacing to true or false respectfully.Methods inherited from class org.itk.simple.ImageFiltergetCPtr, swigReleaseMethods inherited from class org.itk.simple.ProcessObjectabort, addCommand, debugOff, debugOn, getCPtr, getDebug, getGlobalDefaultCoordinateTolerance, getGlobalDefaultDebug, getGlobalDefaultDirectionTolerance, getGlobalDefaultNumberOfThreads, getGlobalDefaultThreader, getGlobalWarningDisplay, getNumberOfThreads, getNumberOfWorkUnits, getProgress, globalDefaultDebugOff, globalDefaultDebugOn, globalWarningDisplayOff, globalWarningDisplayOn, hasCommand, removeAllCommands, setDebug, setGlobalDefaultCoordinateTolerance, setGlobalDefaultDebug, setGlobalDefaultDirectionTolerance, setGlobalDefaultNumberOfThreads, setGlobalDefaultThreader, setGlobalWarningDisplay, setNumberOfThreads, setNumberOfWorkUnits, swigRelease
- 
Constructor Details- 
DiffeomorphicDemonsRegistrationFilterprotected DiffeomorphicDemonsRegistrationFilter(long cPtr, boolean cMemoryOwn) 
- 
DiffeomorphicDemonsRegistrationFilterpublic DiffeomorphicDemonsRegistrationFilter()itk::simple::DiffeomorphicDemonsRegistrationFilter::DiffeomorphicDemonsRegistrationFilter() Default Constructor that takes no arguments and initializes default parameters
 
- 
- 
Method Details- 
getCPtr
- 
swigRelease
- 
finalizeprotected void finalize()- Overrides:
- finalizein class- ImageFilter
 
- 
deletepublic void delete()virtual itk::simple::DiffeomorphicDemonsRegistrationFilter::~DiffeomorphicDemonsRegistrationFilter() Destructor- Overrides:
- deletein class- ImageFilter
 
- 
setStandardDeviationsSelf& itk::simple::DiffeomorphicDemonsRegistrationFilter::SetStandardDeviations(std::vector< double > StandardDeviations) Set/Get the Gaussian smoothing standard deviations for the displacement field. The values are set with respect to pixel coordinates.
- 
setStandardDeviationspublic void setStandardDeviations(double value) Self& itk::simple::DiffeomorphicDemonsRegistrationFilter::SetStandardDeviations(std::vector< double > StandardDeviations) Set/Get the Gaussian smoothing standard deviations for the displacement field. The values are set with respect to pixel coordinates.
- 
getStandardDeviationsstd::vector<double> itk::simple::DiffeomorphicDemonsRegistrationFilter::GetStandardDeviations() const Set/Get the Gaussian smoothing standard deviations for the displacement field. The values are set with respect to pixel coordinates.
- 
setNumberOfIterationspublic void setNumberOfIterations(long NumberOfIterations) Self& itk::simple::DiffeomorphicDemonsRegistrationFilter::SetNumberOfIterations(uint32_t NumberOfIterations)
- 
getNumberOfIterationspublic long getNumberOfIterations()uint32_t itk::simple::DiffeomorphicDemonsRegistrationFilter::GetNumberOfIterations() const
- 
setMaximumRMSErrorpublic void setMaximumRMSError(double MaximumRMSError) Self& itk::simple::DiffeomorphicDemonsRegistrationFilter::SetMaximumRMSError(double MaximumRMSError)
- 
getMaximumRMSErrorpublic double getMaximumRMSError()double itk::simple::DiffeomorphicDemonsRegistrationFilter::GetMaximumRMSError() const
- 
setUseGradientTypepublic void setUseGradientType(DiffeomorphicDemonsRegistrationFilter.UseGradientTypeType UseGradientType) Self& itk::simple::DiffeomorphicDemonsRegistrationFilter::SetUseGradientType(UseGradientTypeType UseGradientType)
- 
getUseGradientTypeUseGradientTypeType itk::simple::DiffeomorphicDemonsRegistrationFilter::GetUseGradientType() const
- 
setUseFirstOrderExppublic void setUseFirstOrderExp(boolean UseFirstOrderExp) Self& itk::simple::DiffeomorphicDemonsRegistrationFilter::SetUseFirstOrderExp(bool UseFirstOrderExp) Use a first-order approximation of the exponential. This amounts to using an update rule of the type s <- s o (Id + u) instead of s <- s o exp(u)
- 
useFirstOrderExpOnpublic void useFirstOrderExpOn()Self& itk::simple::DiffeomorphicDemonsRegistrationFilter::UseFirstOrderExpOn() Set the value of UseFirstOrderExp to true or false respectfully.
- 
useFirstOrderExpOffpublic void useFirstOrderExpOff()Self& itk::simple::DiffeomorphicDemonsRegistrationFilter::UseFirstOrderExpOff()
- 
getUseFirstOrderExppublic boolean getUseFirstOrderExp()bool itk::simple::DiffeomorphicDemonsRegistrationFilter::GetUseFirstOrderExp() const Use a first-order approximation of the exponential. This amounts to using an update rule of the type s <- s o (Id + u) instead of s <- s o exp(u)
- 
setMaximumUpdateStepLengthpublic void setMaximumUpdateStepLength(double MaximumUpdateStepLength) Self& itk::simple::DiffeomorphicDemonsRegistrationFilter::SetMaximumUpdateStepLength(double MaximumUpdateStepLength) Set/Get the maximum length in terms of pixels of the vectors in the update buffer.
- 
getMaximumUpdateStepLengthpublic double getMaximumUpdateStepLength()double itk::simple::DiffeomorphicDemonsRegistrationFilter::GetMaximumUpdateStepLength() const
- 
setSmoothDisplacementFieldpublic void setSmoothDisplacementField(boolean SmoothDisplacementField) Self& itk::simple::DiffeomorphicDemonsRegistrationFilter::SetSmoothDisplacementField(bool SmoothDisplacementField) 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()
- 
smoothDisplacementFieldOnpublic void smoothDisplacementFieldOn()Self& itk::simple::DiffeomorphicDemonsRegistrationFilter::SmoothDisplacementFieldOn() Set the value of SmoothDisplacementField to true or false respectfully.
- 
smoothDisplacementFieldOffpublic void smoothDisplacementFieldOff()Self& itk::simple::DiffeomorphicDemonsRegistrationFilter::SmoothDisplacementFieldOff()
- 
getSmoothDisplacementFieldpublic boolean getSmoothDisplacementField()bool itk::simple::DiffeomorphicDemonsRegistrationFilter::GetSmoothDisplacementField() const 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()
- 
setSmoothUpdateFieldpublic void setSmoothUpdateField(boolean SmoothUpdateField) Self& itk::simple::DiffeomorphicDemonsRegistrationFilter::SetSmoothUpdateField(bool SmoothUpdateField) 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()
- 
smoothUpdateFieldOnpublic void smoothUpdateFieldOn()Self& itk::simple::DiffeomorphicDemonsRegistrationFilter::SmoothUpdateFieldOn() Set the value of SmoothUpdateField to true or false respectfully.
- 
smoothUpdateFieldOffpublic void smoothUpdateFieldOff()Self& itk::simple::DiffeomorphicDemonsRegistrationFilter::SmoothUpdateFieldOff()
- 
getSmoothUpdateFieldpublic boolean getSmoothUpdateField()bool itk::simple::DiffeomorphicDemonsRegistrationFilter::GetSmoothUpdateField() const 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()
- 
setUpdateFieldStandardDeviationsSelf& itk::simple::DiffeomorphicDemonsRegistrationFilter::SetUpdateFieldStandardDeviations(std::vector< double > UpdateFieldStandardDeviations) Set the Gaussian smoothing standard deviations for the update field. The values are set with respect to pixel coordinates.
- 
setUpdateFieldStandardDeviationspublic void setUpdateFieldStandardDeviations(double value) Self& itk::simple::DiffeomorphicDemonsRegistrationFilter::SetUpdateFieldStandardDeviations(std::vector< double > UpdateFieldStandardDeviations) Set the Gaussian smoothing standard deviations for the update field. The values are set with respect to pixel coordinates.
- 
getUpdateFieldStandardDeviationsstd::vector<double> itk::simple::DiffeomorphicDemonsRegistrationFilter::GetUpdateFieldStandardDeviations() const Set the Gaussian smoothing standard deviations for the update field. The values are set with respect to pixel coordinates.
- 
setMaximumKernelWidthpublic void setMaximumKernelWidth(long MaximumKernelWidth) Self& itk::simple::DiffeomorphicDemonsRegistrationFilter::SetMaximumKernelWidth(unsigned int MaximumKernelWidth) Set/Get the desired limits of the Gaussian kernel width.
- 
getMaximumKernelWidthpublic long getMaximumKernelWidth()unsigned int itk::simple::DiffeomorphicDemonsRegistrationFilter::GetMaximumKernelWidth() const Set/Get the desired limits of the Gaussian kernel width.
- 
setMaximumErrorpublic void setMaximumError(double MaximumError) Self& itk::simple::DiffeomorphicDemonsRegistrationFilter::SetMaximumError(double MaximumError) Set/Get the desired maximum error of the Guassian kernel approximate.
- 
getMaximumErrorpublic double getMaximumError()double itk::simple::DiffeomorphicDemonsRegistrationFilter::GetMaximumError() const Set/Get the desired maximum error of the Guassian kernel approximate.
- 
setIntensityDifferenceThresholdpublic void setIntensityDifferenceThreshold(double IntensityDifferenceThreshold) Self& itk::simple::DiffeomorphicDemonsRegistrationFilter::SetIntensityDifferenceThreshold(double IntensityDifferenceThreshold) 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.
- 
getIntensityDifferenceThresholdpublic double getIntensityDifferenceThreshold()double itk::simple::DiffeomorphicDemonsRegistrationFilter::GetIntensityDifferenceThreshold() const
- 
setUseImageSpacingpublic void setUseImageSpacing(boolean UseImageSpacing) Self& itk::simple::DiffeomorphicDemonsRegistrationFilter::SetUseImageSpacing(bool UseImageSpacing)
- 
useImageSpacingOnpublic void useImageSpacingOn()Self& itk::simple::DiffeomorphicDemonsRegistrationFilter::UseImageSpacingOn() Set the value of UseImageSpacing to true or false respectfully.
- 
useImageSpacingOffpublic void useImageSpacingOff()Self& itk::simple::DiffeomorphicDemonsRegistrationFilter::UseImageSpacingOff()
- 
getUseImageSpacingpublic boolean getUseImageSpacing()bool itk::simple::DiffeomorphicDemonsRegistrationFilter::GetUseImageSpacing() const
- 
getElapsedIterationspublic long getElapsedIterations()uint32_t itk::simple::DiffeomorphicDemonsRegistrationFilter::GetElapsedIterations() const 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.
- 
getRMSChangepublic double getRMSChange()double itk::simple::DiffeomorphicDemonsRegistrationFilter::GetRMSChange() const 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.
- 
getMetricpublic double getMetric()double itk::simple::DiffeomorphicDemonsRegistrationFilter::GetMetric() const 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 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.
- 
stopRegistrationpublic void stopRegistration()void itk::simple::DiffeomorphicDemonsRegistrationFilter::StopRegistration() 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.
- 
getNamestd::string itk::simple::DiffeomorphicDemonsRegistrationFilter::GetName() const Name of this class- Overrides:
- getNamein class- ProcessObject
 
- 
toStringstd::string itk::simple::DiffeomorphicDemonsRegistrationFilter::ToString() const Print ourselves out- Overrides:
- toStringin class- ProcessObject
 
- 
execute
- 
execute
 
-