ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkBlockMatchingMultiResolutionThresholdBoundingBoxSearchRegionImageSource.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 itkBlockMatchingMultiResolutionThresholdBoundingBoxSearchRegionImageSource_h
19#define itkBlockMatchingMultiResolutionThresholdBoundingBoxSearchRegionImageSource_h
20
21#include "itkArray.h"
23#include "itkVector.h"
24
27
28namespace itk
29{
30namespace BlockMatching
31{
32
50template <class TFixedImage, class TMovingImage, class TMetricImage, class TDisplacementImage>
52 : public MultiResolutionSearchRegionImageSource<TFixedImage, TMovingImage, TDisplacementImage>
53 , public MetricImageToDisplacementCalculator<TMetricImage, TDisplacementImage>
54{
55public:
60
63
65 static constexpr unsigned int ImageDimension = TMovingImage::ImageDimension;
66
68 using FixedImageType = TFixedImage;
69 using FixedRegionType = typename FixedImageType::RegionType;
70
72 using RadiusType = typename FixedImageType::SizeType;
73
75 using MovingImageType = TMovingImage;
76 using MovingRegionType = typename MovingImageType::RegionType;
77
80 using OutputRegionType = typename OutputImageType::RegionType;
81
85
89
92
94 using ThresholdType = typename TMetricImage::PixelType;
96
99
101 using DisplacementImageType = TDisplacementImage;
102
106
111
114
117 static Pointer
118 New(void)
119 {
121 if (smartPtr.GetPointer() == nullptr)
122 {
123 smartPtr = new Self;
124 }
125 smartPtr->UnRegister();
126 return smartPtr;
127 }
128 // virtual LightObject::Pointer CreateAnother(void) const
129 //{
130 // LightObject::Pointer smartPtr;
132 // line
133 // smartPtr = Self::New().GetPointer();
134 // return smartPtr;
135 //}
136
140 virtual void
142
143 virtual void
145 {
146 m_ThresholdSchedule = schedule;
148 this->Modified();
149 }
150
151 itkGetConstReferenceMacro(ThresholdSchedule, ThresholdScheduleType);
152
154 virtual void
156 {
157 m_TopLevelRadius = radius;
159 this->Modified();
160 }
161
164 virtual void
166 {
168 this->Modified();
169 }
170
171 virtual void
172 SetMinimumSearchRegionRadius(const unsigned int rad)
173 {
174 RadiusType radius;
175 radius.Fill(rad);
176 this->SetMinimumSearchRegionRadius(radius);
177 }
178 itkGetConstReferenceMacro(MinimumSearchRegionRadius, RadiusType);
179
181 virtual void
183
185 virtual void
186 SetMetricImagePixel(const PointType & point, const IndexType & index, MetricImageType * image);
187
188 virtual void
190 {
191 // We do this here instead of SetMetricImagePixel so it only has to be done
192 // once.
193 this->m_DisplacementImage->Modified();
194 }
195
198 virtual void
199 Register() const
200 {
202 }
203
204 virtual void
206 {
208 }
209
210 virtual void
211 Modified() const
212 {
214 }
215
216 bool
217 GetDebug() const
218 {
219 return Superclass::GetDebug();
220 }
221
222 itkGetConstObjectMacro(SearchRegionRadiusImage, SearchRegionRadiusImageType);
223
224protected:
226
227 virtual void
229
230 virtual void
231 ThreadedGenerateData(const OutputRegionType & outputRegion, ThreadIdType threadID) override;
232
237
239
241
242 // The search region radius from the previous level.
245
246private:
248 void
249 operator=(const Self &);
250};
251
252} // namespace BlockMatching
253} // namespace itk
254
255#ifndef ITK_MANUAL_INSTANTIATION
256# include "itkBlockMatchingMultiResolutionThresholdBoundingBoxSearchRegionImageSource.hxx"
257#endif
258
259#endif
Array class with size defined at construction time.
Definition itkArray.h:48
virtual void SetMetricImagePixel(const PointType &point, const IndexType &index, MetricImageType *image)
virtual void ThreadedGenerateData(const OutputRegionType &outputRegion, ThreadIdType threadID) override
Image< typename itk::Vector< typename RadiusType::SizeValueType, ImageDimension >, ImageDimension > SearchRegionRadiusImageType
Templated n-dimensional image class.
Definition itkImage.h:89
virtual void UnRegister() const noexcept
virtual void Register() const
static T::Pointer Create()
virtual void Modified() const
bool GetDebug() const
Resample an image via a coordinate transform.
Implements transparent reference counting.
ObjectType * GetPointer() const noexcept
void UnRegister() noexcept
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned int ThreadIdType
Definition itkIntTypes.h:98