go home Home | Main Page | Topics | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
Loading...
Searching...
No Matches
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
98{
99public:
104 using Superclass = ProcessObject;
105 using Pointer = SmartPointer<Self>;
106 using ConstPointer = SmartPointer<const Self>;
109 itkNewMacro(Self);
115 using FixedImageType = TFixedImage;
116 using FixedImageConstPointer = typename FixedImageType::ConstPointer;
117 using FixedImageRegionType = typename FixedImageType::RegionType;
118 using FixedImageRegionPyramidType = std::vector<FixedImageRegionType>;
119
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 void
165
167 itkSetConstObjectMacro(FixedImage, FixedImageType);
168 itkGetConstObjectMacro(FixedImage, FixedImageType);
169
171 itkSetConstObjectMacro(MovingImage, MovingImageType);
172 itkGetConstObjectMacro(MovingImage, MovingImageType);
173
175 itkSetObjectMacro(Optimizer, OptimizerType);
177
179 itkSetObjectMacro(Metric, MetricType);
181
183 itkSetMacro(FixedImageRegion, FixedImageRegionType);
184 itkGetConstReferenceMacro(FixedImageRegion, FixedImageRegionType);
185
187 itkSetObjectMacro(Transform, TransformType);
189
191 itkSetObjectMacro(Interpolator, InterpolatorType);
193
195 itkSetObjectMacro(FixedImagePyramid, FixedImagePyramidType);
197
199 itkSetObjectMacro(MovingImagePyramid, MovingImagePyramidType);
201
203 itkSetClampMacro(NumberOfLevels, unsigned long, 1, NumericTraits<unsigned long>::max());
204 itkGetConstMacro(NumberOfLevels, unsigned long);
205
207 itkGetConstMacro(CurrentLevel, unsigned long);
208
210 itkSetMacro(InitialTransformParameters, ParametersType);
211 itkGetConstReferenceMacro(InitialTransformParameters, ParametersType);
212
217 itkSetMacro(InitialTransformParametersOfNextLevel, ParametersType);
218 itkGetConstReferenceMacro(InitialTransformParametersOfNextLevel, ParametersType);
219
223 itkGetConstReferenceMacro(LastTransformParameters, ParametersType);
224
226 const TransformOutputType *
227 GetOutput() const;
228
233 MakeOutput(ProcessObject::DataObjectPointerArraySizeType idx) override;
234
238 ModifiedTimeType
239 GetMTime() const override;
240
241protected:
244
247
249 void
250 PrintSelf(std::ostream & os, Indent indent) const override;
251
255 void
256 GenerateData() override;
257
262 virtual void
264
266 virtual void
268
270 itkSetMacro(CurrentLevel, unsigned long);
271
277 bool m_Stop{};
278
279private:
280 // Private using-declarations, to avoid `-Woverloaded-virtual` warnings from GCC (GCC 11.4).
281 using ProcessObject::MakeOutput;
282
285 OptimizerType::Pointer m_Optimizer{};
288
291
296
299
300 unsigned long m_NumberOfLevels{};
301 unsigned long m_CurrentLevel{};
302};
303
304} // end namespace itk
305
306#ifndef ITK_MANUAL_INSTANTIATION
307# include "itkMultiResolutionImageRegistrationMethod2.hxx"
308#endif
309
310#endif // end #ifndef itkMultiResolutionImageRegistrationMethod2_h
An extension of the ITK ImageToImageMetric. It is the intended base class for all elastix metrics.
AdvancedTransform< ScalarType, FixedImageDimension, MovingImageDimension > AdvancedTransformType
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)
itkOverrideGetNameOfClassMacro(MultiResolutionImageRegistrationMethod2)
const TransformOutputType * GetOutput() const
~MultiResolutionImageRegistrationMethod2() override=default
ITK_DISALLOW_COPY_AND_MOVE(MultiResolutionImageRegistrationMethod2)
ModifiedTimeType GetMTime() const override
DataObjectPointer MakeOutput(ProcessObject::DataObjectPointerArraySizeType idx) override
itkGetModifiableObjectMacro(FixedImagePyramid, FixedImagePyramidType)
AdvancedImageToImageMetric< FixedImageType, MovingImageType > MetricType
void PrintSelf(std::ostream &os, Indent indent) const override
itkGetModifiableObjectMacro(Transform, TransformType)
MultiResolutionPyramidImageFilter< MovingImageType, MovingImageType > MovingImagePyramidType
MultiInputMultiResolutionImageRegistrationMethodBase< TFixedImage, TMovingImage > Superclass


Generated on 1774142652 for elastix by doxygen 1.15.0 elastix logo