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.
26#if !defined(ITK_USE_CUFFTW) && defined(ITK_USE_FFTWD)
27# include "fftw3.h"
28
29namespace itk
30{
96template <typename TFixedImage,
97 typename TMovingImage,
98 typename TDisplacementField,
100class ITK_TEMPLATE_EXPORT CurvatureRegistrationFilter
101 : public PDEDeformableRegistrationFilter<TFixedImage, TMovingImage, TDisplacementField>
102{
103public:
104 ITK_DISALLOW_COPY_AND_MOVE(CurvatureRegistrationFilter);
105
111
113 itkNewMacro(Self);
114
116 itkOverrideGetNameOfClassMacro(CurvatureRegistrationFilter);
117
119 using typename Superclass::TimeStepType;
120
122 using typename Superclass::FixedImageType;
123 using typename Superclass::FixedImagePointer;
124 static constexpr unsigned int ImageDimension = FixedImageType::ImageDimension;
125
127 using typename Superclass::MovingImageType;
128 using typename Superclass::MovingImagePointer;
129
133
134 using DisplacementFieldPixelType = typename TDisplacementField::PixelType;
135 using DisplacementFieldComponentType = typename DisplacementFieldPixelType::ValueType;
136 static constexpr unsigned int DeformationVectorDimension = DisplacementFieldPixelType::Dimension;
137
138 using RealTypeDFT = double;
139
142
145
147 using RegistrationFunctionType = TImageForceFunction;
148
150 void
151 SetConstraintWeight(const float w)
152 {
154 }
155
157 void
159 {
160 m_TimeStep = ts;
161 }
162
168 virtual double
169 GetMetric() const;
170
171protected:
174 void
175 PrintSelf(std::ostream & os, Indent indent) const override;
176
178 void
179 Initialize() override;
180
182 void
183 ApplyUpdate(const TimeStepType & dt) override;
184
185private:
187
190
192
193 fftw_plan m_PlanForwardDCT{};
194 fftw_plan m_PlanBackwardDCT{};
195
197
199};
200} // end namespace itk
201
202# ifndef ITK_MANUAL_INSTANTIATION
203# include "itkCurvatureRegistrationFilter.hxx"
204# endif
205
206#endif // !defined(ITK_USE_CUFFTW) && defined(ITK_USE_FFTWD)
207
208#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:51
FiniteDifferenceFunction< TDisplacementField > FiniteDifferenceFunctionType
typename DisplacementFieldType::Pointer DisplacementFieldPointer
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....