SimpleITK  
sitkDemonsRegistrationFilter.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 sitkDemonsRegistrationFilter_h
19#define sitkDemonsRegistrationFilter_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
59 public:
61
64
68
71\
72
76 SITK_RETURN_SELF_TYPE_HEADER SetStandardDeviations ( std::vector<double> StandardDeviations ) { this->m_StandardDeviations = std::move(StandardDeviations); return *this; }
77
79 SITK_RETURN_SELF_TYPE_HEADER SetStandardDeviations( double value ) { this->m_StandardDeviations = std::vector<double>(3, value); return *this; }
80
84 std::vector<double> GetStandardDeviations() const { return this->m_StandardDeviations; }\
85
88 SITK_RETURN_SELF_TYPE_HEADER SetNumberOfIterations ( uint32_t NumberOfIterations ) { this->m_NumberOfIterations = NumberOfIterations; return *this; }
89
92 uint32_t GetNumberOfIterations() const { return this->m_NumberOfIterations; }\
93
96 SITK_RETURN_SELF_TYPE_HEADER SetMaximumRMSError ( double MaximumRMSError ) { this->m_MaximumRMSError = MaximumRMSError; return *this; }
97
100 double GetMaximumRMSError() const { return this->m_MaximumRMSError; }\
101
105 SITK_RETURN_SELF_TYPE_HEADER SetUseMovingImageGradient ( bool UseMovingImageGradient ) { this->m_UseMovingImageGradient = UseMovingImageGradient; return *this; }
106
108 SITK_RETURN_SELF_TYPE_HEADER UseMovingImageGradientOn() { return this->SetUseMovingImageGradient(true); }
109 SITK_RETURN_SELF_TYPE_HEADER UseMovingImageGradientOff() { return this->SetUseMovingImageGradient(false); }
110
115
119 SITK_RETURN_SELF_TYPE_HEADER SetSmoothDisplacementField ( bool SmoothDisplacementField ) { this->m_SmoothDisplacementField = SmoothDisplacementField; return *this; }
120
122 SITK_RETURN_SELF_TYPE_HEADER SmoothDisplacementFieldOn() { return this->SetSmoothDisplacementField(true); }
123 SITK_RETURN_SELF_TYPE_HEADER SmoothDisplacementFieldOff() { return this->SetSmoothDisplacementField(false); }
124
129
133 SITK_RETURN_SELF_TYPE_HEADER SetSmoothUpdateField ( bool SmoothUpdateField ) { this->m_SmoothUpdateField = SmoothUpdateField; return *this; }
134
136 SITK_RETURN_SELF_TYPE_HEADER SmoothUpdateFieldOn() { return this->SetSmoothUpdateField(true); }
137 SITK_RETURN_SELF_TYPE_HEADER SmoothUpdateFieldOff() { return this->SetSmoothUpdateField(false); }
138
142 bool GetSmoothUpdateField() const { return this->m_SmoothUpdateField; }\
143
147 SITK_RETURN_SELF_TYPE_HEADER SetUpdateFieldStandardDeviations ( std::vector<double> UpdateFieldStandardDeviations ) { this->m_UpdateFieldStandardDeviations = std::move(UpdateFieldStandardDeviations); return *this; }
148
150 SITK_RETURN_SELF_TYPE_HEADER SetUpdateFieldStandardDeviations( double value ) { this->m_UpdateFieldStandardDeviations = std::vector<double>(3, value); return *this; }
151
155 std::vector<double> GetUpdateFieldStandardDeviations() const { return this->m_UpdateFieldStandardDeviations; }\
156
160 SITK_RETURN_SELF_TYPE_HEADER SetMaximumKernelWidth ( unsigned int MaximumKernelWidth ) { this->m_MaximumKernelWidth = MaximumKernelWidth; return *this; }
161
165 unsigned int GetMaximumKernelWidth() const { return this->m_MaximumKernelWidth; }\
166
170 SITK_RETURN_SELF_TYPE_HEADER SetMaximumError ( double MaximumError ) { this->m_MaximumError = MaximumError; return *this; }
171
175 double GetMaximumError() const { return this->m_MaximumError; }\
176
180 SITK_RETURN_SELF_TYPE_HEADER SetIntensityDifferenceThreshold ( double IntensityDifferenceThreshold ) { this->m_IntensityDifferenceThreshold = IntensityDifferenceThreshold; return *this; }
181
185
188 SITK_RETURN_SELF_TYPE_HEADER SetUseImageSpacing ( bool UseImageSpacing ) { this->m_UseImageSpacing = UseImageSpacing; return *this; }
189
191 SITK_RETURN_SELF_TYPE_HEADER UseImageSpacingOn() { return this->SetUseImageSpacing(true); }
192 SITK_RETURN_SELF_TYPE_HEADER UseImageSpacingOff() { return this->SetUseImageSpacing(false); }
193
196 bool GetUseImageSpacing() const { return this->m_UseImageSpacing; }
204 uint32_t GetElapsedIterations() const { return this->m_pfGetElapsedIterations(); };
205
212 double GetRMSChange() const { return this->m_RMSChange; };
213
221 double GetMetric() const { return this->m_pfGetMetric(); };
222
230 void StopRegistration() { return this->m_pfGetStopRegistration(); };
231
232
234 std::string GetName() const { return std::string ("DemonsRegistrationFilter"); }
235
237 std::string ToString() const;
238
239
241
242 Image Execute ( const Image & fixedImage, const Image & movingImage, const Image & initialDisplacementField );
243 Image Execute ( const Image & fixedImage, const Image & movingImage );
244
245 private:
246
248
249 using MemberFunctionType = Image (Self::*)( const Image * fixedImage, const Image * movingImage, const Image * initialDisplacementField );
250 template <class TImageType> Image ExecuteInternal ( const Image * fixedImage, const Image * movingImage, const Image * initialDisplacementField );
251
252
254
255 std::unique_ptr<detail::MemberFunctionFactory<MemberFunctionType> > m_MemberFactory;
256
257
258 std::vector<double> m_StandardDeviations{std::vector<double>(3, 1.0)};
259
260 /* Number of iterations to run */
261 uint32_t m_NumberOfIterations{10u};
262
263 /* Value of RMS change below which the filter should stop. This is a convergence criterion. */
264 double m_MaximumRMSError{0.02};
265
267
269
271
272 std::vector<double> m_UpdateFieldStandardDeviations{std::vector<double>(3, 1.0)};
273
274 unsigned int m_MaximumKernelWidth{30u};
275
276 double m_MaximumError{0.1};
277
279
281
282
283 std::function<uint32_t()> m_pfGetElapsedIterations;
284
285 double m_RMSChange{0.0};
286
287 std::function<double()> m_pfGetMetric;
288
289 std::function<void()> m_pfGetStopRegistration;
290
291 // Holder of process object for active measurements
293
294 };
295
296
297}
298#endif
Image Execute(const Image &fixedImage, const Image &movingImage)
std::vector< double > GetUpdateFieldStandardDeviations() const
Self & SetStandardDeviations(std::vector< double > StandardDeviations)
Image(Self::*)(const Image *fixedImage, const Image *movingImage, const Image *initialDisplacementField) MemberFunctionType
Self & SetMaximumRMSError(double MaximumRMSError)
Self & SetMaximumKernelWidth(unsigned int MaximumKernelWidth)
Self & SetSmoothDisplacementField(bool SmoothDisplacementField)
double GetRMSChange() const
The Root Mean Square of the levelset upon termination.
uint32_t GetElapsedIterations() const
Number of iterations run.
std::unique_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
std::vector< double > GetStandardDeviations() const
Self & SetUpdateFieldStandardDeviations(std::vector< double > UpdateFieldStandardDeviations)
Self & SetSmoothUpdateField(bool SmoothUpdateField)
Image ExecuteInternal(const Image *fixedImage, const Image *movingImage, const Image *initialDisplacementField)
Self & SetUseMovingImageGradient(bool UseMovingImageGradient)
Self & SetIntensityDifferenceThreshold(double IntensityDifferenceThreshold)
Self & SetNumberOfIterations(uint32_t NumberOfIterations)
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