Class DemonsRegistrationFilter


public class DemonsRegistrationFilter extends ImageFilter
Deformably register two images using the demons algorithm. DemonsRegistrationFilter implements the demons deformable algorithm that register two images by computing the displacement field which will map a moving image onto a fixed image. A displacement 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 displacement field type. The input fixed and moving images are set via methods SetFixedImage and SetMovingImage respectively. An initial displacement 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 displacement 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 displacement field type all have the same number of dimensions. See: DemonsRegistrationFunction itk::DemonsRegistrationFilter for the Doxygen on the original ITK class. C++ includes: sitkDemonsRegistrationFilter.h
  • Constructor Details

    • DemonsRegistrationFilter

      protected DemonsRegistrationFilter(long cPtr, boolean cMemoryOwn)
    • DemonsRegistrationFilter

      public DemonsRegistrationFilter()
      itk::simple::DemonsRegistrationFilter::DemonsRegistrationFilter() Default Constructor that takes no arguments and initializes default parameters
  • Method Details

    • getCPtr

      protected static long getCPtr(DemonsRegistrationFilter obj)
    • swigRelease

      protected static long swigRelease(DemonsRegistrationFilter obj)
    • finalize

      protected void finalize()
      Overrides:
      finalize in class ImageFilter
    • delete

      public void delete()
      virtual itk::simple::DemonsRegistrationFilter::~DemonsRegistrationFilter() Destructor
      Overrides:
      delete in class ImageFilter
    • setStandardDeviations

      public void setStandardDeviations(VectorDouble StandardDeviations)
      Self& itk::simple::DemonsRegistrationFilter::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.
    • setStandardDeviations

      public void setStandardDeviations(double value)
      Self& itk::simple::DemonsRegistrationFilter::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.
    • getStandardDeviations

      public VectorDouble getStandardDeviations()
      std::vector<double> itk::simple::DemonsRegistrationFilter::GetStandardDeviations() const Set/Get the Gaussian smoothing standard deviations for the displacement field. The values are set with respect to pixel coordinates.
    • setNumberOfIterations

      public void setNumberOfIterations(long NumberOfIterations)
      Self& itk::simple::DemonsRegistrationFilter::SetNumberOfIterations(uint32_t NumberOfIterations)
    • getNumberOfIterations

      public long getNumberOfIterations()
      uint32_t itk::simple::DemonsRegistrationFilter::GetNumberOfIterations() const
    • setMaximumRMSError

      public void setMaximumRMSError(double MaximumRMSError)
      Self& itk::simple::DemonsRegistrationFilter::SetMaximumRMSError(double MaximumRMSError)
    • getMaximumRMSError

      public double getMaximumRMSError()
      double itk::simple::DemonsRegistrationFilter::GetMaximumRMSError() const
    • setUseMovingImageGradient

      public void setUseMovingImageGradient(boolean UseMovingImageGradient)
      Self& itk::simple::DemonsRegistrationFilter::SetUseMovingImageGradient(bool UseMovingImageGradient) Switch between using the fixed image and moving image gradient for computing the displacement field updates.
    • useMovingImageGradientOn

      public void useMovingImageGradientOn()
      Self& itk::simple::DemonsRegistrationFilter::UseMovingImageGradientOn() Set the value of UseMovingImageGradient to true or false respectfully.
    • useMovingImageGradientOff

      public void useMovingImageGradientOff()
      Self& itk::simple::DemonsRegistrationFilter::UseMovingImageGradientOff()
    • getUseMovingImageGradient

      public boolean getUseMovingImageGradient()
      bool itk::simple::DemonsRegistrationFilter::GetUseMovingImageGradient() const Switch between using the fixed image and moving image gradient for computing the displacement field updates.
    • setSmoothDisplacementField

      public void setSmoothDisplacementField(boolean SmoothDisplacementField)
      Self& itk::simple::DemonsRegistrationFilter::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()
    • smoothDisplacementFieldOn

      public void smoothDisplacementFieldOn()
      Self& itk::simple::DemonsRegistrationFilter::SmoothDisplacementFieldOn() Set the value of SmoothDisplacementField to true or false respectfully.
    • smoothDisplacementFieldOff

      public void smoothDisplacementFieldOff()
      Self& itk::simple::DemonsRegistrationFilter::SmoothDisplacementFieldOff()
    • getSmoothDisplacementField

      public boolean getSmoothDisplacementField()
      bool itk::simple::DemonsRegistrationFilter::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()
    • setSmoothUpdateField

      public void setSmoothUpdateField(boolean SmoothUpdateField)
      Self& itk::simple::DemonsRegistrationFilter::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()
    • smoothUpdateFieldOn

      public void smoothUpdateFieldOn()
      Self& itk::simple::DemonsRegistrationFilter::SmoothUpdateFieldOn() Set the value of SmoothUpdateField to true or false respectfully.
    • smoothUpdateFieldOff

      public void smoothUpdateFieldOff()
      Self& itk::simple::DemonsRegistrationFilter::SmoothUpdateFieldOff()
    • getSmoothUpdateField

      public boolean getSmoothUpdateField()
      bool itk::simple::DemonsRegistrationFilter::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()
    • setUpdateFieldStandardDeviations

      public void setUpdateFieldStandardDeviations(VectorDouble UpdateFieldStandardDeviations)
      Self& itk::simple::DemonsRegistrationFilter::SetUpdateFieldStandardDeviations(std::vector< double > UpdateFieldStandardDeviations) Set the Gaussian smoothing standard deviations for the update field. The values are set with respect to pixel coordinates.
    • setUpdateFieldStandardDeviations

      public void setUpdateFieldStandardDeviations(double value)
      Self& itk::simple::DemonsRegistrationFilter::SetUpdateFieldStandardDeviations(std::vector< double > UpdateFieldStandardDeviations) Set the Gaussian smoothing standard deviations for the update field. The values are set with respect to pixel coordinates.
    • getUpdateFieldStandardDeviations

      public VectorDouble getUpdateFieldStandardDeviations()
      std::vector<double> itk::simple::DemonsRegistrationFilter::GetUpdateFieldStandardDeviations() const Set the Gaussian smoothing standard deviations for the update field. The values are set with respect to pixel coordinates.
    • setMaximumKernelWidth

      public void setMaximumKernelWidth(long MaximumKernelWidth)
      Self& itk::simple::DemonsRegistrationFilter::SetMaximumKernelWidth(unsigned int MaximumKernelWidth) Set/Get the desired limits of the Gaussian kernel width.
    • getMaximumKernelWidth

      public long getMaximumKernelWidth()
      unsigned int itk::simple::DemonsRegistrationFilter::GetMaximumKernelWidth() const Set/Get the desired limits of the Gaussian kernel width.
    • setMaximumError

      public void setMaximumError(double MaximumError)
      Self& itk::simple::DemonsRegistrationFilter::SetMaximumError(double MaximumError) Set/Get the desired maximum error of the Guassian kernel approximate.
    • getMaximumError

      public double getMaximumError()
      double itk::simple::DemonsRegistrationFilter::GetMaximumError() const Set/Get the desired maximum error of the Guassian kernel approximate.
    • setIntensityDifferenceThreshold

      public void setIntensityDifferenceThreshold(double IntensityDifferenceThreshold)
      Self& itk::simple::DemonsRegistrationFilter::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.
    • getIntensityDifferenceThreshold

      public double getIntensityDifferenceThreshold()
      double itk::simple::DemonsRegistrationFilter::GetIntensityDifferenceThreshold() const
    • setUseImageSpacing

      public void setUseImageSpacing(boolean UseImageSpacing)
      Self& itk::simple::DemonsRegistrationFilter::SetUseImageSpacing(bool UseImageSpacing)
    • useImageSpacingOn

      public void useImageSpacingOn()
      Self& itk::simple::DemonsRegistrationFilter::UseImageSpacingOn() Set the value of UseImageSpacing to true or false respectfully.
    • useImageSpacingOff

      public void useImageSpacingOff()
      Self& itk::simple::DemonsRegistrationFilter::UseImageSpacingOff()
    • getUseImageSpacing

      public boolean getUseImageSpacing()
      bool itk::simple::DemonsRegistrationFilter::GetUseImageSpacing() const
    • getElapsedIterations

      public long getElapsedIterations()
      uint32_t itk::simple::DemonsRegistrationFilter::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.
    • getRMSChange

      public double getRMSChange()
      double itk::simple::DemonsRegistrationFilter::GetRMSChange() const The Root Mean Square of the levelset upon termination. This is a measurement. Its value is updated in the Execute methods, so the value will only be valid after an execution.
    • getMetric

      public double getMetric()
      double itk::simple::DemonsRegistrationFilter::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 the overlapping region between the two images. This is value is only available for the previous iteration and NOT 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.
    • stopRegistration

      public void stopRegistration()
      void itk::simple::DemonsRegistrationFilter::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.
    • getName

      public String getName()
      std::string itk::simple::DemonsRegistrationFilter::GetName() const Name of this class
      Overrides:
      getName in class ProcessObject
    • toString

      public String toString()
      std::string itk::simple::DemonsRegistrationFilter::ToString() const Print ourselves out
      Overrides:
      toString in class ProcessObject
    • execute

      public Image execute(Image fixedImage, Image movingImage, Image initialDisplacementField)
      Image itk::simple::DemonsRegistrationFilter::Execute(const Image &fixedImage, const Image &movingImage, const Image &initialDisplacementField) Execute the filter on the input image
    • execute

      public Image execute(Image fixedImage, Image movingImage)
      Image itk::simple::DemonsRegistrationFilter::Execute(const Image &fixedImage, const Image &movingImage, const Image &initialDisplacementField) Execute the filter on the input image