SimpleITK  
sitkFastSymmetricForcesDemonsRegistrationFilter.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 sitkFastSymmetricForcesDemonsRegistrationFilter_h
19#define sitkFastSymmetricForcesDemonsRegistrationFilter_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
76public:
78
81
85
88
89
90
91
96 void
97 SetStandardDeviations(std::vector<double> StandardDeviations )
98 { this->m_StandardDeviations = std::move(StandardDeviations); }
99
101 void
102 SetStandardDeviations( double value ) { this->m_StandardDeviations = std::vector<double>(3, value); }
107 std::vector<double>
109
110
113 void
114 SetNumberOfIterations(uint32_t NumberOfIterations )
115 { this->m_NumberOfIterations = NumberOfIterations; }
116
118 uint32_t
120
121
124 void
125 SetMaximumRMSError(double MaximumRMSError )
126 { this->m_MaximumRMSError = MaximumRMSError; }
127
129 double
130 GetMaximumRMSError() const { return this->m_MaximumRMSError; }
131
132 typedef enum { Symmetric, Fixed, WarpedMoving, MappedMoving } UseGradientTypeType;
133
136 void
138 { this->m_UseGradientType = UseGradientType; }
139
141 UseGradientTypeType
142 GetUseGradientType() const { return this->m_UseGradientType; }
143
144
148 void
149 SetMaximumUpdateStepLength(double MaximumUpdateStepLength )
150 { this->m_MaximumUpdateStepLength = MaximumUpdateStepLength; }
151
153 double
155
156
162 void
163 SetSmoothDisplacementField(bool SmoothDisplacementField )
164 { this->m_SmoothDisplacementField = SmoothDisplacementField; }
165
167 void
169 void
176 bool
178
179
185 void
186 SetSmoothUpdateField(bool SmoothUpdateField )
187 { this->m_SmoothUpdateField = SmoothUpdateField; }
188
190 void
192 void
199 bool
201
202
207 void
208 SetUpdateFieldStandardDeviations(std::vector<double> UpdateFieldStandardDeviations )
209 { this->m_UpdateFieldStandardDeviations = std::move(UpdateFieldStandardDeviations); }
210
212 void
213 SetUpdateFieldStandardDeviations( double value ) { this->m_UpdateFieldStandardDeviations = std::vector<double>(3, value); }
218 std::vector<double>
220
221
225 void
226 SetMaximumKernelWidth(unsigned int MaximumKernelWidth )
227 { this->m_MaximumKernelWidth = MaximumKernelWidth; }
228
231 unsigned int
233
234
238 void
239 SetMaximumError(double MaximumError )
240 { this->m_MaximumError = MaximumError; }
241
244 double
245 GetMaximumError() const { return this->m_MaximumError; }
246
247
253 void
254 SetIntensityDifferenceThreshold(double IntensityDifferenceThreshold )
255 { this->m_IntensityDifferenceThreshold = IntensityDifferenceThreshold; }
256
258 double
260
261
264 void
265 SetUseImageSpacing(bool UseImageSpacing )
266 { this->m_UseImageSpacing = UseImageSpacing; }
267
269 void
270 UseImageSpacingOn() { return this->SetUseImageSpacing(true); }
271 void
272 UseImageSpacingOff() { return this->SetUseImageSpacing(false); }
275 bool
276 GetUseImageSpacing() const { return this->m_UseImageSpacing; }
277
278
285 uint32_t GetElapsedIterations()const { return this->m_pfGetElapsedIterations(); }
286
293 double GetRMSChange() const { return this->m_RMSChange; }
294
302 double GetMetric()const { return this->m_pfGetMetric(); }
303
310 void StopRegistration() { return this->m_pfGetStopRegistration(); }
311
313 std::string GetName() const { return std::string("FastSymmetricForcesDemonsRegistrationFilter"); }
314
316 std::string ToString() const;
317
318
320 Image Execute(const Image &fixedImage, const Image &movingImage, const Image &initialDisplacementField);
321 Image Execute(const Image &fixedImage, const Image &movingImage);
322
323
324private:
326 using MemberFunctionType = Image (Self::*)(const Image *
327 fixedImage, const Image *
328 movingImage, const Image *
329 initialDisplacementField);
330 template <class TImageType> Image ExecuteInternal(const Image *
331 fixedImage, const Image *
332 movingImage, const Image *
333 initialDisplacementField);
336
337
338 std::vector<double> m_StandardDeviations{ std::vector<double>(3, 1.0) };
339
340 /* Number of iterations to run */
341 uint32_t m_NumberOfIterations{ 10u };
342
343 /* Value of RMS change below which the filter should stop. This is a convergence criterion. */
344 double m_MaximumRMSError{ 0.02 };
345
347
349
351
352 bool m_SmoothUpdateField{ false };
353
354 std::vector<double> m_UpdateFieldStandardDeviations{ std::vector<double>(3, 1.0) };
355
356 unsigned int m_MaximumKernelWidth{ 30u };
357
358 double m_MaximumError{ 0.1 };
359
361
362 bool m_UseImageSpacing{ true };
363
364
365
366 std::function<uint32_t()> m_pfGetElapsedIterations;
367 double m_RMSChange{ 0.0 };
368 std::function<double()> m_pfGetMetric;
369 std::function<void()> m_pfGetStopRegistration;
370
371
372 // Holder of process object for active measurements
373 std::unique_ptr<itk::ProcessObject, ProcessObjectDeleter> m_Filter{nullptr};
374
375
376
377};
378
379
380}
381#endif
Image Execute(const Image &fixedImage, const Image &movingImage)
Image(Self::*)(const Image * fixedImage, const Image * movingImage, const Image * initialDisplacementField) MemberFunctionType
Image Execute(const Image &fixedImage, const Image &movingImage, const Image &initialDisplacementField)
void SetUpdateFieldStandardDeviations(std::vector< double > UpdateFieldStandardDeviations)
Image ExecuteInternal(const Image *fixedImage, const Image *movingImage, const Image *initialDisplacementField)
static const detail::MemberFunctionFactory< MemberFunctionType > & GetMemberFunctionFactory()
The Image class for SimpleITK.
Definition sitkImage.h:77
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