SimpleITK  
sitkLevelSetMotionRegistrationFilter.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* http://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 sitkLevelSetMotionRegistrationFilter_h
19#define sitkLevelSetMotionRegistrationFilter_h
20
21/*
22 * WARNING: DO NOT EDIT THIS FILE!
23 * THIS FILE IS AUTOMATICALLY GENERATED BY THE SIMPLEITK BUILD PROCESS.
24 * Please look at sitkImageFilterTemplate.h.jinja to make changes.
25 */
26
27#include <memory>
28
29#include "sitkBasicFilters.h"
30#include "sitkImageFilter.h"
32
33namespace itk::simple {
34
86public:
88
91
95
98
99
100
101
111 void
112 SetGradientSmoothingStandardDeviations(double GradientSmoothingStandardDeviations )
113 { this->m_GradientSmoothingStandardDeviations = GradientSmoothingStandardDeviations; }
114
116 double
118
119
122 void
123 SetNumberOfIterations(uint32_t NumberOfIterations )
124 { this->m_NumberOfIterations = NumberOfIterations; }
125
127 uint32_t
129
130
133 void
134 SetMaximumRMSError(double MaximumRMSError )
135 { this->m_MaximumRMSError = MaximumRMSError; }
136
138 double
139 GetMaximumRMSError() const { return this->m_MaximumRMSError; }
140
141
146 void
147 SetStandardDeviations(std::vector<double> StandardDeviations )
148 { this->m_StandardDeviations = std::move(StandardDeviations); }
149
151 void
152 SetStandardDeviations( double value ) { this->m_StandardDeviations = std::vector<double>(3, value); }
157 std::vector<double>
159
160
166 void
167 SetSmoothDisplacementField(bool SmoothDisplacementField )
168 { this->m_SmoothDisplacementField = SmoothDisplacementField; }
169
171 void
173 void
180 bool
182
183
188 void
189 SetUpdateFieldStandardDeviations(std::vector<double> UpdateFieldStandardDeviations )
190 { this->m_UpdateFieldStandardDeviations = std::move(UpdateFieldStandardDeviations); }
191
193 void
194 SetUpdateFieldStandardDeviations( double value ) { this->m_UpdateFieldStandardDeviations = std::vector<double>(3, value); }
199 std::vector<double>
201
202
208 void
209 SetSmoothUpdateField(bool SmoothUpdateField )
210 { this->m_SmoothUpdateField = SmoothUpdateField; }
211
213 void
215 void
222 bool
224
225
229 void
230 SetMaximumKernelWidth(unsigned int MaximumKernelWidth )
231 { this->m_MaximumKernelWidth = MaximumKernelWidth; }
232
235 unsigned int
237
238
242 void
243 SetMaximumError(double MaximumError )
244 { this->m_MaximumError = MaximumError; }
245
248 double
249 GetMaximumError() const { return this->m_MaximumError; }
250
251
257 void
258 SetAlpha(double Alpha )
259 { this->m_Alpha = Alpha; }
260
262 double
263 GetAlpha() const { return this->m_Alpha; }
264
265
271 void
272 SetIntensityDifferenceThreshold(double IntensityDifferenceThreshold )
273 { this->m_IntensityDifferenceThreshold = IntensityDifferenceThreshold; }
274
276 double
278
279
283 void
284 SetGradientMagnitudeThreshold(double GradientMagnitudeThreshold )
285 { this->m_GradientMagnitudeThreshold = GradientMagnitudeThreshold; }
286
288 double
290
291
294 void
295 SetUseImageSpacing(bool UseImageSpacing )
296 { this->m_UseImageSpacing = UseImageSpacing; }
297
299 void
300 UseImageSpacingOn() { return this->SetUseImageSpacing(true); }
301 void
302 UseImageSpacingOff() { return this->SetUseImageSpacing(false); }
305 bool
306 GetUseImageSpacing() const { return this->m_UseImageSpacing; }
307
308
314 uint32_t GetElapsedIterations() const { return this->m_ElapsedIterations; }
315
321 double GetRMSChange() const { return this->m_RMSChange; }
322
329 double GetMetric() const { return this->m_Metric; }
330
332 std::string GetName() const { return std::string("LevelSetMotionRegistrationFilter"); }
333
335 std::string ToString() const;
336
337
339 Image Execute(const Image &fixedImage, const Image &movingImage, const Image &initialDisplacementField);
340 Image Execute(const Image &fixedImage, const Image &movingImage);
341
342
343private:
345 using MemberFunctionType = Image (Self::*)(const Image *
346 fixedImage, const Image *
347 movingImage, const Image *
348 initialDisplacementField);
349 template <class TImageType> Image ExecuteInternal(const Image *
350 fixedImage, const Image *
351 movingImage, const Image *
352 initialDisplacementField);
355
356
358
359 /* Number of iterations to run */
360 uint32_t m_NumberOfIterations{ 10u };
361
362 /* Value of RMS change below which the filter should stop. This is a convergence criterion. */
363 double m_MaximumRMSError{ 0.02 };
364
365 std::vector<double> m_StandardDeviations{ std::vector<double>(3, 1.0) };
366
368
369 std::vector<double> m_UpdateFieldStandardDeviations{ std::vector<double>(3, 1.0) };
370
371 bool m_SmoothUpdateField{ false };
372
373 unsigned int m_MaximumKernelWidth{ 30u };
374
375 double m_MaximumError{ 0.1 };
376
377 double m_Alpha{ 0.1 };
378
380
382
383 bool m_UseImageSpacing{ true };
384
385
386
387 uint32_t m_ElapsedIterations{ 0 };
388 double m_RMSChange{ 0.0 };
389 double m_Metric{ 0.0 };
390
391
392
393
394};
395
396
397}
398#endif
The Image class for SimpleITK.
Definition sitkImage.h:77
void SetIntensityDifferenceThreshold(double IntensityDifferenceThreshold)
Image Execute(const Image &fixedImage, const Image &movingImage, const Image &initialDisplacementField)
void SetGradientSmoothingStandardDeviations(double GradientSmoothingStandardDeviations)
void SetStandardDeviations(std::vector< double > StandardDeviations)
Image ExecuteInternal(const Image *fixedImage, const Image *movingImage, const Image *initialDisplacementField)
Image Execute(const Image &fixedImage, const Image &movingImage)
uint32_t GetElapsedIterations() const
Number of iterations run.
void SetGradientMagnitudeThreshold(double GradientMagnitudeThreshold)
void SetUpdateFieldStandardDeviations(std::vector< double > UpdateFieldStandardDeviations)
double GetRMSChange() const
The Root Mean Square of the levelset upon termination.
static const detail::MemberFunctionFactory< MemberFunctionType > & GetMemberFunctionFactory()
Image(Self::*)(const Image * fixedImage, const Image * movingImage, const Image * initialDisplacementField) MemberFunctionType
A class used to instantiate and generate function object to templated member functions.
typelist2::typelist< BasicPixelID< int8_t >, BasicPixelID< uint8_t >, BasicPixelID< int16_t >, BasicPixelID< uint16_t >, BasicPixelID< int32_t >, BasicPixelID< uint32_t >, BasicPixelID< float >, BasicPixelID< double > > BasicPixelIDTypeList
#define SITKBasicFilters_EXPORT