ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkOtsuThresholdImageFilter.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 
19 #ifndef itkOtsuThresholdImageFilter_h
20 #define itkOtsuThresholdImageFilter_h
21 
24 
25 namespace itk
26 {
27 
54 template<typename TInputImage, typename TOutputImage, typename TMaskImage=TOutputImage>
56  public HistogramThresholdImageFilter<TInputImage, TOutputImage, TMaskImage>
57 {
58 public:
61  typedef HistogramThresholdImageFilter<TInputImage,TOutputImage,
62  TMaskImage> Superclass;
65 
67  itkNewMacro(Self);
68 
71 
72  typedef TInputImage InputImageType;
73  typedef TOutputImage OutputImageType;
74  typedef TMaskImage MaskImageType;
75 
77  typedef typename InputImageType::PixelType InputPixelType;
78  typedef typename OutputImageType::PixelType OutputPixelType;
79  typedef typename MaskImageType::PixelType MaskPixelType;
80 
82  typedef typename InputImageType::Pointer InputImagePointer;
83  typedef typename OutputImageType::Pointer OutputImagePointer;
84 
87  typedef typename InputImageType::RegionType InputImageRegionType;
90  typedef typename OutputImageType::RegionType OutputImageRegionType;
93  typedef typename MaskImageType::RegionType MaskImageRegionType;
94 
97 
99  itkStaticConstMacro(InputImageDimension, unsigned int,
100  InputImageType::ImageDimension );
101  itkStaticConstMacro(OutputImageDimension, unsigned int,
102  OutputImageType::ImageDimension );
104 
105 protected:
107  {
109  }
110  ~OtsuThresholdImageFilter() ITK_OVERRIDE {};
111 
112 private:
113  ITK_DISALLOW_COPY_AND_ASSIGN(OtsuThresholdImageFilter);
114 };
115 
116 } // end namespace itk
117 
118 #endif
Threshold an image using a HistogramThresholdCalculator.
InputImageType::IndexType InputIndexType
Statistics::Histogram< ValueRealType > HistogramType
static const unsigned int OutputImageDimension
Computes the Otsu&#39;s threshold for an image.
OutputImageType::RegionType OutputImageRegionType
virtual void SetCalculator(CalculatorType *_arg)
OutputImageType::PixelType OutputPixelType
OtsuThresholdCalculator< HistogramType, InputPixelType > CalculatorType
InputImageType::RegionType InputImageRegionType
Base class for all process objects that output image data.
OutputImageType::SizeType OutputSizeType
HistogramThresholdImageFilter< TInputImage, TOutputImage, TMaskImage > Superclass
MaskImageType::RegionType MaskImageRegionType
Threshold an image using the Otsu Threshold.
OutputImageType::Pointer OutputImagePointer
static const unsigned int InputImageDimension
InputImageType::PixelType InputPixelType
Superclass::HistogramType HistogramType
SmartPointer< const Self > ConstPointer
OutputImageType::IndexType OutputIndexType