ITK  6.0.0
Insight Toolkit
itkPDEDeformableRegistrationFilter.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 itkPDEDeformableRegistrationFilter_h
19#define itkPDEDeformableRegistrationFilter_h
20
23
24namespace itk
25{
72template <typename TFixedImage, typename TMovingImage, typename TDisplacementField>
73class ITK_TEMPLATE_EXPORT PDEDeformableRegistrationFilter
74 : public DenseFiniteDifferenceImageFilter<TDisplacementField, TDisplacementField>
75{
76public:
77 ITK_DISALLOW_COPY_AND_MOVE(PDEDeformableRegistrationFilter);
78
84
86 itkNewMacro(Self);
87
89 itkOverrideGetNameOfClassMacro(PDEDeformableRegistrationFilter);
90
92 using FixedImageType = TFixedImage;
95
97 using MovingImageType = TMovingImage;
100
102 using DisplacementFieldType = TDisplacementField;
104
106 using typename Superclass::OutputImageType;
107
109 using typename Superclass::FiniteDifferenceFunctionType;
110
114
116 static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
117
120
123
126
129
131 itkSetInputMacro(InitialDisplacementField, DisplacementFieldType);
132
134 itkGetInputMacro(InitialDisplacementField, DisplacementFieldType);
135
139 {
140 return this->GetOutput();
141 }
142
148 std::vector<SmartPointer<DataObject>>::size_type
150
156 itkSetMacro(SmoothDisplacementField, bool);
157 itkGetConstMacro(SmoothDisplacementField, bool);
158 itkBooleanMacro(SmoothDisplacementField);
162
166 itkSetMacro(StandardDeviations, StandardDeviationsType);
167 virtual void
173 itkGetConstReferenceMacro(StandardDeviations, StandardDeviationsType);
174
180 itkSetMacro(SmoothUpdateField, bool);
181 itkGetConstMacro(SmoothUpdateField, bool);
182 itkBooleanMacro(SmoothUpdateField);
187 itkSetMacro(UpdateFieldStandardDeviations, StandardDeviationsType);
188 virtual void
194 itkGetConstReferenceMacro(UpdateFieldStandardDeviations, StandardDeviationsType);
195
197 virtual void
199 {
200 m_StopRegistrationFlag = true;
201 }
202
205 itkSetMacro(MaximumError, double);
206 itkGetConstMacro(MaximumError, double);
211 itkSetMacro(MaximumKernelWidth, unsigned int);
212 itkGetConstMacro(MaximumKernelWidth, unsigned int);
215protected:
218 void
219 PrintSelf(std::ostream & os, Indent indent) const override;
220
223 bool
224 Halt() override
225 {
226 if (m_StopRegistrationFlag)
227 {
228 return true;
229 }
230
231 return this->Superclass::Halt();
232 }
233
237 void
239
242 void
244
248 virtual void
250
254 virtual void
256
261 void
263
268 void
269 Initialize() override;
270
275 void
277
284 void
286
287private:
289 StandardDeviationsType m_StandardDeviations{};
290 StandardDeviationsType m_UpdateFieldStandardDeviations{};
291
293 bool m_SmoothDisplacementField{};
294 bool m_SmoothUpdateField{};
295
299
300private:
302 double m_MaximumError{};
303
305 unsigned int m_MaximumKernelWidth{};
306
308 bool m_StopRegistrationFlag{};
309};
310} // end namespace itk
311
312#ifndef ITK_MANUAL_INSTANTIATION
313# include "itkPDEDeformableRegistrationFilter.hxx"
314#endif
315
316#endif
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
Deformably register two images using a PDE algorithm.
void GenerateInputRequestedRegion() override
virtual void SetUpdateFieldStandardDeviations(double value)
virtual void SetStandardDeviations(double value)
typename FixedImageType::ConstPointer FixedImageConstPointer
typename DisplacementFieldType::Pointer DisplacementFieldPointer
void PrintSelf(std::ostream &os, Indent indent) const override
itkSetInputMacro(FixedImage, FixedImageType)
typename MovingImageType::Pointer MovingImagePointer
itkSetInputMacro(MovingImage, MovingImageType)
itkGetInputMacro(MovingImage, MovingImageType)
itkGetInputMacro(FixedImage, FixedImageType)
itkGetInputMacro(InitialDisplacementField, DisplacementFieldType)
typename MovingImageType::ConstPointer MovingImageConstPointer
std::vector< SmartPointer< DataObject > >::size_type GetNumberOfValidRequiredInputs() const override
itkSetInputMacro(InitialDisplacementField, DisplacementFieldType)
~PDEDeformableRegistrationFilter() override=default
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....