ITK  6.0.0
Insight Toolkit
itkFastSymmetricForcesDemonsRegistrationFilter.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 itkFastSymmetricForcesDemonsRegistrationFilter_h
19 #define itkFastSymmetricForcesDemonsRegistrationFilter_h
20 
23 
24 #include "itkMultiplyImageFilter.h"
26 
27 namespace itk
28 {
72 template <typename TFixedImage, typename TMovingImage, typename TDisplacementField>
74  : public PDEDeformableRegistrationFilter<TFixedImage, TMovingImage, TDisplacementField>
75 {
76 public:
77  ITK_DISALLOW_COPY_AND_MOVE(FastSymmetricForcesDemonsRegistrationFilter);
78 
84 
86  itkNewMacro(Self);
87 
89  itkOverrideGetNameOfClassMacro(FastSymmetricForcesDemonsRegistrationFilter);
90 
92  using typename Superclass::FixedImageType;
93  using typename Superclass::FixedImagePointer;
94 
96  using typename Superclass::MovingImageType;
97  using typename Superclass::MovingImagePointer;
98 
100  using typename Superclass::DisplacementFieldType;
101  using typename Superclass::DisplacementFieldPointer;
102 
103  static constexpr unsigned int ImageDimension = FixedImageType::ImageDimension;
104 
109  virtual double
110  GetMetric() const;
111 
112  const double &
113  GetRMSChange() const override;
114 
122 
124  virtual void
125  SetUseGradientType(GradientType gtype);
126 
127  virtual GradientType
128  GetUseGradientType() const;
129 
134  virtual void
135  SetIntensityDifferenceThreshold(double);
136 
137  virtual double
138  GetIntensityDifferenceThreshold() const;
139 
141  virtual void
142  SetMaximumUpdateStepLength(double);
143 
144  virtual double
145  GetMaximumUpdateStepLength() const;
146 
147 protected:
149  ~FastSymmetricForcesDemonsRegistrationFilter() override = default;
150  void
151  PrintSelf(std::ostream & os, Indent indent) const override;
152 
154  void
155  InitializeIteration() override;
156 
159  void
160  AllocateUpdateBuffer() override;
161 
163  using typename Superclass::FiniteDifferenceFunctionType;
164 
167 
169  void
170  ApplyUpdate(const TimeStepType & dt) override;
171 
173  using MultiplyByConstantType =
175 
177 
180 
181 private:
188  DownCastDifferenceFunctionType();
189 
191  DownCastDifferenceFunctionType() const;
192 
194  AdderPointer m_Adder{};
195 };
196 } // end namespace itk
197 
198 #ifndef ITK_MANUAL_INSTANTIATION
199 # include "itkFastSymmetricForcesDemonsRegistrationFilter.hxx"
200 #endif
201 
202 #endif
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:93
itkExponentialDisplacementFieldImageFilter.h
itkESMDemonsRegistrationFunction.h
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::FastSymmetricForcesDemonsRegistrationFilter::TimeStepType
typename FiniteDifferenceFunctionType::TimeStepType TimeStepType
Definition: itkFastSymmetricForcesDemonsRegistrationFilter.h:166
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itk::FastSymmetricForcesDemonsRegistrationFilter
Deformably register two images using a symmetric forces demons algorithm.
Definition: itkFastSymmetricForcesDemonsRegistrationFilter.h:73
itk::FastSymmetricForcesDemonsRegistrationFilter::GradientType
typename DemonsRegistrationFunctionType::GradientEnum GradientType
Definition: itkFastSymmetricForcesDemonsRegistrationFilter.h:123
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::FastSymmetricForcesDemonsRegistrationFilter::AdderPointer
typename AdderType::Pointer AdderPointer
Definition: itkFastSymmetricForcesDemonsRegistrationFilter.h:179
itk::FastSymmetricForcesDemonsRegistrationFilter::MultiplyByConstantPointer
typename MultiplyByConstantType::Pointer MultiplyByConstantPointer
Definition: itkFastSymmetricForcesDemonsRegistrationFilter.h:178
itk::ESMDemonsRegistrationFunctionEnums::Gradient
Gradient
Definition: itkESMDemonsRegistrationFunction.h:40
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
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::FiniteDifferenceFunction< TDisplacementField >::TimeStepType
double TimeStepType
Definition: itkFiniteDifferenceFunction.h:90