ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkVariationalRegistrationMultiResolutionFilter.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 itkVariationalRegistrationMultiResolutionFilter_h
19#define itkVariationalRegistrationMultiResolutionFilter_h
20
21#include "itkImage.h"
25#include "itkArray.h"
26
27namespace itk
28{
80template <typename TFixedImage, typename TMovingImage, typename TDisplacementField, typename TRealType = float>
81class VariationalRegistrationMultiResolutionFilter : public ImageToImageFilter<TDisplacementField, TDisplacementField>
82{
83public:
84 ITK_DISALLOW_COPY_AND_MOVE(VariationalRegistrationMultiResolutionFilter);
85
91
93 itkNewMacro(Self);
94
96 itkOverrideGetNameOfClassMacro(VariationalRegistrationMultiResolutionFilter);
97
99 using FixedImageType = TFixedImage;
100 using FixedImagePointer = typename FixedImageType::Pointer;
101 using FixedImageConstPointer = typename FixedImageType::ConstPointer;
102
104 using MovingImageType = TMovingImage;
105 using MovingImagePointer = typename MovingImageType::Pointer;
106 using MovingImageConstPointer = typename MovingImageType::ConstPointer;
107
109 using DisplacementFieldType = TDisplacementField;
110 using DisplacementFieldPointer = typename DisplacementFieldType::Pointer;
111
113 static constexpr unsigned int ImageDimension = FixedImageType::ImageDimension;
114
116 using MaskImagePixelType = unsigned char;
120
123
127
130
134
138
142
146
149
151 virtual void
153
155 const FixedImageType *
157
159 virtual void
161
163 const MovingImageType *
165
167 void
169
171 const MaskImageType *
173
178 virtual void
180 {
181 this->SetInput(ptr);
182 }
183
188 {
189 return this->GetInput();
190 }
191
196 {
197 return this->GetOutput();
198 }
199
201 itkGetModifiableObjectMacro(DisplacementField, DisplacementFieldType);
202
208 std::vector<SmartPointer<DataObject>>::size_type
210
212 itkSetObjectMacro(RegistrationFilter, RegistrationType);
213
215 itkGetConstObjectMacro(RegistrationFilter, RegistrationType);
216
218 itkSetObjectMacro(FixedImagePyramid, FixedImagePyramidType);
219
221 itkGetConstObjectMacro(FixedImagePyramid, FixedImagePyramidType);
222
224 itkSetObjectMacro(MovingImagePyramid, MovingImagePyramidType);
225
227 itkGetConstObjectMacro(MovingImagePyramid, MovingImagePyramidType);
228
230 itkSetObjectMacro(MaskImagePyramid, MaskImagePyramidType);
231
233 itkGetConstObjectMacro(MaskImagePyramid, MaskImagePyramidType);
234
236 virtual void
237 SetNumberOfLevels(unsigned int num);
238
240 itkGetConstReferenceMacro(NumberOfLevels, unsigned int);
241
243 itkGetConstReferenceMacro(ElapsedLevels, unsigned int);
244
247
250 itkSetVectorMacro(NumberOfIterations, unsigned int, m_NumberOfLevels);
251
253 itkGetConstReferenceMacro(NumberOfIterations, NumberOfIterationsType);
254
256 itkSetObjectMacro(FieldExpander, FieldExpanderType);
257
259 itkGetConstObjectMacro(FieldExpander, FieldExpanderType);
260
262 virtual void
264
265protected:
268
270 void
271 PrintSelf(std::ostream & os, Indent indent) const override;
272
275 void
276 GenerateData() override;
277
281 void
283
290 void
292
296 void
298
301 virtual bool
303
304private:
311
312 unsigned int m_NumberOfLevels;
313 unsigned int m_ElapsedLevels;
315
318};
319
320} // end namespace itk
321
322#ifndef ITK_MANUAL_INSTANTIATION
323# include "itkVariationalRegistrationMultiResolutionFilter.hxx"
324#endif
325
326
327#endif
Array class with size defined at construction time.
Definition itkArray.h:48
Base class for all data objects in ITK.
OutputImageType * GetOutput()
virtual void SetInput(const InputImageType *input)
Templated n-dimensional image class.
Definition itkImage.h:89
SmartPointer< const Self > ConstPointer
Definition itkImage.h:97
Control indentation during Print() invocation.
Definition itkIndent.h:53
Framework for creating images in a multi-resolution pyramid.
Resample an image via a coordinate transform.
Implements transparent reference counting.
Flexible framework for deformable registration of two images using PDE-based variational registration...
ImageToImageFilter< TDisplacementField, TDisplacementField > Superclass
~VariationalRegistrationMultiResolutionFilter() override=default
VariationalRegistrationFilter< FixedImageType, MovingImageType, DisplacementFieldType > RegistrationType
VariationalRegistrationFilter< FixedImageType, MovingImageType, DisplacementFieldType > DefaultRegistrationType
void SetMaskImage(const MaskImageType *ptr)
virtual void SetNumberOfLevels(unsigned int num)
const FixedImageType * GetFixedImage() const
const MovingImageType * GetMovingImage() const
void PrintSelf(std::ostream &os, Indent indent) const override
void EnlargeOutputRequestedRegion(DataObject *ptr) override
const MaskImageType * GetMaskImage() const
ResampleImageFilter< DisplacementFieldType, DisplacementFieldType > FieldExpanderType
MultiResolutionPyramidImageFilter< MovingImageType, MovingImageType > MovingImagePyramidType
MultiResolutionPyramidImageFilter< FloatImageType, FloatImageType > MaskImagePyramidType
MultiResolutionPyramidImageFilter< FixedImageType, FixedImageType > FixedImagePyramidType
virtual void SetFixedImage(const FixedImageType *ptr)
virtual void SetMovingImage(const MovingImageType *ptr)
std::vector< SmartPointer< DataObject > >::size_type GetNumberOfValidRequiredInputs() const override
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
#define itkSetMacro(name, type)