ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkBlockMatchingMultiResolutionImageRegistrationMethod.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 itkBlockMatchingMultiResolutionImageRegistrationMethod_h
19#define itkBlockMatchingMultiResolutionImageRegistrationMethod_h
20
21#include "itkImageSource.h"
23
27
28namespace itk
29{
30namespace BlockMatching
31{
32
50template <typename TFixedImage,
51 typename TMovingImage,
52 typename TMetricImage,
53 typename TDisplacementImage,
54 typename TCoordRep>
55class ITK_TEMPLATE_EXPORT MultiResolutionImageRegistrationMethod : public ImageSource<TDisplacementImage>
56{
57public:
58 ITK_DISALLOW_COPY_AND_MOVE(MultiResolutionImageRegistrationMethod);
59
61 static constexpr unsigned int ImageDimension = TDisplacementImage::ImageDimension;
62
64 using FixedImageType = TFixedImage;
65 using FixedRegionType = typename FixedImageType::RegionType;
66 using FixedImagePointer = typename FixedImageType::Pointer;
67
69 using RadiusType = typename FixedImageType::SizeType;
70
72 using MovingImageType = TMovingImage;
73 using MovingRegionType = typename MovingImageType::RegionType;
74 using MovingImagePointer = typename MovingImageType::Pointer;
75
77 using MetricImageType = TMetricImage;
78
80 using DisplacementImageType = TDisplacementImage;
81
82 using RegionType = typename DisplacementImageType::RegionType;
83 using IndexType = typename RegionType::IndexType;
84 using SizeType = typename RegionType::SizeType;
85
86 using SpacingType = typename DisplacementImageType::SpacingType;
87 using DirectionType = typename DisplacementImageType::DirectionType;
88 using OriginType = typename DisplacementImageType::PointType;
89
92
98
100 itkNewMacro(Self);
101
103 itkOverrideGetNameOfClassMacro(MultiResolutionImageRegistrationMethod);
104
108
111
115
117 using ImageRegistrationMethodType = typename BlockMatching::
118 ImageRegistrationMethod<TFixedImage, TMovingImage, TMetricImage, TDisplacementImage, TCoordRep>;
119 using ImageRegistrationMethodPointer = typename ImageRegistrationMethodType::Pointer;
120
125
128 using SearchRegionImageSourcePointer = typename SearchRegionImageSourceType::Pointer;
129
131 void
133
135 itkSetObjectMacro(FixedImage, FixedImageType);
136 itkGetConstObjectMacro(FixedImage, FixedImageType);
137
139 itkSetObjectMacro(MovingImage, MovingImageType);
140 itkGetConstObjectMacro(MovingImage, MovingImageType);
141
143 itkSetObjectMacro(FixedImagePyramid, FixedImagePyramidType);
144 itkGetConstObjectMacro(FixedImagePyramid, FixedImagePyramidType);
145
147 itkSetObjectMacro(MovingImagePyramid, MovingImagePyramidType);
148 itkGetConstObjectMacro(MovingImagePyramid, MovingImagePyramidType);
149
151 void
152 SetSchedules(const ScheduleType & fixedSchedule, const ScheduleType & movingSchedule);
153 itkGetConstMacro(FixedImagePyramidSchedule, ScheduleType);
154 itkGetConstMacro(MovingImagePyramidSchedule, ScheduleType);
155
157 void
158 SetNumberOfLevels(unsigned long numberOfLevels);
159 itkGetConstMacro(NumberOfLevels, unsigned long);
160
162 itkGetConstMacro(CurrentLevel, unsigned long);
163
167 GetMTime() const override;
168
173
176 itkSetObjectMacro(BlockRadiusCalculator, BlockRadiusCalculatorType);
177 itkGetConstObjectMacro(BlockRadiusCalculator, BlockRadiusCalculatorType);
178
180 itkSetObjectMacro(SearchRegionImageSource, SearchRegionImageSourceType);
181 itkGetConstObjectMacro(SearchRegionImageSource, SearchRegionImageSourceType);
182
183protected:
186
189 void
191
193 void
194 EnlargeOutputRequestedRegion(DataObject * itkNotUsed(data)) override
195 {
196 TDisplacementImage * output = this->GetOutput(0);
197 output->SetRequestedRegionToLargestPossibleRegion();
198 }
199
202 void
203 GenerateData() override;
204
209 void
211
213 void
215
217 void
219
221 void
223
225 itkSetMacro(CurrentLevel, unsigned long);
226
229
232
233 unsigned long m_NumberOfLevels;
234 unsigned long m_CurrentLevel;
235
236 bool m_Stop;
237
240
243
247
248private:
249};
250
251} // end namespace BlockMatching
252} // end namespace itk
253
254#ifndef ITK_MANUAL_INSTANTIATION
255# include "itkBlockMatchingMultiResolutionImageRegistrationMethod.hxx"
256#endif
257
258#endif
Base class calculate the fixed image matching kernel radius for each level in a BlockMatching::MultiR...
typename BlockMatching::ImageRegistrationMethod< FixedImageType, MovingImageType, MetricImageType, DisplacementImageType, CoordRepType > ImageRegistrationMethodType
void SetSchedules(const ScheduleType &fixedSchedule, const ScheduleType &movingSchedule)
void SetNumberOfLevels(unsigned long numberOfLevels)
typename BlockMatching::MultiResolutionSearchRegionImageSource< FixedImageType, MovingImageType, DisplacementImageType > SearchRegionImageSourceType
Generates the search region image during a multiresolution block matching deformable image registrati...
OutputImageType * GetOutput()
Templated n-dimensional image class.
Definition itkImage.h:89
Framework for creating images in a multi-resolution pyramid.
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
SizeValueType ModifiedTimeType
#define itkSetMacro(name, type)