ITK  6.0.0
Insight Toolkit
itkDemonsRegistrationFilter.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 itkDemonsRegistrationFilter_h
19 #define itkDemonsRegistrationFilter_h
20 
23 
24 namespace itk
25 {
62 template <typename TFixedImage, typename TMovingImage, typename TDisplacementField>
63 class ITK_TEMPLATE_EXPORT DemonsRegistrationFilter
64  : public PDEDeformableRegistrationFilter<TFixedImage, TMovingImage, TDisplacementField>
65 {
66 public:
67  ITK_DISALLOW_COPY_AND_MOVE(DemonsRegistrationFilter);
68 
74 
76  itkNewMacro(Self);
77 
79  itkOverrideGetNameOfClassMacro(DemonsRegistrationFilter);
80 
82  using typename Superclass::TimeStepType;
83 
85  using typename Superclass::FixedImageType;
86  using typename Superclass::FixedImagePointer;
87 
89  using typename Superclass::MovingImageType;
90  using typename Superclass::MovingImagePointer;
91 
93  using typename Superclass::DisplacementFieldType;
94  using typename Superclass::DisplacementFieldPointer;
95 
97  using typename Superclass::FiniteDifferenceFunctionType;
98 
102 
108  virtual double
109  GetMetric() const;
110 
113  itkSetMacro(UseMovingImageGradient, bool);
114  itkGetConstMacro(UseMovingImageGradient, bool);
115  itkBooleanMacro(UseMovingImageGradient);
122  virtual void
123  SetIntensityDifferenceThreshold(double);
124 
125  virtual double
126  GetIntensityDifferenceThreshold() const;
127 
128 protected:
130  ~DemonsRegistrationFilter() override = default;
131  void
132  PrintSelf(std::ostream & os, Indent indent) const override;
133 
135  void
136  InitializeIteration() override;
137 
139  void
140  ApplyUpdate(const TimeStepType & dt) override;
141 
147  void
148  VerifyInputInformation() const override
149  {}
150 
151 private:
152  bool m_UseMovingImageGradient{};
153 };
154 } // end namespace itk
155 
156 #ifndef ITK_MANUAL_INSTANTIATION
157 # include "itkDemonsRegistrationFilter.hxx"
158 #endif
159 
160 #endif
itk::DemonsRegistrationFilter::VerifyInputInformation
void VerifyInputInformation() const override
Definition: itkDemonsRegistrationFilter.h:148
itk::DemonsRegistrationFunction
Definition: itkDemonsRegistrationFunction.h:54
itk::FiniteDifferenceImageFilter< TDisplacementField, TDisplacementField >::TimeStepType
typename FiniteDifferenceFunctionType::TimeStepType TimeStepType
Definition: itkFiniteDifferenceImageFilter.h:167
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itkDemonsRegistrationFunction.h
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::DemonsRegistrationFilter
Deformably register two images using the demons algorithm.
Definition: itkDemonsRegistrationFilter.h:63
itkPDEDeformableRegistrationFilter.h
itk::PDEDeformableRegistrationFilter
Deformably register two images using a PDE algorithm.
Definition: itkPDEDeformableRegistrationFilter.h:73