go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkMultiResolutionImageRegistrationMethod2.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright UMC Utrecht and contributors
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
23/*=========================================================================
24
25 Program: Insight Segmentation & Registration Toolkit
26 Module: $RCSfile$
27 Date: $Date: 2008-06-27 17:50:36 +0200 (Fri, 27 Jun 2008) $
28 Version: $Revision: 1728 $
29
30 Copyright (c) Insight Software Consortium. All rights reserved.
31 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
32
33 This software is distributed WITHOUT ANY WARRANTY; without even
34 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
35 PURPOSE. See the above copyright notices for more information.
36
37=========================================================================*/
38#ifndef itkMultiResolutionImageRegistrationMethod2_h
39#define itkMultiResolutionImageRegistrationMethod2_h
40
41#include "itkProcessObject.h"
43#include "itkSingleValuedNonLinearOptimizer.h"
44#include "itkMultiResolutionPyramidImageFilter.h"
45#include "itkNumericTraits.h"
46#include "itkDataObjectDecorator.h"
47
48namespace itk
49{
50
96template <typename TFixedImage, typename TMovingImage>
97class ITK_TEMPLATE_EXPORT MultiResolutionImageRegistrationMethod2 : public ProcessObject
99public:
100 ITK_DISALLOW_COPY_AND_MOVE(MultiResolutionImageRegistrationMethod2);
104 using Superclass = ProcessObject;
105 using Pointer = SmartPointer<Self>;
106 using ConstPointer = SmartPointer<const Self>;
109 itkNewMacro(Self);
112 itkTypeMacro(MultiResolutionImageRegistrationMethod2, ProcessObject);
115 using FixedImageType = TFixedImage;
116 using FixedImageConstPointer = typename FixedImageType::ConstPointer;
117 using FixedImageRegionType = typename FixedImageType::RegionType;
118 using FixedImageRegionPyramidType = std::vector<FixedImageRegionType>;
121 using MovingImageType = TMovingImage;
122 using MovingImageConstPointer = typename MovingImageType::ConstPointer;
123
127
130 using TransformPointer = typename TransformType::Pointer;
131
135 using TransformOutputType = DataObjectDecorator<TransformType>;
136 using TransformOutputPointer = typename TransformOutputType::Pointer;
137 using TransformOutputConstPointer = typename TransformOutputType::ConstPointer;
138
140 using InterpolatorType = typename MetricType::InterpolatorType;
141 using InterpolatorPointer = typename InterpolatorType::Pointer;
142
145
147 using FixedImagePyramidType = MultiResolutionPyramidImageFilter<FixedImageType, FixedImageType>;
148 using FixedImagePyramidPointer = typename FixedImagePyramidType::Pointer;
149
151 using MovingImagePyramidType = MultiResolutionPyramidImageFilter<MovingImageType, MovingImageType>;
152 using MovingImagePyramidPointer = typename MovingImagePyramidType::Pointer;
153
157 using ParametersType = typename MetricType::TransformParametersType;
158
160 using DataObjectPointer = typename DataObject::Pointer;
161
163 virtual void
165
167 virtual void
169
171 itkSetConstObjectMacro(FixedImage, FixedImageType);
172 itkGetConstObjectMacro(FixedImage, FixedImageType);
173
175 itkSetConstObjectMacro(MovingImage, MovingImageType);
176 itkGetConstObjectMacro(MovingImage, MovingImageType);
177
179 itkSetObjectMacro(Optimizer, OptimizerType);
181
183 itkSetObjectMacro(Metric, MetricType);
185
187 itkSetMacro(FixedImageRegion, FixedImageRegionType);
188 itkGetConstReferenceMacro(FixedImageRegion, FixedImageRegionType);
189
191 itkSetObjectMacro(Transform, TransformType);
193
195 itkSetObjectMacro(Interpolator, InterpolatorType);
197
199 itkSetObjectMacro(FixedImagePyramid, FixedImagePyramidType);
201
203 itkSetObjectMacro(MovingImagePyramid, MovingImagePyramidType);
205
207 itkSetClampMacro(NumberOfLevels, unsigned long, 1, NumericTraits<unsigned long>::max());
208 itkGetConstMacro(NumberOfLevels, unsigned long);
209
211 itkGetConstMacro(CurrentLevel, unsigned long);
212
214 itkSetMacro(InitialTransformParameters, ParametersType);
215 itkGetConstReferenceMacro(InitialTransformParameters, ParametersType);
216
221 itkSetMacro(InitialTransformParametersOfNextLevel, ParametersType);
222 itkGetConstReferenceMacro(InitialTransformParametersOfNextLevel, ParametersType);
223
227 itkGetConstReferenceMacro(LastTransformParameters, ParametersType);
228
230 const TransformOutputType *
231 GetOutput() const;
232
237 MakeOutput(ProcessObject::DataObjectPointerArraySizeType idx) override;
238
242 ModifiedTimeType
243 GetMTime() const override;
244
245protected:
248
251
253 void
254 PrintSelf(std::ostream & os, Indent indent) const override;
255
259 void
260 GenerateData() override;
261
266 virtual void
268
270 virtual void
272
274 itkSetMacro(CurrentLevel, unsigned long);
275
280 ParametersType m_LastTransformParameters{};
281 bool m_Stop{};
282
283private:
284 // Private using-declarations, to avoid `-Woverloaded-virtual` warnings from GCC (GCC 11.4).
285 using ProcessObject::MakeOutput;
286
288 MetricPointer m_Metric{};
289 OptimizerType::Pointer m_Optimizer{};
290 TransformPointer m_Transform{};
291 InterpolatorPointer m_Interpolator{};
292
293 ParametersType m_InitialTransformParameters{};
294 ParametersType m_InitialTransformParametersOfNextLevel{};
295
296 MovingImageConstPointer m_MovingImage{};
298 MovingImagePyramidPointer m_MovingImagePyramid{};
299 FixedImagePyramidPointer m_FixedImagePyramid{};
300
301 FixedImageRegionType m_FixedImageRegion{};
302 FixedImageRegionPyramidType m_FixedImageRegionPyramid{};
303
304 unsigned long m_NumberOfLevels{};
305 unsigned long m_CurrentLevel{};
306};
307
308} // end namespace itk
309
310#ifndef ITK_MANUAL_INSTANTIATION
311# include "itkMultiResolutionImageRegistrationMethod2.hxx"
312#endif
313
314#endif // end #ifndef itkMultiResolutionImageRegistrationMethod2_h
An extension of the ITK ImageToImageMetric. It is the intended base class for all elastix metrics.
Transform maps points, vectors and covariant vectors from an input space to an output space.
Base class for multi-resolution image registration methods.
itkGetModifiableObjectMacro(Interpolator, InterpolatorType)
typename TransformOutputType::ConstPointer TransformOutputConstPointer
itkGetModifiableObjectMacro(Optimizer, OptimizerType)
MultiResolutionPyramidImageFilter< FixedImageType, FixedImageType > FixedImagePyramidType
itkGetModifiableObjectMacro(MovingImagePyramid, MovingImagePyramidType)
const TransformOutputType * GetOutput() const
~MultiResolutionImageRegistrationMethod2() override=default
ModifiedTimeType GetMTime() const override
DataObjectPointer MakeOutput(ProcessObject::DataObjectPointerArraySizeType idx) override
itkGetModifiableObjectMacro(FixedImagePyramid, FixedImagePyramidType)
void PrintSelf(std::ostream &os, Indent indent) const override
itkGetModifiableObjectMacro(Transform, TransformType)
MultiResolutionPyramidImageFilter< MovingImageType, MovingImageType > MovingImagePyramidType


Generated on 2024-07-17 for elastix by doxygen 1.11.0 (9b424b03c9833626cd435af22a444888fbbb192d) elastix logo