ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkVariationalRegistrationFilter.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 itkVariationalRegistrationFilter_h
19#define itkVariationalRegistrationFilter_h
20
22
27
28namespace itk
29{
30
98template <typename TFixedImage, typename TMovingImage, typename TDisplacementField>
99class VariationalRegistrationFilter : public DenseFiniteDifferenceImageFilter<TDisplacementField, TDisplacementField>
100{
101public:
102 ITK_DISALLOW_COPY_AND_MOVE(VariationalRegistrationFilter);
103
109
111 itkNewMacro(Self);
112
114 itkOverrideGetNameOfClassMacro(VariationalRegistrationFilter);
115
117 static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
118
120 using FixedImageType = TFixedImage;
121 using FixedImagePointer = typename FixedImageType::Pointer;
122 using FixedImageConstPointer = typename FixedImageType::ConstPointer;
123
125 using MovingImageType = TMovingImage;
126 using MovingImagePointer = typename MovingImageType::Pointer;
127 using MovingImageConstPointer = typename MovingImageType::ConstPointer;
128
130 using DisplacementFieldType = TDisplacementField;
131 using DisplacementFieldPointer = typename DisplacementFieldType::Pointer;
132
134 using MaskImagePixelType = unsigned char;
138
141
144
150
155
157 itkSetObjectMacro(Regularizer, RegularizerType);
158
160 itkGetConstReferenceObjectMacro(Regularizer, RegularizerType);
161
163 virtual void
165
167 virtual const FixedImageType *
169
171 virtual void
173
175 virtual const MovingImageType *
177
179 virtual void
181
183 virtual const MaskImageType *
185
187 virtual void
192
194 virtual DisplacementFieldType *
196 {
197 return this->GetOutput();
198 }
199
204 std::vector<SmartPointer<DataObject>>::size_type
206
211 itkBooleanMacro(SmoothDisplacementField);
212
217 itkSetMacro(SmoothDisplacementField, bool);
218
222 itkGetConstMacro(SmoothDisplacementField, bool);
223
227 itkSetMacro(SmoothUpdateField, bool);
228
233 itkGetConstMacro(SmoothUpdateField, bool);
234
238 itkBooleanMacro(SmoothUpdateField);
239
244 virtual double
245 GetMetric() const;
246
248 virtual void
250 {
252 }
253
254protected:
256 ~VariationalRegistrationFilter() override = default;
257
259 void
260 PrintSelf(std::ostream & os, Indent indent) const override;
261
268 void
270
275 void
277
280 void
282
284 void
285 Initialize() override;
286
289 void
291
293 void
294 ApplyUpdate(const TimeStepType & dt) override;
295
301 void
302 VerifyInputInformation() const override
303 {}
304
307 bool
308 Halt() override
309 {
311 }
312
320
321private:
324
327
331};
332
333} // end namespace itk
334
335#ifndef ITK_MANUAL_INSTANTIATION
336# include "itkVariationalRegistrationFilter.hxx"
337#endif
338
339#endif
typename FiniteDifferenceFunctionType::TimeStepType TimeStepType
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
Implements transparent reference counting.
This class computes different Demon forces in the variational registration framework.
This class performs diffusive regularization of a vector field.
typename MovingImageType::Pointer MovingImagePointer
virtual void SetMovingImage(const MovingImageType *ptr)
typename FixedImageType::ConstPointer FixedImageConstPointer
typename DisplacementFieldType::Pointer DisplacementFieldPointer
VariationalRegistrationDemonsFunction< FixedImageType, MovingImageType, DisplacementFieldType > DefaultRegistrationFunctionType
virtual DisplacementFieldType * GetDisplacementField()
typename RegularizerType::Pointer RegularizerPointer
typename MaskImageType::ConstPointer MaskImageConstPointer
virtual void SetFixedImage(const FixedImageType *ptr)
const RegistrationFunctionType * DownCastDifferenceFunctionType() const
void GenerateOutputInformation() override
virtual void SetMaskImage(const MaskImageType *ptr)
virtual const MovingImageType * GetMovingImage() const
typename Superclass::OutputImageType OutputImageType
void GenerateInputRequestedRegion() override
virtual const FixedImageType * GetFixedImage() const
VariationalRegistrationDiffusionRegularizer< DisplacementFieldType > DefaultRegularizerType
virtual const MaskImageType * GetMaskImage() const
VariationalRegistrationFunction< FixedImageType, MovingImageType, DisplacementFieldType > RegistrationFunctionType
RegistrationFunctionType * DownCastDifferenceFunctionType()
~VariationalRegistrationFilter() override=default
DenseFiniteDifferenceImageFilter< TDisplacementField, TDisplacementField > Superclass
virtual double GetMetric() const
virtual void SetInitialDisplacementField(DisplacementFieldType *ptr)
typename FixedImageType::Pointer FixedImagePointer
std::vector< SmartPointer< DataObject > >::size_type GetNumberOfValidRequiredInputs() const override
Image< MaskImagePixelType, ImageDimension > MaskImageType
VariationalRegistrationRegularizer< DisplacementFieldType > RegularizerType
typename MovingImageType::ConstPointer MovingImageConstPointer
void PrintSelf(std::ostream &os, Indent indent) const override
void ApplyUpdate(const TimeStepType &dt) override
Base class for force calculation in the variational registration framework.
Base class for regularization component in the variational registration framework.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
#define itkSetMacro(name, type)