SimpleITK  
sitkSymmetricForcesDemonsRegistrationFilter.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 sitkSymmetricForcesDemonsRegistrationFilter_h
19#define sitkSymmetricForcesDemonsRegistrationFilter_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
77public:
79
82
86
89
90
91
92
97 void
98 SetStandardDeviations(std::vector<double> StandardDeviations )
99 { this->m_StandardDeviations = std::move(StandardDeviations); }
100
102 void
103 SetStandardDeviations( double value ) { this->m_StandardDeviations = std::vector<double>(3, value); }
108 std::vector<double>
110
111
114 void
115 SetNumberOfIterations(uint32_t NumberOfIterations )
116 { this->m_NumberOfIterations = NumberOfIterations; }
117
119 uint32_t
121
122
125 void
126 SetMaximumRMSError(double MaximumRMSError )
127 { this->m_MaximumRMSError = MaximumRMSError; }
128
130 double
131 GetMaximumRMSError() const { return this->m_MaximumRMSError; }
132
133
139 void
140 SetSmoothDisplacementField(bool SmoothDisplacementField )
141 { this->m_SmoothDisplacementField = SmoothDisplacementField; }
142
144 void
146 void
153 bool
155
156
162 void
163 SetSmoothUpdateField(bool SmoothUpdateField )
164 { this->m_SmoothUpdateField = SmoothUpdateField; }
165
167 void
169 void
176 bool
178
179
184 void
185 SetUpdateFieldStandardDeviations(std::vector<double> UpdateFieldStandardDeviations )
186 { this->m_UpdateFieldStandardDeviations = std::move(UpdateFieldStandardDeviations); }
187
189 void
190 SetUpdateFieldStandardDeviations( double value ) { this->m_UpdateFieldStandardDeviations = std::vector<double>(3, value); }
195 std::vector<double>
197
198
202 void
203 SetMaximumKernelWidth(unsigned int MaximumKernelWidth )
204 { this->m_MaximumKernelWidth = MaximumKernelWidth; }
205
208 unsigned int
210
211
215 void
216 SetMaximumError(double MaximumError )
217 { this->m_MaximumError = MaximumError; }
218
221 double
222 GetMaximumError() const { return this->m_MaximumError; }
223
224
230 void
231 SetIntensityDifferenceThreshold(double IntensityDifferenceThreshold )
232 { this->m_IntensityDifferenceThreshold = IntensityDifferenceThreshold; }
233
235 double
237
238
241 void
242 SetUseImageSpacing(bool UseImageSpacing )
243 { this->m_UseImageSpacing = UseImageSpacing; }
244
246 void
247 UseImageSpacingOn() { return this->SetUseImageSpacing(true); }
248 void
249 UseImageSpacingOff() { return this->SetUseImageSpacing(false); }
252 bool
253 GetUseImageSpacing() const { return this->m_UseImageSpacing; }
254
255
262 uint32_t GetElapsedIterations()const { return this->m_pfGetElapsedIterations(); }
263
270 double GetRMSChange() const { return this->m_RMSChange; }
271
279 double GetMetric()const { return this->m_pfGetMetric(); }
280
287 void StopRegistration() { return this->m_pfGetStopRegistration(); }
288
290 std::string GetName() const { return std::string("SymmetricForcesDemonsRegistrationFilter"); }
291
293 std::string ToString() const;
294
295
297 Image Execute(const Image &fixedImage, const Image &movingImage, const Image &initialDisplacementField);
298 Image Execute(const Image &fixedImage, const Image &movingImage);
299
300
301private:
303 using MemberFunctionType = Image (Self::*)(const Image *
304 fixedImage, const Image *
305 movingImage, const Image *
306 initialDisplacementField);
307 template <class TImageType> Image ExecuteInternal(const Image *
308 fixedImage, const Image *
309 movingImage, const Image *
310 initialDisplacementField);
313
314
315 std::vector<double> m_StandardDeviations{ std::vector<double>(3, 1.0) };
316
317 /* Number of iterations to run */
318 uint32_t m_NumberOfIterations{ 10u };
319
320 /* Value of RMS change below which the filter should stop. This is a convergence criterion. */
321 double m_MaximumRMSError{ 0.02 };
322
324
325 bool m_SmoothUpdateField{ false };
326
327 std::vector<double> m_UpdateFieldStandardDeviations{ std::vector<double>(3, 1.0) };
328
329 unsigned int m_MaximumKernelWidth{ 30u };
330
331 double m_MaximumError{ 0.1 };
332
334
335 bool m_UseImageSpacing{ true };
336
337
338
339 std::function<uint32_t()> m_pfGetElapsedIterations;
340 double m_RMSChange{ 0.0 };
341 std::function<double()> m_pfGetMetric;
342 std::function<void()> m_pfGetStopRegistration;
343
344
345 // Holder of process object for active measurements
346 std::unique_ptr<itk::ProcessObject, ProcessObjectDeleter> m_Filter{nullptr};
347
348
349
350};
351
352
353}
354#endif
The Image class for SimpleITK.
Definition sitkImage.h:77
std::unique_ptr< itk::ProcessObject, ProcessObjectDeleter > m_Filter
static const detail::MemberFunctionFactory< MemberFunctionType > & GetMemberFunctionFactory()
Image Execute(const Image &fixedImage, const Image &movingImage, const Image &initialDisplacementField)
void SetUpdateFieldStandardDeviations(std::vector< double > UpdateFieldStandardDeviations)
void StopRegistration()
Stop the registration after the current iteration.
Image Execute(const Image &fixedImage, const Image &movingImage)
Image(Self::*)(const Image * fixedImage, const Image * movingImage, const Image * initialDisplacementField) MemberFunctionType
Image ExecuteInternal(const Image *fixedImage, const Image *movingImage, const Image *initialDisplacementField)
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