SimpleITK  1.1.0
sitkOtsuThresholdImageFilter.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 sitkOtsuThresholdImageFilter_h
19 #define sitkOtsuThresholdImageFilter_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 
60  public:
62 
64  virtual ~OtsuThresholdImageFilter();
65 
69 
72 
73 
74 
79  SITK_RETURN_SELF_TYPE_HEADER SetInsideValue ( uint8_t InsideValue ) { this->m_InsideValue = InsideValue; return *this; }
80 
85  uint8_t GetInsideValue() const { return this->m_InsideValue; }
86 
91  SITK_RETURN_SELF_TYPE_HEADER SetOutsideValue ( uint8_t OutsideValue ) { this->m_OutsideValue = OutsideValue; return *this; }
92 
97  uint8_t GetOutsideValue() const { return this->m_OutsideValue; }
98 
103  SITK_RETURN_SELF_TYPE_HEADER SetNumberOfHistogramBins ( uint32_t NumberOfHistogramBins ) { this->m_NumberOfHistogramBins = NumberOfHistogramBins; return *this; }
104 
107  uint32_t GetNumberOfHistogramBins() const { return this->m_NumberOfHistogramBins; }
108 
112  SITK_RETURN_SELF_TYPE_HEADER SetMaskOutput ( bool MaskOutput ) { this->m_MaskOutput = MaskOutput; return *this; }
113 
115  SITK_RETURN_SELF_TYPE_HEADER MaskOutputOn() { return this->SetMaskOutput(true); }
116  SITK_RETURN_SELF_TYPE_HEADER MaskOutputOff() { return this->SetMaskOutput(false); }
117 
120  bool GetMaskOutput() const { return this->m_MaskOutput; }
121 
125  SITK_RETURN_SELF_TYPE_HEADER SetMaskValue ( uint8_t MaskValue ) { this->m_MaskValue = MaskValue; return *this; }
126 
129  uint8_t GetMaskValue() const { return this->m_MaskValue; }
136  double GetThreshold() const { return this->m_Threshold; };
137 
139  std::string GetName() const { return std::string ("OtsuThresholdImageFilter"); }
140 
142  std::string ToString() const;
143 
144 
146  Image Execute ( const Image & image, const Image & maskImage );
147  Image Execute ( const Image & image );
148 
149 
151  Image Execute ( const Image & image, const Image & maskImage, uint8_t insideValue, uint8_t outsideValue, uint32_t numberOfHistogramBins, bool maskOutput, uint8_t maskValue );
152  Image Execute ( const Image & image, uint8_t insideValue, uint8_t outsideValue, uint32_t numberOfHistogramBins, bool maskOutput, uint8_t maskValue );
153 
154  private:
155 
158  typedef Image (Self::*MemberFunctionType)( const Image * image, const Image * maskImage );
159  template <class TImageType> Image ExecuteInternal ( const Image * image, const Image * maskImage );
160 
161 
162  friend struct detail::MemberFunctionAddressor<MemberFunctionType>;
163 
164  nsstd::auto_ptr<detail::MemberFunctionFactory<MemberFunctionType> > m_MemberFactory;
165 
166 
172  /* Docs */
173  double m_Threshold;
174 
175  };
176 
177 
186  SITKBasicFilters_EXPORT Image OtsuThreshold ( const Image & image, const Image & maskImage, uint8_t insideValue = 1u, uint8_t outsideValue = 0u, uint32_t numberOfHistogramBins = 128u, bool maskOutput = true, uint8_t maskValue = 255u );
187  SITKBasicFilters_EXPORT Image OtsuThreshold ( const Image & image, uint8_t insideValue = 1u, uint8_t outsideValue = 0u, uint32_t numberOfHistogramBins = 128u, bool maskOutput = true, uint8_t maskValue = 255u );
188  }
189 }
190 #endif
itk::simple::Image
The main Image class for SimpleITK.
Definition: sitkImage.h:54
itk::simple::OtsuThresholdImageFilter::m_MemberFactory
nsstd::auto_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
Definition: sitkOtsuThresholdImageFilter.h:164
sitkBasicFilters.h
itk::uint8_t
::uint8_t uint8_t
itk::simple::OtsuThresholdImageFilter::Self
OtsuThresholdImageFilter Self
Definition: sitkOtsuThresholdImageFilter.h:61
itk::simple::OtsuThresholdImageFilter::m_Threshold
double m_Threshold
Definition: sitkOtsuThresholdImageFilter.h:173
itk::simple::detail::MemberFunctionAddressor
Definition: sitkDetail.h:32
itk::simple::OtsuThresholdImageFilter::SetMaskOutput
Self & SetMaskOutput(bool MaskOutput)
Definition: sitkOtsuThresholdImageFilter.h:112
itk::simple::OtsuThresholdImageFilter::SetNumberOfHistogramBins
Self & SetNumberOfHistogramBins(uint32_t NumberOfHistogramBins)
Definition: sitkOtsuThresholdImageFilter.h:103
itk::simple::OtsuThresholdImageFilter::m_NumberOfHistogramBins
uint32_t m_NumberOfHistogramBins
Definition: sitkOtsuThresholdImageFilter.h:169
itk::simple::OtsuThresholdImageFilter::MaskOutputOn
Self & MaskOutputOn()
Definition: sitkOtsuThresholdImageFilter.h:115
itk::simple::BasicPixelIDTypeList
typelist::MakeTypeList< BasicPixelID< int8_t >, BasicPixelID< uint8_t >, BasicPixelID< int16_t >, BasicPixelID< uint16_t >, BasicPixelID< int32_t >, BasicPixelID< uint32_t >, BasicPixelID< float >, BasicPixelID< double > >::Type BasicPixelIDTypeList
Definition: sitkPixelIDTypeLists.h:53
sitkImageFilter.h
itk::simple::OtsuThresholdImageFilter::GetNumberOfHistogramBins
uint32_t GetNumberOfHistogramBins() const
Definition: sitkOtsuThresholdImageFilter.h:107
itk::simple::OtsuThresholdImageFilter::m_MaskValue
uint8_t m_MaskValue
Definition: sitkOtsuThresholdImageFilter.h:171
itk::simple::OtsuThresholdImageFilter::GetMaskOutput
bool GetMaskOutput() const
Definition: sitkOtsuThresholdImageFilter.h:120
itk::simple::OtsuThresholdImageFilter::m_OutsideValue
uint8_t m_OutsideValue
Definition: sitkOtsuThresholdImageFilter.h:168
itk::simple::OtsuThresholdImageFilter::SetMaskValue
Self & SetMaskValue(uint8_t MaskValue)
Definition: sitkOtsuThresholdImageFilter.h:125
itk::simple::OtsuThresholdImageFilter::m_MaskOutput
bool m_MaskOutput
Definition: sitkOtsuThresholdImageFilter.h:170
itk::simple::OtsuThresholdImageFilter::SetInsideValue
Self & SetInsideValue(uint8_t InsideValue)
Definition: sitkOtsuThresholdImageFilter.h:79
itk::simple::OtsuThresholdImageFilter
Threshold an image using the Otsu Threshold.
Definition: sitkOtsuThresholdImageFilter.h:59
SITKBasicFilters_EXPORT
#define SITKBasicFilters_EXPORT
Definition: sitkBasicFilters.h:50
itk::simple::OtsuThresholdImageFilter::PixelIDTypeList
BasicPixelIDTypeList PixelIDTypeList
Definition: sitkOtsuThresholdImageFilter.h:71
itk::simple::OtsuThresholdImageFilter::GetInsideValue
uint8_t GetInsideValue() const
Definition: sitkOtsuThresholdImageFilter.h:85
itk::simple::OtsuThreshold
Image OtsuThreshold(const Image &image, const Image &maskImage, uint8_t insideValue=1u, uint8_t outsideValue=0u, uint32_t numberOfHistogramBins=128u, bool maskOutput=true, uint8_t maskValue=255u)
Threshold an image using the Otsu Threshold.
itk::simple::OtsuThresholdImageFilter::GetMaskValue
uint8_t GetMaskValue() const
Definition: sitkOtsuThresholdImageFilter.h:129
itk::simple::OtsuThresholdImageFilter::SetOutsideValue
Self & SetOutsideValue(uint8_t OutsideValue)
Definition: sitkOtsuThresholdImageFilter.h:91
itk::simple::OtsuThresholdImageFilter::m_InsideValue
uint8_t m_InsideValue
Definition: sitkOtsuThresholdImageFilter.h:167
itk
itk::simple::OtsuThresholdImageFilter::GetOutsideValue
uint8_t GetOutsideValue() const
Definition: sitkOtsuThresholdImageFilter.h:97
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::OtsuThresholdImageFilter::GetName
std::string GetName() const
Definition: sitkOtsuThresholdImageFilter.h:139
itk::uint32_t
::uint32_t uint32_t
itk::simple::OtsuThresholdImageFilter::MaskOutputOff
Self & MaskOutputOff()
Definition: sitkOtsuThresholdImageFilter.h:116
itk::simple::OtsuThresholdImageFilter::GetThreshold
double GetThreshold() const
Get the computed threshold.
Definition: sitkOtsuThresholdImageFilter.h:136