#include <itkVariationalRegistrationFilter.h>
Flexible framework for deformable registration of two images using PDE-based variational registration.
VariationalRegistrationFilter aims to minimize the functional
\[ (1)\quad J( \phi ) = D[R, T\circ\phi] + \alpha S[\phi] \rightarrow \min \]
with \( \phi(x)=x+u(x) \) by solving the associated Euler-Lagrange equation (ELE)
\[ f(x, u(x)) + \alpha A[u](x)=0,\quad x\in\Omega \]
\( f \) denotes the force term corresponding to the similarity measure \( D\) and \( A\) is a linear differential operator associated with the regularization term \( S \). The ELE is solved using gradient descent with a semi-implicite update scheme and step size \( \tau \):
\[ (2)\quad u^{k+1} = (Id - \tau\alpha A)^{-1}(u^k + \tau f^k). \]
VariationalRegistrationFilter has two images as input (fixed image \( R \), and moving image \( T \)) and computes the displacement field \( u \) as output.
The force term \( f \) is implemented in a subclass of VariationalRegistrationFunction. The computation of the regularization with \( (Id - \tau A)^{-1}\) is implemented in a subclass of VariationalRegistrationRegularizer. Different force terms and regularization methods can be combined by using the methods SetDifferenceFunction() and SetRegularizer().
The implemented method can be summarized as follows:
\( StopCriterion\) is implemented in the class VariationalRegistrationStopCriterion. Use AddObserver() to enable different types of stop criteria in the variational registration framework.
VariationalRegistrationFilter has the following parameters:
This class make use of the finite difference solver hierarchy.
For details see:
Definition at line 99 of file itkVariationalRegistrationFilter.h.
Inheritance diagram for itk::VariationalRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >:
Collaboration diagram for itk::VariationalRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >:Static Public Member Functions | |
| static Pointer | New () |
Static Public Member Functions inherited from itk::ImageToImageFilter< TInputImage, TOutputImage > | |
| static double | GetGlobalDefaultCoordinateTolerance () |
| static double | GetGlobalDefaultDirectionTolerance () |
| static void | SetGlobalDefaultCoordinateTolerance (double) |
| static void | SetGlobalDefaultDirectionTolerance (double) |
Static Public Member Functions inherited from itk::Object | |
| static bool | GetGlobalWarningDisplay () |
| static void | GlobalWarningDisplayOff () |
| static void | GlobalWarningDisplayOn () |
| static Pointer | New () |
| static void | SetGlobalWarningDisplay (bool val) |
Static Public Member Functions inherited from itk::LightObject | |
| static void | BreakOnError () |
| static Pointer | New () |
Static Public Attributes | |
| static constexpr unsigned int | ImageDimension = Superclass::ImageDimension |
Static Public Attributes inherited from itk::DenseFiniteDifferenceImageFilter< TDisplacementField, TDisplacementField > | |
| static constexpr unsigned int | ImageDimension |
| static constexpr unsigned int | ImageDimension |
Static Public Attributes inherited from itk::FiniteDifferenceImageFilter< TInputImage, TOutputImage > | |
| static constexpr unsigned int | ImageDimension = OutputImageType::ImageDimension |
Static Public Attributes inherited from itk::InPlaceImageFilter< TInputImage, TOutputImage > | |
| static constexpr unsigned int | InputImageDimension |
| static constexpr unsigned int | InputImageDimension |
| static constexpr unsigned int | OutputImageDimension |
| static constexpr unsigned int | OutputImageDimension |
Static Public Attributes inherited from itk::ImageToImageFilter< TInputImage, TOutputImage > | |
| static constexpr unsigned int | InputImageDimension = TInputImage::ImageDimension |
| static constexpr unsigned int | OutputImageDimension = TOutputImage::ImageDimension |
Static Public Attributes inherited from itk::ImageSource< TOutputImage > | |
| static constexpr unsigned int | OutputImageDimension = TOutputImage::ImageDimension |
Private Attributes | |
| RegularizerPointer | m_Regularizer |
| bool | m_SmoothDisplacementField |
| bool | m_SmoothUpdateField |
| bool | m_StopRegistrationFlag |
| using itk::VariationalRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >::ConstPointer = SmartPointer<const Self> |
Definition at line 108 of file itkVariationalRegistrationFilter.h.
| using itk::VariationalRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >::DefaultRegistrationFunctionType |
Definition at line 148 of file itkVariationalRegistrationFilter.h.
| using itk::VariationalRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >::DefaultRegularizerType = VariationalRegistrationDiffusionRegularizer<DisplacementFieldType> |
Definition at line 154 of file itkVariationalRegistrationFilter.h.
| using itk::VariationalRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >::DisplacementFieldPointer = typename DisplacementFieldType::Pointer |
Definition at line 131 of file itkVariationalRegistrationFilter.h.
| using itk::VariationalRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >::DisplacementFieldType = TDisplacementField |
Deformation field type.
Definition at line 130 of file itkVariationalRegistrationFilter.h.
| using itk::VariationalRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >::FixedImageConstPointer = typename FixedImageType::ConstPointer |
Definition at line 122 of file itkVariationalRegistrationFilter.h.
| using itk::VariationalRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >::FixedImagePointer = typename FixedImageType::Pointer |
Definition at line 121 of file itkVariationalRegistrationFilter.h.
| using itk::VariationalRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >::FixedImageType = TFixedImage |
FixedImage image type.
Definition at line 120 of file itkVariationalRegistrationFilter.h.
| using itk::VariationalRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >::MaskImageConstPointer = typename MaskImageType::ConstPointer |
Definition at line 137 of file itkVariationalRegistrationFilter.h.
| using itk::VariationalRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >::MaskImagePixelType = unsigned char |
MovingImage image type.
Definition at line 134 of file itkVariationalRegistrationFilter.h.
| using itk::VariationalRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >::MaskImagePointer = typename MaskImageType::Pointer |
Definition at line 136 of file itkVariationalRegistrationFilter.h.
| using itk::VariationalRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >::MaskImageType = Image<MaskImagePixelType, ImageDimension> |
Definition at line 135 of file itkVariationalRegistrationFilter.h.
| using itk::VariationalRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >::MovingImageConstPointer = typename MovingImageType::ConstPointer |
Definition at line 127 of file itkVariationalRegistrationFilter.h.
| using itk::VariationalRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >::MovingImagePointer = typename MovingImageType::Pointer |
Definition at line 126 of file itkVariationalRegistrationFilter.h.
| using itk::VariationalRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >::MovingImageType = TMovingImage |
MovingImage image type.
Definition at line 125 of file itkVariationalRegistrationFilter.h.
| using itk::VariationalRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >::OutputImageType = typename Superclass::OutputImageType |
Types inherited from the superclass
Definition at line 140 of file itkVariationalRegistrationFilter.h.
| using itk::VariationalRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >::Pointer = SmartPointer<Self> |
Definition at line 107 of file itkVariationalRegistrationFilter.h.
| using itk::VariationalRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >::RegistrationFunctionType |
VariationalRegistrationFunction type.
Definition at line 146 of file itkVariationalRegistrationFilter.h.
| using itk::VariationalRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >::RegularizerPointer = typename RegularizerType::Pointer |
Definition at line 153 of file itkVariationalRegistrationFilter.h.
| using itk::VariationalRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >::RegularizerType = VariationalRegistrationRegularizer<DisplacementFieldType> |
Regularizer type.
Definition at line 152 of file itkVariationalRegistrationFilter.h.
| using itk::VariationalRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >::Self = VariationalRegistrationFilter |
Standard class type alias
Definition at line 105 of file itkVariationalRegistrationFilter.h.
| using itk::VariationalRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >::Superclass = DenseFiniteDifferenceImageFilter<TDisplacementField, TDisplacementField> |
Definition at line 106 of file itkVariationalRegistrationFilter.h.
| using itk::VariationalRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >::TimeStepType = typename Superclass::TimeStepType |
The value type of a time step. Inherited from the superclass.
Definition at line 143 of file itkVariationalRegistrationFilter.h.
|
protected |
|
overrideprotecteddefault |
|
overrideprotectedvirtual |
Apply update.
Reimplemented from itk::DenseFiniteDifferenceImageFilter< TDisplacementField, TDisplacementField >.
|
overrideprotectedvirtual |
A simple method to copy the data from the input to the output. If the input does not exist, a zero field is written to the output.
Reimplemented from itk::DenseFiniteDifferenceImageFilter< TDisplacementField, TDisplacementField >.
|
virtual |
Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.
Reimplemented from itk::Object.
Reimplemented in itk::VariationalSymmetricDiffeomorphicRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >.
|
protected |
Downcast the DifferenceFunction using a dynamic_cast to ensure that it is of the correct type. This method will throw an exception if the function is not of the expected type.
|
protected |
|
overrideprotectedvirtual |
It is difficult to compute in advance the input moving image region required to compute the requested output region. Thus the safest thing to do is to request for the whole moving image.
For the fixed image and deformation field, the input requested region set to be the same as that of the output requested region.
Reimplemented from itk::FiniteDifferenceImageFilter< TInputImage, TOutputImage >.
|
overrideprotectedvirtual |
By default the output deformation field has the same Spacing, Origin and LargestPossibleRegion as the input/initial deformation field. If the initial deformation field is not set, the output information is copied from the fixed image.
Reimplemented from itk::ProcessObject.
|
inlinevirtual |
Get output deformation field.
Reimplemented in itk::VariationalDiffeomorphicRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >.
Definition at line 195 of file itkVariationalRegistrationFilter.h.
|
virtual |
Get the fixed image.
|
virtual |
Get the mask image.
|
virtual |
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
|
virtual |
Get the moving image.
|
virtual |
Run-time type information (and related methods)
Reimplemented from itk::DenseFiniteDifferenceImageFilter< TDisplacementField, TDisplacementField >.
Reimplemented in itk::VariationalDiffeomorphicRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >, and itk::VariationalSymmetricDiffeomorphicRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >.
|
overridevirtual |
Get the number of valid inputs. For DenseRegistration, this checks whether the fixed and moving images have been set. While DenseRegistration can take a third input as an initial deformation field, this input is not a required input.
Reimplemented from itk::ProcessObject.
|
virtual |
Get the regularizer.
|
virtual |
Set that 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 using the VariationalRegistrationRegularizer.
|
virtual |
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 using the VariationalRegistrationRegularizer.
|
inlineoverrideprotectedvirtual |
This method returns true when the current iterative solution of the equation has met the criteria to stop solving.
Reimplemented from itk::FiniteDifferenceImageFilter< TInputImage, TOutputImage >.
Definition at line 308 of file itkVariationalRegistrationFilter.h.
|
overrideprotectedvirtual |
This method is called before iterating the solution.
Reimplemented from itk::FiniteDifferenceImageFilter< TInputImage, TOutputImage >.
Reimplemented in itk::VariationalSymmetricDiffeomorphicRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >.
|
overrideprotectedvirtual |
Initialize the state of filter and equation before each iteration. Progress feedback is implemented as part of this method.
Reimplemented from itk::FiniteDifferenceImageFilter< TInputImage, TOutputImage >.
|
static |
Method for creation through the object factory.
|
overrideprotectedvirtual |
Print information about the filter.
Reimplemented from itk::DenseFiniteDifferenceImageFilter< TDisplacementField, TDisplacementField >.
Reimplemented in itk::VariationalSymmetricDiffeomorphicRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >.
|
virtual |
Set the fixed image.
|
inlinevirtual |
Set initial deformation field.
Reimplemented in itk::VariationalDiffeomorphicRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField >.
Definition at line 188 of file itkVariationalRegistrationFilter.h.
|
virtual |
Set the mask image.
|
virtual |
Set the moving image.
|
virtual |
Set the regularizer.
|
virtual |
Set whether the deformation field is smoothed (regularized). Smoothing the deformation yields a solution elastic in nature. If SmoothDisplacementField is on, then the deformation field is smoothed using the VariationalRegistrationRegularizer.
|
virtual |
Set 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 using the VariationalRegistrationRegularizer.
|
virtual |
|
virtual |
Set that the deformation field is smoothed (regularized). Smoothing the deformation yields a solution elastic in nature. If SmoothDisplacementField is on, then the deformation field is smoothed using the VariationalRegistrationRegularizer.
|
virtual |
|
virtual |
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 using the VariationalRegistrationRegularizer.
|
inlinevirtual |
Stop the registration after the current iteration.
Definition at line 249 of file itkVariationalRegistrationFilter.h.
|
inlineoverrideprotectedvirtual |
Override VerifyInputInformation() since this filter's inputs do not need to occupy the same physical space.
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Definition at line 302 of file itkVariationalRegistrationFilter.h.
|
staticconstexpr |
Get image dimension.
Definition at line 117 of file itkVariationalRegistrationFilter.h.
|
private |
Regularizer for the smoothing of the displacement field.
Definition at line 323 of file itkVariationalRegistrationFilter.h.
|
private |
Modes to control smoothing of the update and deformation fields
Definition at line 329 of file itkVariationalRegistrationFilter.h.
|
private |
Definition at line 330 of file itkVariationalRegistrationFilter.h.
|
private |
Flag to indicate user stop registration request.
Definition at line 326 of file itkVariationalRegistrationFilter.h.