ITK  5.4.0
Insight Toolkit
itkDiffeomorphicDemonsRegistrationFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * https://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkDiffeomorphicDemonsRegistrationFilter_h
19 #define itkDiffeomorphicDemonsRegistrationFilter_h
20 
23 
24 #include "itkMultiplyImageFilter.h"
26 
27 namespace itk
28 {
77 template <typename TFixedImage, typename TMovingImage, typename TDisplacementField>
78 class ITK_TEMPLATE_EXPORT DiffeomorphicDemonsRegistrationFilter
79  : public PDEDeformableRegistrationFilter<TFixedImage, TMovingImage, TDisplacementField>
80 {
81 public:
82  ITK_DISALLOW_COPY_AND_MOVE(DiffeomorphicDemonsRegistrationFilter);
83 
89 
91  itkNewMacro(Self);
92 
94  itkOverrideGetNameOfClassMacro(DiffeomorphicDemonsRegistrationFilter);
95 
97  using typename Superclass::FixedImageType;
98  using typename Superclass::FixedImagePointer;
99 
101  using typename Superclass::MovingImageType;
102  using typename Superclass::MovingImagePointer;
103 
105  using typename Superclass::DisplacementFieldType;
106  using typename Superclass::DisplacementFieldPointer;
107 
109  using typename Superclass::FiniteDifferenceFunctionType;
110 
113 
118 
119  static constexpr unsigned int ImageDimension = FixedImageType::ImageDimension;
120 
125  virtual double
126  GetMetric() const;
127 
128  const double &
129  GetRMSChange() const override;
130 
131  virtual void
132  SetUseGradientType(GradientType gtype);
133 
134  virtual GradientType
135  GetUseGradientType() const;
136 
140  itkSetMacro(UseFirstOrderExp, bool);
141  itkGetConstMacro(UseFirstOrderExp, bool);
142  itkBooleanMacro(UseFirstOrderExp);
149  virtual void
150  SetIntensityDifferenceThreshold(double);
151 
152  virtual double
153  GetIntensityDifferenceThreshold() const;
154 
157  virtual void
158  SetMaximumUpdateStepLength(double);
159 
160  virtual double
161  GetMaximumUpdateStepLength() const;
162 
163 protected:
165  ~DiffeomorphicDemonsRegistrationFilter() override = default;
166  void
167  PrintSelf(std::ostream & os, Indent indent) const override;
168 
170  void
171  InitializeIteration() override;
172 
175  void
176  AllocateUpdateBuffer() override;
177 
179  void
180  ApplyUpdate(const TimeStepType & dt) override;
181 
182 private:
189  DownCastDifferenceFunctionType();
190 
192  DownCastDifferenceFunctionType() const;
193 
195  using MultiplyByConstantType =
197 
199 
201 
202  using FieldInterpolatorType =
204 
206 
213 
215  FieldExponentiatorPointer m_Exponentiator{};
217  AdderPointer m_Adder{};
218  bool m_UseFirstOrderExp{ false };
219 };
220 } // end namespace itk
221 
222 #ifndef ITK_MANUAL_INSTANTIATION
223 # include "itkDiffeomorphicDemonsRegistrationFilter.hxx"
224 #endif
225 
226 #endif
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:93
itkExponentialDisplacementFieldImageFilter.h
itk::DiffeomorphicDemonsRegistrationFilter::TimeStepType
typename FiniteDifferenceFunctionType::TimeStepType TimeStepType
Definition: itkDiffeomorphicDemonsRegistrationFilter.h:112
itkESMDemonsRegistrationFunction.h
itk::DiffeomorphicDemonsRegistrationFilter::FieldExponentiatorPointer
typename FieldExponentiatorType::Pointer FieldExponentiatorPointer
Definition: itkDiffeomorphicDemonsRegistrationFilter.h:208
itk::DiffeomorphicDemonsRegistrationFilter::VectorWarperPointer
typename VectorWarperType::Pointer VectorWarperPointer
Definition: itkDiffeomorphicDemonsRegistrationFilter.h:209
itk::DiffeomorphicDemonsRegistrationFilter::FieldInterpolatorPointer
typename FieldInterpolatorType::Pointer FieldInterpolatorPointer
Definition: itkDiffeomorphicDemonsRegistrationFilter.h:210
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::DiffeomorphicDemonsRegistrationFilter
Deformably register two images using a diffeomorphic demons algorithm.
Definition: itkDiffeomorphicDemonsRegistrationFilter.h:78
itk::FunctionBase< Point< TCoordRep, TInputImage::ImageDimension >, NumericTraits< TInputImage::PixelType >::RealType >::OutputType
NumericTraits< TInputImage::PixelType >::RealType OutputType
Definition: itkFunctionBase.h:62
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itkMultiplyImageFilter.h
itk::PDEDeformableRegistrationFilter::DisplacementFieldType
TDisplacementField DisplacementFieldType
Definition: itkPDEDeformableRegistrationFilter.h:102
itk::ESMDemonsRegistrationFunction
Fast implementation of the symmetric demons registration force.
Definition: itkESMDemonsRegistrationFunction.h:84
itk::DiffeomorphicDemonsRegistrationFilter::GradientType
typename DemonsRegistrationFunctionType::GradientEnum GradientType
Definition: itkDiffeomorphicDemonsRegistrationFilter.h:117
itk::VectorLinearInterpolateNearestNeighborExtrapolateImageFunction
Linearly interpolate or NN extrapolate a vector image at specified positions.
Definition: itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunction.h:54
itk::DiffeomorphicDemonsRegistrationFilter::AdderPointer
typename AdderType::Pointer AdderPointer
Definition: itkDiffeomorphicDemonsRegistrationFilter.h:212
itk::DiffeomorphicDemonsRegistrationFilter::MultiplyByConstantPointer
typename MultiplyByConstantType::Pointer MultiplyByConstantPointer
Definition: itkDiffeomorphicDemonsRegistrationFilter.h:207
itk::ExponentialDisplacementFieldImageFilter
Computes a diffeomorphic displacement field as the Lie group exponential of a vector field.
Definition: itkExponentialDisplacementFieldImageFilter.h:62
itk::WarpVectorImageFilter
Warps an image using an input displacement field.
Definition: itkWarpVectorImageFilter.h:89
itk::ESMDemonsRegistrationFunctionEnums::Gradient
Gradient
Definition: itkESMDemonsRegistrationFunction.h:40
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itkPDEDeformableRegistrationFilter.h
AddImageFilter
Definition: itkAddImageFilter.h:81
itk::MultiplyImageFilter
Pixel-wise multiplication of two images.
Definition: itkMultiplyImageFilter.h:43
itk::PDEDeformableRegistrationFilter
Deformably register two images using a PDE algorithm.
Definition: itkPDEDeformableRegistrationFilter.h:73
itk::DiffeomorphicDemonsRegistrationFilter::FieldInterpolatorOutputType
typename FieldInterpolatorType::OutputType FieldInterpolatorOutputType
Definition: itkDiffeomorphicDemonsRegistrationFilter.h:211
itk::FiniteDifferenceFunction< TDisplacementField >::TimeStepType
double TimeStepType
Definition: itkFiniteDifferenceFunction.h:90