ITK  4.0.0
Insight Segmentation and Registration Toolkit
itkHuangThresholdImageFilter.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 
00019 #ifndef __itkHuangThresholdImageFilter_h
00020 #define __itkHuangThresholdImageFilter_h
00021 
00022 #include "itkHistogramThresholdImageFilter.h"
00023 #include "itkHuangThresholdCalculator.h"
00024 
00025 namespace itk {
00026 
00047 template<class TInputImage, class TOutputImage>
00048 class ITK_EXPORT HuangThresholdImageFilter :
00049     public HistogramThresholdImageFilter<TInputImage, TOutputImage>
00050 {
00051 public:
00053   typedef HuangThresholdImageFilter                                   Self;
00054   typedef HistogramThresholdImageFilter<TInputImage,TOutputImage>     Superclass;
00055   typedef SmartPointer<Self>                                          Pointer;
00056   typedef SmartPointer<const Self>                                    ConstPointer;
00057 
00059   itkNewMacro(Self);
00060 
00062   itkTypeMacro(HuangThresholdImageFilter, HistogramThresholdImageFilter);
00063 
00064   typedef TInputImage                       InputImageType;
00065   typedef TOutputImage                      OutputImageType;
00066 
00068   typedef typename InputImageType::PixelType   InputPixelType;
00069   typedef typename OutputImageType::PixelType  OutputPixelType;
00070 
00072   typedef typename InputImageType::Pointer  InputImagePointer;
00073   typedef typename OutputImageType::Pointer OutputImagePointer;
00074 
00075   typedef typename InputImageType::SizeType    InputSizeType;
00076   typedef typename InputImageType::IndexType   InputIndexType;
00077   typedef typename InputImageType::RegionType  InputImageRegionType;
00078   typedef typename OutputImageType::SizeType   OutputSizeType;
00079   typedef typename OutputImageType::IndexType  OutputIndexType;
00080   typedef typename OutputImageType::RegionType OutputImageRegionType;
00081 
00082   typedef typename Superclass::HistogramType                        HistogramType;
00083   typedef HuangThresholdCalculator< HistogramType, InputPixelType > CalculatorType;
00084 
00086   itkStaticConstMacro(InputImageDimension, unsigned int,
00087                       InputImageType::ImageDimension );
00088   itkStaticConstMacro(OutputImageDimension, unsigned int,
00089                       OutputImageType::ImageDimension );
00091 
00092 protected:
00093   HuangThresholdImageFilter()
00094     {
00095     this->SetCalculator( CalculatorType::New() );
00096     }
00097   ~HuangThresholdImageFilter(){};
00098 
00099 private:
00100   HuangThresholdImageFilter(const Self&); //purposely not implemented
00101   void operator=(const Self&); //purposely not implemented
00102 }; // end of class
00103 
00104 } // end namespace itk
00105 
00106 #endif
00107