Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
itkNewOtsuThresholdImageCalculator.h
Go to the documentation of this file.
1 
2 #ifndef itkNewOtsuThresholdImageCalculator_h
3 #define itkNewOtsuThresholdImageCalculator_h
4 
5 #include "itkObject.h"
6 #include "itkObjectFactory.h"
7 #include "itkNumericTraits.h"
8 
9 namespace itk
10 {
11 
27 template <class TInputImage>
28 class NewOtsuThresholdImageCalculator : public Object
29 {
30 public:
33  typedef Object Superclass;
34  typedef SmartPointer<Self> Pointer;
35  typedef SmartPointer<const Self> ConstPointer;
36 
38  itkNewMacro(Self);
39 
42 
44  typedef TInputImage ImageType;
45 
47  typedef typename TInputImage::Pointer ImagePointer;
48 
50  typedef typename TInputImage::ConstPointer ImageConstPointer;
51 
53  typedef typename TInputImage::PixelType PixelType;
54 
56  itkSetConstObjectMacro(Image,ImageType);
57 
59  void Compute(void);
60 
62  itkGetMacro(Threshold,PixelType);
63 
65  itkSetClampMacro( NumberOfHistogramBins, unsigned long, 1,
66  NumericTraits<unsigned long>::max() );
67  itkGetMacro( NumberOfHistogramBins, unsigned long );
68 
69  itkSetMacro(Omega, double);
70  itkGetMacro(Omega,double);
71 
72 protected:
75  void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE;
76 
77 private:
78  NewOtsuThresholdImageCalculator(const Self&); //purposely not implemented
79  void operator=(const Self&); //purposely not implemented
80 
81  PixelType m_Threshold;
82  unsigned long m_NumberOfHistogramBins;
83  double m_Omega;
84  ImageConstPointer m_Image;
85 
86 };
87 
88 }
89 
90 
91 #ifndef ITK_MANUAL_INSTANTIATION
92 #include "itkNewOtsuThresholdImageCalculator.txx"
93 #endif
94 
95 #endif
itkSetConstObjectMacro(Image, ImageType)
itkSetClampMacro(NumberOfHistogramBins, unsigned long, 1, NumericTraits< unsigned long >::max())
Simplified inverse ITK transforms.
itkTypeMacro(NewOtsuThresholdImageCalculator, Object)
void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
Computes the Otsu&#39;s threshold for an image.
itkGetMacro(Threshold, PixelType)