ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkFastSymmetricForcesDemonsRegistrationFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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  * http://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,
75  TDisplacementField >
76 {
77 public:
78  ITK_DISALLOW_COPY_AND_ASSIGN(FastSymmetricForcesDemonsRegistrationFilter);
79 
85 
87  itkNewMacro(Self);
88 
92 
94  using FixedImageType = typename Superclass::FixedImageType;
95  using FixedImagePointer = typename Superclass::FixedImagePointer;
96 
98  using MovingImageType = typename Superclass::MovingImageType;
99  using MovingImagePointer = typename Superclass::MovingImagePointer;
100 
102  using DisplacementFieldType = typename Superclass::DisplacementFieldType;
103  using DisplacementFieldPointer = typename Superclass::DisplacementFieldPointer;
104 
105  static constexpr unsigned int ImageDimension = FixedImageType::ImageDimension;
106 
111  virtual double GetMetric() const;
112 
113  const double & GetRMSChange() const override;
114 
123 
125  virtual void SetUseGradientType(GradientType gtype);
126 
127  virtual GradientType GetUseGradientType() const;
128 
133  virtual void SetIntensityDifferenceThreshold(double);
134 
135  virtual double GetIntensityDifferenceThreshold() const;
136 
137  virtual void SetMaximumUpdateStepLength(double);
138 
139  virtual double GetMaximumUpdateStepLength() const;
140 
141 protected:
143  ~FastSymmetricForcesDemonsRegistrationFilter() override = default;
144  void PrintSelf(std::ostream & os, Indent indent) const override;
145 
147  void InitializeIteration() override;
148 
151  void AllocateUpdateBuffer() override;
152 
154  using FiniteDifferenceFunctionType = typename Superclass::FiniteDifferenceFunctionType;
155 
157  using TimeStepType = typename FiniteDifferenceFunctionType::TimeStepType;
158 
160  void ApplyUpdate(const TimeStepType& dt) override;
161 
167 
168  using AdderType = AddImageFilter<
171 
174 
175 private:
178  DemonsRegistrationFunctionType * DownCastDifferenceFunctionType();
179 
180  const DemonsRegistrationFunctionType * DownCastDifferenceFunctionType() const;
181 
184 };
185 } // end namespace itk
186 
187 #ifndef ITK_MANUAL_INSTANTIATION
188 #include "itkFastSymmetricForcesDemonsRegistrationFilter.hxx"
189 #endif
190 
191 #endif
typename FiniteDifferenceFunctionType::TimeStepType TimeStepType
Pixel-wise addition of two images.
Light weight base class for most itk classes.
typename DemonsRegistrationFunctionType::GradientType GradientType
Deformably register two images using a symmetric forces demons algorithm.
Deformably register two images using a PDE algorithm.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Pixel-wise multiplication of two images.
typename Superclass::FiniteDifferenceFunctionType FiniteDifferenceFunctionType
Templated n-dimensional image class.
Definition: itkImage.h:75
Fast implementation of the symmetric demons registration force.