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#if !defined(ITK_USE_CUFFTW) && (defined(ITK_USE_FFTWF) || defined(ITK_USE_FFTWD))
25# include "fftw3.h"
26
27namespace itk
28{
94template <typename TFixedImage,
95 typename TMovingImage,
96 typename TDisplacementField,
98class ITK_TEMPLATE_EXPORT CurvatureRegistrationFilter
99 : public PDEDeformableRegistrationFilter<TFixedImage, TMovingImage, TDisplacementField>
100{
101public:
102 ITK_DISALLOW_COPY_AND_MOVE(CurvatureRegistrationFilter);
103
109
111 itkNewMacro(Self);
112
114 itkOverrideGetNameOfClassMacro(CurvatureRegistrationFilter);
115
117 using typename Superclass::TimeStepType;
118
120 using typename Superclass::FixedImageType;
121 using typename Superclass::FixedImagePointer;
122 static constexpr unsigned int ImageDimension = FixedImageType::ImageDimension;
123
125 using typename Superclass::MovingImageType;
126 using typename Superclass::MovingImagePointer;
127
131
132 using DisplacementFieldPixelType = typename TDisplacementField::PixelType;
133 using DisplacementFieldComponentType = typename DisplacementFieldPixelType::ValueType;
134 static constexpr unsigned int DeformationVectorDimension = DisplacementFieldPixelType::Dimension;
135
136# if defined(ITK_USE_FFTWD)
137 // Prefer to use double precision
138 using RealTypeDFT = double;
139# else
140# if defined(ITK_USE_FFTWF)
141 // Allow to use single precision
142# warning "Using single precision for FFT computations!"
143 using RealTypeDFT = double;
144# endif
145# endif
146
149
152
154 using RegistrationFunctionType = TImageForceFunction;
155
157 void
158 SetConstraintWeight(const float w)
159 {
161 }
162
164 void
166 {
167 m_TimeStep = ts;
168 }
169
175 virtual double
176 GetMetric() const;
177
178protected:
181 void
182 PrintSelf(std::ostream & os, Indent indent) const override;
183
185 void
186 Initialize() override;
187
189 void
190 ApplyUpdate(const TimeStepType & dt) override;
191
192private:
194
197
199
200 fftw_plan m_PlanForwardDCT{};
201 fftw_plan m_PlanBackwardDCT{};
202
204
206};
207} // end namespace itk
208
209# ifndef ITK_MANUAL_INSTANTIATION
210# include "itkCurvatureRegistrationFilter.hxx"
211# endif
212
213#endif // defined(ITK_USE_FFTWF) || defined(ITK_USE_FFTWD)
214
215#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:50
FiniteDifferenceFunction< TDisplacementField > FiniteDifferenceFunctionType
typename DisplacementFieldType::Pointer DisplacementFieldPointer
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....