ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkSyNImageRegistrationMethod.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 itkSyNImageRegistrationMethod_h
19#define itkSyNImageRegistrationMethod_h
20
22
25
26namespace itk
27{
28
56template <typename TFixedImage,
57 typename TMovingImage,
59 typename TVirtualImage = TFixedImage,
61class ITK_TEMPLATE_EXPORT SyNImageRegistrationMethod
62 : public ImageRegistrationMethodv4<TFixedImage, TMovingImage, TOutputTransform, TVirtualImage, TPointSet>
63{
64public:
65 ITK_DISALLOW_COPY_AND_MOVE(SyNImageRegistrationMethod);
66
72
74 itkNewMacro(Self);
75
77 static constexpr unsigned int ImageDimension = TFixedImage::ImageDimension;
78
80 itkOverrideGetNameOfClassMacro(SyNImageRegistrationMethod);
81
83 using FixedImageType = TFixedImage;
84 using FixedImagePointer = typename FixedImageType::Pointer;
86 using MovingImageType = TMovingImage;
87 using MovingImagePointer = typename MovingImageType::Pointer;
89
90 using typename Superclass::PointSetType;
91 using PointSetPointer = typename PointSetType::Pointer;
93
95 using typename Superclass::ImageMetricType;
98
100 using typename Superclass::FixedImageMaskType;
103 using typename Superclass::MovingImageMaskType;
106
110
111 using typename Superclass::MultiMetricType;
112 using typename Superclass::MetricType;
114 using typename Superclass::PointSetMetricType;
115
117 using OutputTransformType = TOutputTransform;
118 using OutputTransformPointer = typename OutputTransformType::Pointer;
119 using RealType = typename OutputTransformType::ScalarType;
120 using DerivativeType = typename OutputTransformType::DerivativeType;
121 using DerivativeValueType = typename DerivativeType::ValueType;
122 using DisplacementFieldType = typename OutputTransformType::DisplacementFieldType;
123 using DisplacementFieldPointer = typename DisplacementFieldType::Pointer;
124 using DisplacementVectorType = typename DisplacementFieldType::PixelType;
125
128
131
134
136
138 itkSetMacro(LearningRate, RealType);
139 itkGetConstMacro(LearningRate, RealType);
141
143 itkSetMacro(NumberOfIterationsPerLevel, NumberOfIterationsArrayType);
144 itkGetConstMacro(NumberOfIterationsPerLevel, NumberOfIterationsArrayType);
146
148 itkSetMacro(ConvergenceThreshold, RealType);
149 itkGetConstMacro(ConvergenceThreshold, RealType);
151
153 itkSetMacro(ConvergenceWindowSize, unsigned int);
154 itkGetConstMacro(ConvergenceWindowSize, unsigned int);
156
161 itkSetMacro(DownsampleImagesForMetricDerivatives, bool);
162 itkGetConstMacro(DownsampleImagesForMetricDerivatives, bool);
164
168 itkSetMacro(AverageMidPointGradients, bool);
169 itkGetConstMacro(AverageMidPointGradients, bool);
171
175 itkSetMacro(GaussianSmoothingVarianceForTheUpdateField, RealType);
176 itkGetConstReferenceMacro(GaussianSmoothingVarianceForTheUpdateField, RealType);
178
182 itkSetMacro(GaussianSmoothingVarianceForTheTotalField, RealType);
183 itkGetConstReferenceMacro(GaussianSmoothingVarianceForTheTotalField, RealType);
185
187 itkGetModifiableObjectMacro(FixedToMiddleTransform, OutputTransformType);
188 itkGetModifiableObjectMacro(MovingToMiddleTransform, OutputTransformType);
190
192 itkSetObjectMacro(FixedToMiddleTransform, OutputTransformType);
193 itkSetObjectMacro(MovingToMiddleTransform, OutputTransformType);
195
196protected:
198 ~SyNImageRegistrationMethod() override = default;
199 void
200 PrintSelf(std::ostream & os, Indent indent) const override;
201
203 void
204 GenerateData() override;
205
209 virtual void
211
216 void
218
222 const TransformBaseType *,
225 const TransformBaseType *,
228 MeasureType &);
232 const TransformBaseType *,
235 const TransformBaseType *,
238 MeasureType &);
239
246
248
251
252 RealType m_ConvergenceThreshold{ static_cast<RealType>(1.0e-6) };
253 unsigned int m_ConvergenceWindowSize{ 10 };
254
258
259private:
262};
263} // end namespace itk
264
265#ifndef ITK_MANUAL_INSTANTIATION
266# include "itkSyNImageRegistrationMethod.hxx"
267#endif
268
269#endif
Array class with size defined at construction time.
Definition itkArray.h:48
Provides local/dense/high-dimensionality transformation via a a displacement field.
Implementation of an image mask as spatial object.
Image< PixelType, TDimension > ImageType
ObjectToObjectMultiMetricv4< ImageDimension, ImageDimension, VirtualImageType, RealType > MultiMetricType
PointSetToPointSetMetricWithIndexv4< PointSetType, PointSetType, RealType > PointSetMetricType
ImageToImageMetricv4< FixedImageType, MovingImageType, VirtualImageType, RealType > ImageMetricType
Control indentation during Print() invocation.
Definition itkIndent.h:50
A superclass of the N-dimensional mesh structure; supports point (geometric coordinate and attribute)...
Definition itkPointSet.h:82
Implements transparent reference counting.
virtual DisplacementFieldPointer GaussianSmoothDisplacementField(const DisplacementFieldType *, const RealType)
void PrintSelf(std::ostream &os, Indent indent) const override
virtual DisplacementFieldPointer ComputeUpdateField(const FixedImagesContainerType, const PointSetsContainerType, const TransformBaseType *, const MovingImagesContainerType, const PointSetsContainerType, const TransformBaseType *, const FixedImageMasksContainerType, const MovingImageMasksContainerType, MeasureType &)
virtual DisplacementFieldPointer ScaleUpdateField(const DisplacementFieldType *)
void InitializeRegistrationAtEachLevel(const SizeValueType) override
ImageRegistrationMethodv4< TFixedImage, TMovingImage, TOutputTransform, TVirtualImage, TPointSet > Superclass
virtual DisplacementFieldPointer ComputeMetricGradientField(const FixedImagesContainerType, const PointSetsContainerType, const TransformBaseType *, const MovingImagesContainerType, const PointSetsContainerType, const TransformBaseType *, const FixedImageMasksContainerType, const MovingImageMasksContainerType, MeasureType &)
~SyNImageRegistrationMethod() override=default
virtual DisplacementFieldPointer InvertDisplacementField(const DisplacementFieldType *, const DisplacementFieldType *=nullptr)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType
Definition itkIntTypes.h:86