ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkVariationalRegistrationElasticRegularizer.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 itkVariationalRegistrationElasticRegularizer_h
19#define itkVariationalRegistrationElasticRegularizer_h
20
23
24#include <complex>
25
26#if defined(ITK_USE_FFTWD) || defined(ITK_USE_FFTWF)
27# include "itkFFTWCommon.h"
28#else
29# include "itk_pocketfft.h"
30#endif
31
32namespace itk
33{
34
61template <typename TDisplacementField>
63{
64public:
65 ITK_DISALLOW_COPY_AND_MOVE(VariationalRegistrationElasticRegularizer);
66
72
74 itkNewMacro(Self);
75
77 itkOverrideGetNameOfClassMacro(VariationalRegistrationElasticRegularizer);
78
80 static constexpr unsigned int ImageDimension = TDisplacementField::ImageDimension;
81
88 typedef typename DisplacementFieldType::SizeType::SizeValueType OffsetValueType;
89
90#if defined(ITK_USE_FFTWD) || defined(ITK_USE_FFTWF)
91# if defined(ITK_USE_FFTWD)
92 using RealTypeFFT = double;
93# else
94 using RealTypeFFT = float;
95# endif
97#else
98 using RealTypeFFT = double;
99#endif
100 using FFTComplexType = std::complex<RealTypeFFT>;
101
104
106 itkGetConstMacro(Lambda, ValueType);
107
110
112 itkGetConstMacro(Mu, ValueType);
113
114protected:
117
119 void
120 PrintSelf(std::ostream & os, Indent indent) const override;
121
124 void
125 GenerateData() override;
126
129 void
130 Initialize() override;
131
133 virtual bool
135
137 virtual bool
139
141 virtual void
143
145 virtual void
147
149 virtual void
151
153 virtual void
155
157 typename DisplacementFieldType::IndexType
159
160 bool
162
163 void
165
166 void
167 ExecuteForwardFFT(unsigned int component);
168
169 void
170 ExecuteBackwardFFT(unsigned int component);
171
172private:
175
178
180 typename DisplacementFieldType::SpacingType m_Spacing;
181
183 typename DisplacementFieldType::SizeType m_Size;
184
187
189 typename DisplacementFieldType::SizeType m_ComplexSize;
190
193
195
199
201#if defined(ITK_USE_FFTWD) || defined(ITK_USE_FFTWF)
202 typename FFTWProxyType::PlanType m_PlanForward[ImageDimension]{};
203 typename FFTWProxyType::PlanType m_PlanBackward[ImageDimension]{};
204#endif
208
214
217};
218
219} // namespace itk
220
221#ifndef ITK_MANUAL_INSTANTIATION
222# include "itkVariationalRegistrationElasticRegularizer.hxx"
223#endif
224
225#endif
Control indentation during Print() invocation.
Definition itkIndent.h:53
Implements transparent reference counting.
typename Superclass::DisplacementFieldPointer DisplacementFieldPointer
VariationalRegistrationRegularizer< TDisplacementField > Superclass
static ITK_THREAD_RETURN_TYPE SolveElasticLESThreaderCallback(void *vargs)
DisplacementFieldType::IndexType CalculateComplexImageIndex(OffsetValueType offset)
virtual void ThreadedSolveElasticLES(OffsetValueType from, OffsetValueType to)
typename Superclass::DisplacementFieldConstPointer DisplacementFieldConstPointer
void ExecuteForwardFFT(unsigned int component)
void PrintSelf(std::ostream &os, Indent indent) const override
void ExecuteBackwardFFT(unsigned int component)
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)