ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkCurvatureRegistrationFilter.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 itkCurvatureRegistrationFilter_h
19#define itkCurvatureRegistrationFilter_h
20
23
24// Uses FFTW real-to-real (DCT) transforms, implemented only for double
25// precision here, so this filter requires ITK_USE_FFTWD and an FFTW with
26// working r2r plans (not cuFFTW or oneMKL).
27#if !defined(ITK_USE_CUFFTW) && !defined(ITK_USE_MKL) && defined(ITK_USE_FFTWD)
28# include "fftw3.h"
29
30namespace itk
31{
97template <typename TFixedImage,
98 typename TMovingImage,
99 typename TDisplacementField,
101class ITK_TEMPLATE_EXPORT CurvatureRegistrationFilter
102 : public PDEDeformableRegistrationFilter<TFixedImage, TMovingImage, TDisplacementField>
103{
104public:
105 ITK_DISALLOW_COPY_AND_MOVE(CurvatureRegistrationFilter);
106
112
114 itkNewMacro(Self);
115
117 itkOverrideGetNameOfClassMacro(CurvatureRegistrationFilter);
118
120 using typename Superclass::TimeStepType;
121
123 using typename Superclass::FixedImageType;
124 using typename Superclass::FixedImagePointer;
125 static constexpr unsigned int ImageDimension = FixedImageType::ImageDimension;
126
128 using typename Superclass::MovingImageType;
129 using typename Superclass::MovingImagePointer;
130
134
135 using DisplacementFieldPixelType = typename TDisplacementField::PixelType;
136 using DisplacementFieldComponentType = typename DisplacementFieldPixelType::ValueType;
137 static constexpr unsigned int DeformationVectorDimension = DisplacementFieldPixelType::Dimension;
138
139 using RealTypeDFT = double;
140
143
146
148 using RegistrationFunctionType = TImageForceFunction;
149
151 void
152 SetConstraintWeight(const float w)
153 {
155 }
156
158 void
160 {
161 m_TimeStep = ts;
162 }
163
169 virtual double
170 GetMetric() const;
171
172protected:
175 void
176 PrintSelf(std::ostream & os, Indent indent) const override;
177
179 void
180 Initialize() override;
181
183 void
184 ApplyUpdate(const TimeStepType & dt) override;
185
186private:
188
191
193
194 fftw_plan m_PlanForwardDCT{};
195 fftw_plan m_PlanBackwardDCT{};
196
198
200};
201} // end namespace itk
202
203# ifndef ITK_MANUAL_INSTANTIATION
204# include "itkCurvatureRegistrationFilter.hxx"
205# endif
206
207#endif // !defined(ITK_USE_CUFFTW) && !defined(ITK_USE_MKL) && defined(ITK_USE_FFTWD)
208
209#endif
void PrintSelf(std::ostream &os, Indent indent) const override
RealTypeDFT * m_DiagonalElements[ImageDimension]
typename DisplacementFieldPixelType::ValueType DisplacementFieldComponentType
Image< RealTypeDFT, TDisplacementField::ImageDimension > DisplacementFieldComponentImageType
static constexpr unsigned int DeformationVectorDimension
PDEDeformableRegistrationFilter< TFixedImage, TMovingImage, TDisplacementField > Superclass
typename DisplacementFieldComponentImageType::Pointer DisplacementFieldComponentImagePointer
unsigned int m_FixedImageDimensions[ImageDimension]
virtual double GetMetric() const
typename TDisplacementField::PixelType DisplacementFieldPixelType
void ApplyUpdate(const TimeStepType &dt) override
typename FiniteDifferenceFunctionType::TimeStepType TimeStepType
typename FiniteDifferenceFunctionType::TimeStepType TimeStepType
Templated n-dimensional image class.
Definition itkImage.h:89
Control indentation during Print() invocation.
Definition itkIndent.h:53
FiniteDifferenceFunction< TDisplacementField > FiniteDifferenceFunctionType
typename DisplacementFieldType::Pointer DisplacementFieldPointer
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....