ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkVariationalRegistrationCurvatureRegularizer.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 itkVariationalRegistrationCurvatureRegularizer_h
19#define itkVariationalRegistrationCurvatureRegularizer_h
20
23
24#if (defined(ITK_USE_FFTWD) || defined(ITK_USE_FFTWF)) && !defined(ITK_USE_CUFFTW) && !defined(ITK_USE_MKL)
25# include "itkFFTWCommon.h"
26#else
27# include "itk_pocketfft.h"
28#endif
29
30namespace itk
31{
32
63template <typename TDisplacementField>
65{
66public:
67 ITK_DISALLOW_COPY_AND_MOVE(VariationalRegistrationCurvatureRegularizer);
68
74
76 itkNewMacro(Self);
77
79 itkOverrideGetNameOfClassMacro(VariationalRegistrationCurvatureRegularizer);
80
82 static constexpr unsigned int ImageDimension = TDisplacementField::ImageDimension;
83
90 typedef typename DisplacementFieldType::SizeType::SizeValueType OffsetValueType;
91
92#if (defined(ITK_USE_FFTWD) || defined(ITK_USE_FFTWF)) && !defined(ITK_USE_CUFFTW) && !defined(ITK_USE_MKL)
93# if defined(ITK_USE_FFTWD)
94 using RealTypeFFT = double;
95# else
96 using RealTypeFFT = float;
97# endif
99#else
100 using RealTypeFFT = double;
101#endif
102
105
107 itkGetConstMacro(Alpha, ValueType);
108
109protected:
112
114 void
115 PrintSelf(std::ostream & os, Indent indent) const override;
116
119 void
120 GenerateData() override;
121
124 void
125 Initialize() override;
126
128 virtual bool
130
132 virtual bool
134
136 virtual void
138
140 virtual void
141 SolveCurvatureLES(unsigned int currentDimension);
142
144 virtual void
145 ThreadedSolveCurvatureLES(unsigned int currentDimension, OffsetValueType from, OffsetValueType to);
146
148 typename DisplacementFieldType::IndexType
150
151 bool
153
154 void
156
157 void
159
160 void
162
163private:
166
168 typename DisplacementFieldType::SpacingType m_Spacing;
169
171 typename DisplacementFieldType::SizeType m_Size;
172
175
178
181
183#if (defined(ITK_USE_FFTWD) || defined(ITK_USE_FFTWF)) && !defined(ITK_USE_CUFFTW) && !defined(ITK_USE_MKL)
184 typename FFTWProxyType::PlanType m_PlanForward{ nullptr };
185 typename FFTWProxyType::PlanType m_PlanBackward{ nullptr };
186#else
187 void
188 PocketDCT(int type, const RealTypeFFT * in, RealTypeFFT * out) const;
189#endif
192
199
202};
203
204} // namespace itk
205
206#ifndef ITK_MANUAL_INSTANTIATION
207# include "itkVariationalRegistrationCurvatureRegularizer.hxx"
208#endif
209
210#endif
Control indentation during Print() invocation.
Definition itkIndent.h:53
Implements transparent reference counting.
DisplacementFieldType::IndexType CalculateImageIndex(OffsetValueType offset)
VariationalRegistrationRegularizer< TDisplacementField > Superclass
void PrintSelf(std::ostream &os, Indent indent) const override
static ITK_THREAD_RETURN_TYPE SolveCurvatureLESThreaderCallback(void *vargs)
typename Superclass::DisplacementFieldConstPointer DisplacementFieldConstPointer
virtual void ThreadedSolveCurvatureLES(unsigned int currentDimension, OffsetValueType from, OffsetValueType to)
virtual void SolveCurvatureLES(unsigned int currentDimension)
typename DisplacementFieldType::ConstPointer DisplacementFieldConstPointer
typename DisplacementFieldType::PixelType PixelType
typename NumericTraits< PixelType >::ValueType ValueType
typename DisplacementFieldType::Pointer DisplacementFieldPointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
void ITK_THREAD_RETURN_TYPE
#define itkSetMacro(name, type)