SimpleITK  2.0.0
sitkScalarChanAndVeseDenseLevelSetImageFilter.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 sitkScalarChanAndVeseDenseLevelSetImageFilter_h
19 #define sitkScalarChanAndVeseDenseLevelSetImageFilter_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 
32 namespace itk {
33  namespace simple {
34 
64  public:
66 
69 
73 
76 \
77 
80  SITK_RETURN_SELF_TYPE_HEADER SetMaximumRMSError ( double MaximumRMSError ) { this->m_MaximumRMSError = MaximumRMSError; return *this; }
81 
84  double GetMaximumRMSError() const { return this->m_MaximumRMSError; }\
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 SetLambda1 ( double Lambda1 ) { this->m_Lambda1 = Lambda1; return *this; }
97 
100  double GetLambda1() const { return this->m_Lambda1; }\
101 
104  SITK_RETURN_SELF_TYPE_HEADER SetLambda2 ( double Lambda2 ) { this->m_Lambda2 = Lambda2; return *this; }
105 
108  double GetLambda2() const { return this->m_Lambda2; }\
109 
112  SITK_RETURN_SELF_TYPE_HEADER SetEpsilon ( double Epsilon ) { this->m_Epsilon = Epsilon; return *this; }
113 
116  double GetEpsilon() const { return this->m_Epsilon; }\
117 
120  SITK_RETURN_SELF_TYPE_HEADER SetCurvatureWeight ( double CurvatureWeight ) { this->m_CurvatureWeight = CurvatureWeight; return *this; }
121 
124  double GetCurvatureWeight() const { return this->m_CurvatureWeight; }\
125 
128  SITK_RETURN_SELF_TYPE_HEADER SetAreaWeight ( double AreaWeight ) { this->m_AreaWeight = AreaWeight; return *this; }
129 
132  double GetAreaWeight() const { return this->m_AreaWeight; }\
133 
136  SITK_RETURN_SELF_TYPE_HEADER SetReinitializationSmoothingWeight ( double ReinitializationSmoothingWeight ) { this->m_ReinitializationSmoothingWeight = ReinitializationSmoothingWeight; return *this; }
137 
140  double GetReinitializationSmoothingWeight() const { return this->m_ReinitializationSmoothingWeight; }\
141 
144  SITK_RETURN_SELF_TYPE_HEADER SetVolume ( double Volume ) { this->m_Volume = Volume; return *this; }
145 
148  double GetVolume() const { return this->m_Volume; }\
149 
152  SITK_RETURN_SELF_TYPE_HEADER SetVolumeMatchingWeight ( double VolumeMatchingWeight ) { this->m_VolumeMatchingWeight = VolumeMatchingWeight; return *this; }
153 
156  double GetVolumeMatchingWeight() const { return this->m_VolumeMatchingWeight; }
157 
158  typedef enum {AtanRegularizedHeaviside,SinRegularizedHeaviside,Heaviside} HeavisideStepFunctionType;\
159 
162  SITK_RETURN_SELF_TYPE_HEADER SetHeavisideStepFunction ( HeavisideStepFunctionType HeavisideStepFunction ) { this->m_HeavisideStepFunction = HeavisideStepFunction; return *this; }
163 
166  HeavisideStepFunctionType GetHeavisideStepFunction() const { return this->m_HeavisideStepFunction; }\
167 
172  SITK_RETURN_SELF_TYPE_HEADER SetUseImageSpacing ( bool UseImageSpacing ) { this->m_UseImageSpacing = UseImageSpacing; return *this; }
173 
175  SITK_RETURN_SELF_TYPE_HEADER UseImageSpacingOn() { return this->SetUseImageSpacing(true); }
176  SITK_RETURN_SELF_TYPE_HEADER UseImageSpacingOff() { return this->SetUseImageSpacing(false); }
177 
182  bool GetUseImageSpacing() const { return this->m_UseImageSpacing; }
189  uint32_t GetElapsedIterations() const { return this->m_ElapsedIterations; };
190 
197  double GetRMSChange() const { return this->m_RMSChange; };
198 
199 
201  std::string GetName() const { return std::string ("ScalarChanAndVeseDenseLevelSetImageFilter"); }
202 
204  std::string ToString() const;
205 
206 
209  Image Execute ( const Image & initialImage, const Image & featureImage );
210 
211  private:
212 
215  using MemberFunctionType = Image (Self::*)( const Image * initialImage, const Image * featureImage );
216  template <class TImageType> Image ExecuteInternal ( const Image * initialImage, const Image * featureImage );
217 
218 
220 
221  std::unique_ptr<detail::MemberFunctionFactory<MemberFunctionType> > m_MemberFactory;
222 
223 
224  /* Value of RMS change below which the filter should stop. This is a convergence criterion. */
225  double m_MaximumRMSError{0.02};
226 
227  /* Number of iterations to run */
228  uint32_t m_NumberOfIterations{1000u};
229 
230  /* Lambda1. Internal intensity difference weight */
231  double m_Lambda1{1.0};
232 
233  /* Lambda2. External intensity difference weight */
234  double m_Lambda2{1.0};
235 
236  /* Width of regularization of Heaviside function. */
237  double m_Epsilon{1.0};
238 
239  /* Gamma. Scales all curvature weight values */
240  double m_CurvatureWeight{1.0};
241 
242  /* Nu. Area regularization values */
243  double m_AreaWeight{0.0};
244 
245  /* Weight of the laplacian smoothing term */
246  double m_ReinitializationSmoothingWeight{0.0};
247 
248  /* Pixel Volume = Number of pixels inside the level-set */
249  double m_Volume{0.0};
250 
251  /* Volume matching weight. */
252  double m_VolumeMatchingWeight{0.0};
253 
254  /* Step functions */
256 
257  bool m_UseImageSpacing{true};
258 
259 
260  uint32_t m_ElapsedIterations{0};
261 
262  double m_RMSChange{0.0};
263 
264 
265  };
266 
277  SITKBasicFilters_EXPORT Image ScalarChanAndVeseDenseLevelSet ( const Image & initialImage, const Image & featureImage, double maximumRMSError = 0.02, uint32_t numberOfIterations = 1000u, double lambda1 = 1.0, double lambda2 = 1.0, double epsilon = 1.0, double curvatureWeight = 1.0, double areaWeight = 0.0, double reinitializationSmoothingWeight = 0.0, double volume = 0.0, double volumeMatchingWeight = 0.0, ScalarChanAndVeseDenseLevelSetImageFilter::HeavisideStepFunctionType heavisideStepFunction = itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::AtanRegularizedHeaviside, bool useImageSpacing = true );
278 
280  }
281 }
282 #endif
itk::simple::Image
The Image class for SimpleITK.
Definition: sitkImage.h:75
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::GetNumberOfIterations
uint32_t GetNumberOfIterations() const
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:92
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::GetUseImageSpacing
bool GetUseImageSpacing() const
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:182
sitkBasicFilters.h
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::UseImageSpacingOff
Self & UseImageSpacingOff()
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:176
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::GetVolumeMatchingWeight
double GetVolumeMatchingWeight() const
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:156
itk::simple::detail::MemberFunctionAddressor
Definition: sitkDetail.h:32
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::SetVolume
Self & SetVolume(double Volume)
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:144
itk::simple::RealPixelIDTypeList
typelist::MakeTypeList< BasicPixelID< float >, BasicPixelID< double > >::Type RealPixelIDTypeList
Definition: sitkPixelIDTypeLists.h:96
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::SetVolumeMatchingWeight
Self & SetVolumeMatchingWeight(double VolumeMatchingWeight)
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:152
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::SetNumberOfIterations
Self & SetNumberOfIterations(uint32_t NumberOfIterations)
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:88
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::GetReinitializationSmoothingWeight
double GetReinitializationSmoothingWeight() const
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:140
itk::HeavisideStepFunction
sitkImageFilter.h
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::GetCurvatureWeight
double GetCurvatureWeight() const
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:124
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::SetLambda2
Self & SetLambda2(double Lambda2)
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:104
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::AtanRegularizedHeaviside
@ AtanRegularizedHeaviside
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:158
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::GetVolume
double GetVolume() const
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:148
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::SetHeavisideStepFunction
Self & SetHeavisideStepFunction(HeavisideStepFunctionType HeavisideStepFunction)
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:162
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::GetLambda1
double GetLambda1() const
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:100
itk::simple::ScalarChanAndVeseDenseLevelSet
Image ScalarChanAndVeseDenseLevelSet(const Image &initialImage, const Image &featureImage, double maximumRMSError=0.02, uint32_t numberOfIterations=1000u, double lambda1=1.0, double lambda2=1.0, double epsilon=1.0, double curvatureWeight=1.0, double areaWeight=0.0, double reinitializationSmoothingWeight=0.0, double volume=0.0, double volumeMatchingWeight=0.0, ScalarChanAndVeseDenseLevelSetImageFilter::HeavisideStepFunctionType heavisideStepFunction=itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::AtanRegularizedHeaviside, bool useImageSpacing=true)
Dense implementation of the Chan and Vese multiphase level set image filter.
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::GetElapsedIterations
uint32_t GetElapsedIterations() const
Number of iterations run.
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:189
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::GetHeavisideStepFunction
HeavisideStepFunctionType GetHeavisideStepFunction() const
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:166
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::GetRMSChange
double GetRMSChange() const
The Root Mean Square of the levelset upon termination.
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:197
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::SetUseImageSpacing
Self & SetUseImageSpacing(bool UseImageSpacing)
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:172
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::GetMaximumRMSError
double GetMaximumRMSError() const
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:84
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter
Dense implementation of the Chan and Vese multiphase level set image filter.
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:63
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::GetAreaWeight
double GetAreaWeight() const
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:132
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::UseImageSpacingOn
Self & UseImageSpacingOn()
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:175
SITKBasicFilters_EXPORT
#define SITKBasicFilters_EXPORT
Definition: sitkBasicFilters.h:52
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::GetLambda2
double GetLambda2() const
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:108
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::SetEpsilon
Self & SetEpsilon(double Epsilon)
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:112
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::HeavisideStepFunctionType
HeavisideStepFunctionType
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:158
itk
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::SetReinitializationSmoothingWeight
Self & SetReinitializationSmoothingWeight(double ReinitializationSmoothingWeight)
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:136
itk::simple::ImageFilter
The base interface for SimpleITK filters that take one input image.
Definition: sitkImageFilter.h:36
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::SetMaximumRMSError
Self & SetMaximumRMSError(double MaximumRMSError)
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:80
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::SinRegularizedHeaviside
@ SinRegularizedHeaviside
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:158
itk::Image
Definition: sitkPixelIDTypes.h:26
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::MemberFunctionType
Image(Self::*)(const Image *initialImage, const Image *featureImage) MemberFunctionType
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:215
itk::uint32_t
::uint32_t uint32_t
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::GetName
std::string GetName() const
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:201
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::m_MemberFactory
std::unique_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:221
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::SetCurvatureWeight
Self & SetCurvatureWeight(double CurvatureWeight)
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:120
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::SetLambda1
Self & SetLambda1(double Lambda1)
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:96
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::PixelIDTypeList
RealPixelIDTypeList PixelIDTypeList
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:75
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::GetEpsilon
double GetEpsilon() const
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:116
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::SetAreaWeight
Self & SetAreaWeight(double AreaWeight)
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:128