ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkBlockMatchingImageRegistrationMethod.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 itkBlockMatchingImageRegistrationMethod_h
19#define itkBlockMatchingImageRegistrationMethod_h
20
22
25
26namespace itk
27{
28namespace BlockMatching
29{
30
51template <typename TFixedImage,
52 typename TMovingImage,
53 typename TMetricImage,
54 typename TDisplacementImage,
55 typename TCoordRep>
56class ITK_TEMPLATE_EXPORT ImageRegistrationMethod
57 : public ImageToImageFilter<itk::Image<typename TMovingImage::RegionType, TDisplacementImage::ImageDimension>,
58 TDisplacementImage>
59{
60public:
61 ITK_DISALLOW_COPY_AND_MOVE(ImageRegistrationMethod);
62
64 static constexpr unsigned int ImageDimension = TDisplacementImage::ImageDimension;
65
67 using FixedImageType = TFixedImage;
68 using FixedRegionType = typename FixedImageType::RegionType;
69
71 using RadiusType = typename FixedImageType::SizeType;
72
74 using MovingImageType = TMovingImage;
75 using MovingRegionType = typename MovingImageType::RegionType;
76
78 using MetricImageType = TMetricImage;
79
81 using ImageType = TDisplacementImage;
82
83 using RegionType = typename ImageType::RegionType;
84 using IndexType = typename RegionType::IndexType;
85 using SizeType = typename RegionType::SizeType;
86
87 using SpacingType = typename ImageType::SpacingType;
88 using DirectionType = typename ImageType::DirectionType;
89 using OriginType = typename ImageType::PointType;
90
93
99
101 itkNewMacro(Self);
102
104 itkOverrideGetNameOfClassMacro(ImageRegistrationMethod);
105
109
112
115
117 void
119 const FixedImageType *
121 {
122 return this->m_FixedImage.GetPointer();
123 }
124
126 void
128 const MovingImageType *
130 {
131 return this->m_MovingImage.GetPointer();
132 }
133
136 itkGetConstObjectMacro(MetricImageFilter, MetricImageFilterType);
137
142
146 itkSetMacro(UseStreaming, bool);
147 itkGetConstMacro(UseStreaming, bool);
148 itkBooleanMacro(UseStreaming);
149
155 virtual void
156 SetRadius(const RadiusType & radius)
157 {
158 m_Radius = radius;
159 this->Modified();
160 }
161
162 virtual void
163 SetRadius(const unsigned int rad)
164 {
165 RadiusType radius;
166 radius.Fill(rad);
167 this->SetRadius(radius);
168 }
169 itkGetConstReferenceMacro(Radius, RadiusType);
170
183 virtual void
185 {
186 this->SetInput(searchRegionImage);
187 }
188
189
190protected:
192 ~ImageRegistrationMethod() override = default;
193
194 void
196
197 void
199
200 void
202
204 virtual void
206
207 void
208 GenerateData() override;
209
210 typename FixedImageType::Pointer m_FixedImage;
211 typename MovingImageType::Pointer m_MovingImage;
212
215
218
219private:
220};
221
222} // end namespace BlockMatching
223} // end namespace itk
224
225#ifndef ITK_MANUAL_INSTANTIATION
226# include "itkBlockMatchingImageRegistrationMethod.hxx"
227#endif
228
229#endif
void SetMovingImage(MovingImageType *movingImage)
MetricImageToDisplacementCalculatorType::Pointer m_MetricImageToDisplacementCalculator
void EnlargeOutputRequestedRegion(DataObject *data) override
virtual void SetSearchRegionImage(SearchRegionImageType *searchRegionImage)
ImageToImageFilter< SearchRegionImageType, TDisplacementImage > Superclass
MetricImageToDisplacementCalculator< TMetricImage, TDisplacementImage > MetricImageToDisplacementCalculatorType
MetricImageFilter< FixedImageType, MovingImageType, MetricImageType > MetricImageFilterType
void SetFixedImage(FixedImageType *fixedImage)
typename itk::Point< TCoordRep, ImageDimension > CoordRepType
Image< typename MovingImageType::RegionType, ImageDimension > SearchRegionImageType
Create a metric image by applying a metric to a kernel over a search region.
Calculates the displacement of a block from the MetricImage(s).
Templated n-dimensional image class.
Definition itkImage.h:89
virtual void Modified() const
A templated class holding a geometric point in n-Dimensional space.
Definition itkPoint.h:54
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
#define itkSetMacro(name, type)