ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkBlockMatchingMultiResolutionSearchRegionImageSource.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 itkBlockMatchingMultiResolutionSearchRegionImageSource_h
19#define itkBlockMatchingMultiResolutionSearchRegionImageSource_h
20
22
23#include "itkImageDuplicator.h"
24#include "itkImageSource.h"
25#include "itkArray2D.h"
26
27namespace itk
28{
29namespace BlockMatching
30{
31
32// Forward declaration.
33template <typename TFixedImageF,
34 typename TMovingImageF,
35 typename TMetricImage,
36 typename TDisplacementImageF,
37 typename TCoordRep>
39
40
53template <typename TFixedImage, typename TMovingImage, typename TDisplacementImage>
55 : public ImageSource<Image<typename TMovingImage::RegionType, TMovingImage::ImageDimension>>
56{
57public:
58 ITK_DISALLOW_COPY_AND_MOVE(MultiResolutionSearchRegionImageSource);
59
61 static constexpr unsigned int ImageDimension = TMovingImage::ImageDimension;
62
64 using FixedImageType = TFixedImage;
65 using FixedRegionType = typename FixedImageType::RegionType;
66
68 using RadiusType = typename FixedImageType::SizeType;
69
71 using MovingImageType = TMovingImage;
72 using MovingRegionType = typename MovingImageType::RegionType;
73
77
83
86
89
91 using DisplacementImageType = TDisplacementImage;
92 using DisplacementImagePointer = typename DisplacementImageType::Pointer;
93
97
99 itkOverrideGetNameOfClassMacro(MultiResolutionSearchRegionImageSource);
100
102 void
104 {
105 m_FixedImage = fixedImage;
106 this->Modified();
107 }
108 const FixedImageType *
110 {
111 return this->m_FixedImage.GetPointer();
112 }
113
115 void
117 {
118 m_MovingImage = movingImage;
119 this->Modified();
120 }
121 const MovingImageType *
123 {
124 return this->m_MovingImage.GetPointer();
125 }
126
129 virtual void
131 {
132 m_FixedBlockRadius = radius;
133 this->Modified();
134 }
135 itkGetConstMacro(FixedBlockRadius, RadiusType);
137 virtual void
138 SetFixedBlockRadius(const unsigned int rad)
139 {
140 RadiusType radius;
141 radius.Fill(rad);
142 this->SetFixedBlockRadius(radius);
143 }
144
148 virtual void
150 {
151 m_PyramidSchedule = schedule;
152 this->Modified();
153 }
154
156 itkGetConstReferenceMacro(PyramidSchedule, PyramidScheduleType);
157
163 virtual void
165 {
166 m_OverlapSchedule = schedule;
167 this->Modified();
168 }
169 itkGetConstReferenceMacro(OverlapSchedule, OverlapScheduleType);
170
173 virtual void
174 SetOverlapSchedule(const double & schedule);
175
177 template <typename TFixedImageF,
178 typename TMovingImageF,
179 typename TMetricImage,
180 typename TDisplacementImageF,
181 typename TCoordRep>
183
184 itkGetConstObjectMacro(PreviousDisplacements, DisplacementImageType);
185
186protected:
188
191 itkSetMacro(CurrentLevel, unsigned long);
192
196 virtual void
198
200
201 void
203
204 void
206
207 typename FixedImageType::Pointer m_FixedImage;
208 typename MovingImageType::Pointer m_MovingImage;
209
211
214
215 unsigned long m_CurrentLevel;
216
219
221
222private:
223};
224
225} // namespace BlockMatching
226} // namespace itk
227
228#ifndef ITK_MANUAL_INSTANTIATION
229# include "itkBlockMatchingMultiResolutionSearchRegionImageSource.hxx"
230#endif
231
232#endif
Array2D class representing a 2D array.
Definition itkArray2D.h:43
Base class for multi-resolution image registration methods in the BlockMatching set of tools.
ResampleImageFilter< DisplacementImageType, DisplacementImageType > DisplacementResamplerType
virtual void SetPreviousDisplacements(const DisplacementImageType *displacements)
virtual void SetOverlapSchedule(const double &schedule)
A helper class which creates an image which is perfect copy of the input image.
Templated n-dimensional image class.
Definition itkImage.h:89
virtual void Modified() const
Resample an image via a coordinate transform.
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
#define itkSetMacro(name, type)