SimpleITK  
sitkGeodesicActiveContourLevelSetImageFilter.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 sitkGeodesicActiveContourLevelSetImageFilter_h
19#define sitkGeodesicActiveContourLevelSetImageFilter_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
114public:
116
119
123
126
127
128
129
132 void
133 SetMaximumRMSError(double MaximumRMSError )
134 { this->m_MaximumRMSError = MaximumRMSError; }
135
137 double
138 GetMaximumRMSError() const { return this->m_MaximumRMSError; }
139
140
143 void
144 SetPropagationScaling(double PropagationScaling )
145 { this->m_PropagationScaling = PropagationScaling; }
146
148 double
150
151
154 void
155 SetCurvatureScaling(double CurvatureScaling )
156 { this->m_CurvatureScaling = CurvatureScaling; }
157
159 double
160 GetCurvatureScaling() const { return this->m_CurvatureScaling; }
161
162
165 void
166 SetAdvectionScaling(double AdvectionScaling )
167 { this->m_AdvectionScaling = AdvectionScaling; }
168
170 double
171 GetAdvectionScaling() const { return this->m_AdvectionScaling; }
172
173
176 void
177 SetNumberOfIterations(uint32_t NumberOfIterations )
178 { this->m_NumberOfIterations = NumberOfIterations; }
179
181 uint32_t
183
184
187 void
188 SetReverseExpansionDirection(bool ReverseExpansionDirection )
189 { this->m_ReverseExpansionDirection = ReverseExpansionDirection; }
190
192 void
194 void
198 bool
200
201
207 uint32_t GetElapsedIterations() const { return this->m_ElapsedIterations; }
208
214 double GetRMSChange() const { return this->m_RMSChange; }
215
217 std::string GetName() const { return std::string("GeodesicActiveContourLevelSetImageFilter"); }
218
220 std::string ToString() const;
221
222
224#ifndef SWIG
225 Image Execute(Image &&initialImage, const Image &featureImage);
226#endif
227 Image Execute(const Image &initialImage, const Image &featureImage);
228
229
230private:
232 using MemberFunctionType = Image (Self::*)(const Image *
233 initialImage, const Image *
234 featureImage);
235 template <class TImageType> Image ExecuteInternal(const Image *
236 initialImage, const Image *
237 featureImage);
240
241
242 /* Value of RMS change below which the filter should stop. This is a convergence criterion. */
243 double m_MaximumRMSError{ 0.01 };
244
245 /* Weight of direct propagation contribution to the speed term */
246 double m_PropagationScaling{ 1.0 };
247
248 /* Weight of the curvature contribution to the speed term */
249 double m_CurvatureScaling{ 1.0 };
250
251 /* Weight of the advection contribution to the speed term */
252 double m_AdvectionScaling{ 1.0 };
253
254 /* Number of iterations to run */
255 uint32_t m_NumberOfIterations{ 1000u };
256
257 /* Turn On/Off the flag which determines whether Positive or Negative speed terms will cause surface expansion. If set to TRUE then negative speed terms will cause the surface to expand and positive speed terms will cause the surface to contract. If set to FALSE (default) then positive speed terms will cause the surface to expand and negative speed terms will cause the surface to contract. This method can be safely used to reverse the expansion/contraction as appropriate to a particular application or data set. */
259
260
261
262 uint32_t m_ElapsedIterations{ 0 };
263 double m_RMSChange{ 0.0 };
264
265
266
267
268 bool m_InPlace{false};
269
270};
271
272
281#ifndef SWIG
283 Image &&initialImage, const Image &featureImage, double maximumRMSError = 0.01, double propagationScaling = 1.0, double curvatureScaling = 1.0, double advectionScaling = 1.0, uint32_t numberOfIterations = 1000u, bool reverseExpansionDirection = false
284);
285
286
287#endif
289 const Image &initialImage, const Image &featureImage, double maximumRMSError = 0.01, double propagationScaling = 1.0, double curvatureScaling = 1.0, double advectionScaling = 1.0, uint32_t numberOfIterations = 1000u, bool reverseExpansionDirection = false
290);
291
293
294}
295#endif
Image Execute(Image &&initialImage, const Image &featureImage)
double GetRMSChange() const
The Root Mean Square of the levelset upon termination.
Image Execute(const Image &initialImage, const Image &featureImage)
Image(Self::*)(const Image * initialImage, const Image * featureImage) MemberFunctionType
static const detail::MemberFunctionFactory< MemberFunctionType > & GetMemberFunctionFactory()
Image ExecuteInternal(const Image *initialImage, const Image *featureImage)
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< float >, BasicPixelID< double > > RealPixelIDTypeList
Image GeodesicActiveContourLevelSet(Image &&initialImage, const Image &featureImage, double maximumRMSError=0.01, double propagationScaling=1.0, double curvatureScaling=1.0, double advectionScaling=1.0, uint32_t numberOfIterations=1000u, bool reverseExpansionDirection=false)
Segments structures in images based on a user supplied edge potential map.
#define SITKBasicFilters_EXPORT