SimpleITK  
sitkDiffeomorphicDemonsRegistrationFilter.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 sitkDiffeomorphicDemonsRegistrationFilter_h
19#define sitkDiffeomorphicDemonsRegistrationFilter_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.in to make changes.
25 */
26
27#include <memory>
28
29#include "sitkBasicFilters.h"
30#include "sitkImageFilter.h"
31
32namespace itk::simple {
33
69 public:
71
74
78
81\
82
86 SITK_RETURN_SELF_TYPE_HEADER SetStandardDeviations ( std::vector<double> StandardDeviations ) { this->m_StandardDeviations = std::move(StandardDeviations); return *this; }
87
89 SITK_RETURN_SELF_TYPE_HEADER SetStandardDeviations( double value ) { this->m_StandardDeviations = std::vector<double>(3, value); return *this; }
90
94 std::vector<double> GetStandardDeviations() const { return this->m_StandardDeviations; }\
95
98 SITK_RETURN_SELF_TYPE_HEADER SetNumberOfIterations ( uint32_t NumberOfIterations ) { this->m_NumberOfIterations = NumberOfIterations; return *this; }
99
102 uint32_t GetNumberOfIterations() const { return this->m_NumberOfIterations; }\
103
106 SITK_RETURN_SELF_TYPE_HEADER SetMaximumRMSError ( double MaximumRMSError ) { this->m_MaximumRMSError = MaximumRMSError; return *this; }
107
110 double GetMaximumRMSError() const { return this->m_MaximumRMSError; }
111
112 typedef enum {Symmetric,Fixed,WarpedMoving,MappedMoving} UseGradientTypeType;\
113
116 SITK_RETURN_SELF_TYPE_HEADER SetUseGradientType ( UseGradientTypeType UseGradientType ) { this->m_UseGradientType = UseGradientType; return *this; }
117
121
125 SITK_RETURN_SELF_TYPE_HEADER SetUseFirstOrderExp ( bool UseFirstOrderExp ) { this->m_UseFirstOrderExp = UseFirstOrderExp; return *this; }
126
128 SITK_RETURN_SELF_TYPE_HEADER UseFirstOrderExpOn() { return this->SetUseFirstOrderExp(true); }
129 SITK_RETURN_SELF_TYPE_HEADER UseFirstOrderExpOff() { return this->SetUseFirstOrderExp(false); }
130
134 bool GetUseFirstOrderExp() const { return this->m_UseFirstOrderExp; }\
135
139 SITK_RETURN_SELF_TYPE_HEADER SetMaximumUpdateStepLength ( double MaximumUpdateStepLength ) { this->m_MaximumUpdateStepLength = MaximumUpdateStepLength; return *this; }
140
144
148 SITK_RETURN_SELF_TYPE_HEADER SetSmoothDisplacementField ( bool SmoothDisplacementField ) { this->m_SmoothDisplacementField = SmoothDisplacementField; return *this; }
149
151 SITK_RETURN_SELF_TYPE_HEADER SmoothDisplacementFieldOn() { return this->SetSmoothDisplacementField(true); }
152 SITK_RETURN_SELF_TYPE_HEADER SmoothDisplacementFieldOff() { return this->SetSmoothDisplacementField(false); }
153
158
162 SITK_RETURN_SELF_TYPE_HEADER SetSmoothUpdateField ( bool SmoothUpdateField ) { this->m_SmoothUpdateField = SmoothUpdateField; return *this; }
163
165 SITK_RETURN_SELF_TYPE_HEADER SmoothUpdateFieldOn() { return this->SetSmoothUpdateField(true); }
166 SITK_RETURN_SELF_TYPE_HEADER SmoothUpdateFieldOff() { return this->SetSmoothUpdateField(false); }
167
171 bool GetSmoothUpdateField() const { return this->m_SmoothUpdateField; }\
172
176 SITK_RETURN_SELF_TYPE_HEADER SetUpdateFieldStandardDeviations ( std::vector<double> UpdateFieldStandardDeviations ) { this->m_UpdateFieldStandardDeviations = std::move(UpdateFieldStandardDeviations); return *this; }
177
179 SITK_RETURN_SELF_TYPE_HEADER SetUpdateFieldStandardDeviations( double value ) { this->m_UpdateFieldStandardDeviations = std::vector<double>(3, value); return *this; }
180
184 std::vector<double> GetUpdateFieldStandardDeviations() const { return this->m_UpdateFieldStandardDeviations; }\
185
189 SITK_RETURN_SELF_TYPE_HEADER SetMaximumKernelWidth ( unsigned int MaximumKernelWidth ) { this->m_MaximumKernelWidth = MaximumKernelWidth; return *this; }
190
194 unsigned int GetMaximumKernelWidth() const { return this->m_MaximumKernelWidth; }\
195
199 SITK_RETURN_SELF_TYPE_HEADER SetMaximumError ( double MaximumError ) { this->m_MaximumError = MaximumError; return *this; }
200
204 double GetMaximumError() const { return this->m_MaximumError; }\
205
209 SITK_RETURN_SELF_TYPE_HEADER SetIntensityDifferenceThreshold ( double IntensityDifferenceThreshold ) { this->m_IntensityDifferenceThreshold = IntensityDifferenceThreshold; return *this; }
210
214
217 SITK_RETURN_SELF_TYPE_HEADER SetUseImageSpacing ( bool UseImageSpacing ) { this->m_UseImageSpacing = UseImageSpacing; return *this; }
218
220 SITK_RETURN_SELF_TYPE_HEADER UseImageSpacingOn() { return this->SetUseImageSpacing(true); }
221 SITK_RETURN_SELF_TYPE_HEADER UseImageSpacingOff() { return this->SetUseImageSpacing(false); }
222
225 bool GetUseImageSpacing() const { return this->m_UseImageSpacing; }
233 uint32_t GetElapsedIterations() const { return this->m_pfGetElapsedIterations(); };
234
241 double GetRMSChange() const { return this->m_RMSChange; };
242
250 double GetMetric() const { return this->m_pfGetMetric(); };
251
259 void StopRegistration() { return this->m_pfGetStopRegistration(); };
260
261
263 std::string GetName() const { return std::string ("DiffeomorphicDemonsRegistrationFilter"); }
264
266 std::string ToString() const;
267
268
270
271 Image Execute ( const Image & fixedImage, const Image & movingImage, const Image & initialDisplacementField );
272 Image Execute ( const Image & fixedImage, const Image & movingImage );
273
274 private:
275
277
278 using MemberFunctionType = Image (Self::*)( const Image * fixedImage, const Image * movingImage, const Image * initialDisplacementField );
279 template <class TImageType> Image ExecuteInternal ( const Image * fixedImage, const Image * movingImage, const Image * initialDisplacementField );
280
281
283
284 std::unique_ptr<detail::MemberFunctionFactory<MemberFunctionType> > m_MemberFactory;
285
286
287 std::vector<double> m_StandardDeviations{std::vector<double>(3, 1.0)};
288
289 /* Number of iterations to run */
290 uint32_t m_NumberOfIterations{10u};
291
292 /* Value of RMS change below which the filter should stop. This is a convergence criterion. */
293 double m_MaximumRMSError{0.02};
294
296
298
300
302
304
305 std::vector<double> m_UpdateFieldStandardDeviations{std::vector<double>(3, 1.0)};
306
307 unsigned int m_MaximumKernelWidth{30u};
308
309 double m_MaximumError{0.1};
310
312
314
315
316 std::function<uint32_t()> m_pfGetElapsedIterations;
317
318 double m_RMSChange{0.0};
319
320 std::function<double()> m_pfGetMetric;
321
322 std::function<void()> m_pfGetStopRegistration;
323
324 // Holder of process object for active measurements
326
327 };
328
329
330}
331#endif
Image(Self::*)(const Image *fixedImage, const Image *movingImage, const Image *initialDisplacementField) MemberFunctionType
std::unique_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
Image Execute(const Image &fixedImage, const Image &movingImage)
Image ExecuteInternal(const Image *fixedImage, const Image *movingImage, const Image *initialDisplacementField)
Self & SetStandardDeviations(std::vector< double > StandardDeviations)
Self & SetUpdateFieldStandardDeviations(std::vector< double > UpdateFieldStandardDeviations)
Image Execute(const Image &fixedImage, const Image &movingImage, const Image &initialDisplacementField)
The Image class for SimpleITK.
Definition sitkImage.h:77
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