SimpleITK  1.1.0
sitkScalarChanAndVeseDenseLevelSetImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 *
3 * Copyright Insight Software Consortium
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 
67  public:
69 
72 
76 
79 
80 
81 
84  SITK_RETURN_SELF_TYPE_HEADER SetMaximumRMSError ( double MaximumRMSError ) { this->m_MaximumRMSError = MaximumRMSError; return *this; }
85 
88  double GetMaximumRMSError() const { return this->m_MaximumRMSError; }
89 
92  SITK_RETURN_SELF_TYPE_HEADER SetNumberOfIterations ( uint32_t NumberOfIterations ) { this->m_NumberOfIterations = NumberOfIterations; return *this; }
93 
96  uint32_t GetNumberOfIterations() const { return this->m_NumberOfIterations; }
97 
100  SITK_RETURN_SELF_TYPE_HEADER SetLambda1 ( double Lambda1 ) { this->m_Lambda1 = Lambda1; return *this; }
101 
104  double GetLambda1() const { return this->m_Lambda1; }
105 
108  SITK_RETURN_SELF_TYPE_HEADER SetLambda2 ( double Lambda2 ) { this->m_Lambda2 = Lambda2; return *this; }
109 
112  double GetLambda2() const { return this->m_Lambda2; }
113 
116  SITK_RETURN_SELF_TYPE_HEADER SetEpsilon ( double Epsilon ) { this->m_Epsilon = Epsilon; return *this; }
117 
120  double GetEpsilon() const { return this->m_Epsilon; }
121 
124  SITK_RETURN_SELF_TYPE_HEADER SetCurvatureWeight ( double CurvatureWeight ) { this->m_CurvatureWeight = CurvatureWeight; return *this; }
125 
128  double GetCurvatureWeight() const { return this->m_CurvatureWeight; }
129 
132  SITK_RETURN_SELF_TYPE_HEADER SetAreaWeight ( double AreaWeight ) { this->m_AreaWeight = AreaWeight; return *this; }
133 
136  double GetAreaWeight() const { return this->m_AreaWeight; }
137 
140  SITK_RETURN_SELF_TYPE_HEADER SetReinitializationSmoothingWeight ( double ReinitializationSmoothingWeight ) { this->m_ReinitializationSmoothingWeight = ReinitializationSmoothingWeight; return *this; }
141 
144  double GetReinitializationSmoothingWeight() const { return this->m_ReinitializationSmoothingWeight; }
145 
148  SITK_RETURN_SELF_TYPE_HEADER SetVolume ( double Volume ) { this->m_Volume = Volume; return *this; }
149 
152  double GetVolume() const { return this->m_Volume; }
153 
156  SITK_RETURN_SELF_TYPE_HEADER SetVolumeMatchingWeight ( double VolumeMatchingWeight ) { this->m_VolumeMatchingWeight = VolumeMatchingWeight; return *this; }
157 
160  double GetVolumeMatchingWeight() const { return this->m_VolumeMatchingWeight; }
161 
162  typedef enum {AtanRegularizedHeaviside,SinRegularizedHeaviside,Heaviside} HeavisideStepFunctionType;
163 
166  SITK_RETURN_SELF_TYPE_HEADER SetHeavisideStepFunction ( HeavisideStepFunctionType HeavisideStepFunction ) { this->m_HeavisideStepFunction = HeavisideStepFunction; return *this; }
167 
170  HeavisideStepFunctionType GetHeavisideStepFunction() const { return this->m_HeavisideStepFunction; }
171 
176  SITK_RETURN_SELF_TYPE_HEADER SetUseImageSpacing ( bool UseImageSpacing ) { this->m_UseImageSpacing = UseImageSpacing; return *this; }
177 
179  SITK_RETURN_SELF_TYPE_HEADER UseImageSpacingOn() { return this->SetUseImageSpacing(true); }
180  SITK_RETURN_SELF_TYPE_HEADER UseImageSpacingOff() { return this->SetUseImageSpacing(false); }
181 
186  bool GetUseImageSpacing() const { return this->m_UseImageSpacing; }
193  uint32_t GetElapsedIterations() const { return this->m_ElapsedIterations; };
194 
201  double GetRMSChange() const { return this->m_RMSChange; };
202 
204  std::string GetName() const { return std::string ("ScalarChanAndVeseDenseLevelSetImageFilter"); }
205 
207  std::string ToString() const;
208 
209 
211  Image Execute ( const Image& image1, const Image& image2 );
212 
213 
215  Image Execute ( const Image& image1, const Image& image2, double maximumRMSError, uint32_t numberOfIterations, double lambda1, double lambda2, double epsilon, double curvatureWeight, double areaWeight, double reinitializationSmoothingWeight, double volume, double volumeMatchingWeight, ScalarChanAndVeseDenseLevelSetImageFilter::HeavisideStepFunctionType heavisideStepFunction, bool useImageSpacing );
216 
217  private:
218 
221  typedef Image (Self::*MemberFunctionType)( const Image& image1, const Image& image2 );
222  template <class TImageType> Image ExecuteInternal ( const Image& image1, const Image& image2 );
223 
224 
225  friend struct detail::MemberFunctionAddressor<MemberFunctionType>;
226 
227  nsstd::auto_ptr<detail::MemberFunctionFactory<MemberFunctionType> > m_MemberFactory;
228 
229 
230  /* Value of RMS change below which the filter should stop. This is a convergence criterion. */
232  /* Number of iterations to run */
234  /* Lambda1. Internal intensity difference weight */
235  double m_Lambda1;
236  /* Lambda2. External intensity difference weight */
237  double m_Lambda2;
238  /* Width of regularization of Heaviside function. */
239  double m_Epsilon;
240  /* Gamma. Scales all curvature weight values */
242  /* Nu. Area regularization values */
243  double m_AreaWeight;
244  /* Weight of the laplacian smoothing term */
246  /* Pixel Volume = Number of pixels inside the level-set */
247  double m_Volume;
248  /* Volume matching weight. */
250  /* Step functions */
253 
255 
256  double m_RMSChange;
257 
258  };
259 
260 
269  SITKBasicFilters_EXPORT Image ScalarChanAndVeseDenseLevelSet ( const Image& image1, const Image& image2, 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 );
270 
271  }
272 }
273 #endif
itk::simple::Image
The main Image class for SimpleITK.
Definition: sitkImage.h:54
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::m_Lambda1
double m_Lambda1
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:235
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::GetNumberOfIterations
uint32_t GetNumberOfIterations() const
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:96
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::GetUseImageSpacing
bool GetUseImageSpacing() const
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:186
sitkBasicFilters.h
itk::simple::ScalarChanAndVeseDenseLevelSet
Image ScalarChanAndVeseDenseLevelSet(const Image &image1, const Image &image2, 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::UseImageSpacingOff
Self & UseImageSpacingOff()
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:180
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::GetVolumeMatchingWeight
double GetVolumeMatchingWeight() const
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:160
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::m_MemberFactory
nsstd::auto_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:227
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::m_NumberOfIterations
uint32_t m_NumberOfIterations
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:233
itk::simple::detail::MemberFunctionAddressor
Definition: sitkDetail.h:32
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::SetVolume
Self & SetVolume(double Volume)
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:148
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:156
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::m_ReinitializationSmoothingWeight
double m_ReinitializationSmoothingWeight
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:245
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::m_Lambda2
double m_Lambda2
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:237
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::m_Volume
double m_Volume
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:247
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::SetNumberOfIterations
Self & SetNumberOfIterations(uint32_t NumberOfIterations)
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:92
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::GetReinitializationSmoothingWeight
double GetReinitializationSmoothingWeight() const
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:144
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::m_Epsilon
double m_Epsilon
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:239
itk::HeavisideStepFunction
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::m_VolumeMatchingWeight
double m_VolumeMatchingWeight
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:249
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::m_UseImageSpacing
bool m_UseImageSpacing
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:252
sitkImageFilter.h
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::GetCurvatureWeight
double GetCurvatureWeight() const
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:128
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::SetLambda2
Self & SetLambda2(double Lambda2)
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:108
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::AtanRegularizedHeaviside
@ AtanRegularizedHeaviside
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:162
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::GetVolume
double GetVolume() const
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:152
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::SetHeavisideStepFunction
Self & SetHeavisideStepFunction(HeavisideStepFunctionType HeavisideStepFunction)
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:166
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::m_HeavisideStepFunction
HeavisideStepFunctionType m_HeavisideStepFunction
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:251
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::GetLambda1
double GetLambda1() const
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:104
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::m_CurvatureWeight
double m_CurvatureWeight
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:241
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::GetElapsedIterations
uint32_t GetElapsedIterations() const
Number of iterations run.
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:193
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::GetHeavisideStepFunction
HeavisideStepFunctionType GetHeavisideStepFunction() const
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:170
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::GetRMSChange
double GetRMSChange() const
The Root Mean Square of the levelset upon termination.
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:201
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::SetUseImageSpacing
Self & SetUseImageSpacing(bool UseImageSpacing)
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:176
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::GetMaximumRMSError
double GetMaximumRMSError() const
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:88
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter
Dense implementation of the Chan and Vese multiphase level set image filter.
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:66
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::Self
ScalarChanAndVeseDenseLevelSetImageFilter Self
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:68
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::GetAreaWeight
double GetAreaWeight() const
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:136
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::UseImageSpacingOn
Self & UseImageSpacingOn()
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:179
SITKBasicFilters_EXPORT
#define SITKBasicFilters_EXPORT
Definition: sitkBasicFilters.h:50
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::GetLambda2
double GetLambda2() const
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:112
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::SetEpsilon
Self & SetEpsilon(double Epsilon)
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:116
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::HeavisideStepFunctionType
HeavisideStepFunctionType
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:162
itk
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::SetReinitializationSmoothingWeight
Self & SetReinitializationSmoothingWeight(double ReinitializationSmoothingWeight)
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:140
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::m_RMSChange
double m_RMSChange
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:256
itk::simple::ImageFilter
The base interface for SimpleITK filters that take one input image.
Definition: sitkImageFilter.h:37
itk::simple::ProcessObject
Base class for SimpleITK classes based on ProcessObject.
Definition: sitkProcessObject.h:50
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::SetMaximumRMSError
Self & SetMaximumRMSError(double MaximumRMSError)
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:84
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::SinRegularizedHeaviside
@ SinRegularizedHeaviside
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:162
itk::uint32_t
::uint32_t uint32_t
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::m_MaximumRMSError
double m_MaximumRMSError
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:231
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::GetName
std::string GetName() const
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:204
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::SetCurvatureWeight
Self & SetCurvatureWeight(double CurvatureWeight)
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:124
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::m_ElapsedIterations
uint32_t m_ElapsedIterations
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:254
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::SetLambda1
Self & SetLambda1(double Lambda1)
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:100
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::PixelIDTypeList
RealPixelIDTypeList PixelIDTypeList
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:78
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::GetEpsilon
double GetEpsilon() const
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:120
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::SetAreaWeight
Self & SetAreaWeight(double AreaWeight)
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:132
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::m_AreaWeight
double m_AreaWeight
Definition: sitkScalarChanAndVeseDenseLevelSetImageFilter.h:243