ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkYenThresholdImageFilter.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 __itkYenThresholdImageFilter_h
00020 #define __itkYenThresholdImageFilter_h
00021 
00022 #include "itkHistogramThresholdImageFilter.h"
00023 #include "itkYenThresholdCalculator.h"
00024 
00025 namespace itk {
00026 
00049 template<class TInputImage, class TOutputImage, class TMaskImage=TOutputImage>
00050 class ITK_EXPORT YenThresholdImageFilter :
00051     public HistogramThresholdImageFilter<TInputImage, TOutputImage, TMaskImage>
00052 {
00053 public:
00055   typedef YenThresholdImageFilter                                     Self;
00056   typedef HistogramThresholdImageFilter<TInputImage,TOutputImage,
00057                                         TMaskImage>                   Superclass;
00058   typedef SmartPointer<Self>                                          Pointer;
00059   typedef SmartPointer<const Self>                                    ConstPointer;
00060 
00062   itkNewMacro(Self);
00063 
00065   itkTypeMacro(YenThresholdImageFilter, HistogramThresholdImageFilter);
00066 
00067   typedef TInputImage                       InputImageType;
00068   typedef TOutputImage                      OutputImageType;
00069   typedef TMaskImage                        MaskImageType;
00070 
00072   typedef typename InputImageType::PixelType   InputPixelType;
00073   typedef typename OutputImageType::PixelType  OutputPixelType;
00074   typedef typename MaskImageType::PixelType    MaskPixelType;
00075 
00077   typedef typename InputImageType::Pointer  InputImagePointer;
00078   typedef typename OutputImageType::Pointer OutputImagePointer;
00079 
00080   typedef typename InputImageType::SizeType    InputSizeType;
00081   typedef typename InputImageType::IndexType   InputIndexType;
00082   typedef typename InputImageType::RegionType  InputImageRegionType;
00083   typedef typename OutputImageType::SizeType   OutputSizeType;
00084   typedef typename OutputImageType::IndexType  OutputIndexType;
00085   typedef typename OutputImageType::RegionType OutputImageRegionType;
00086   typedef typename MaskImageType::SizeType     MaskSizeType;
00087   typedef typename MaskImageType::IndexType    MaskIndexType;
00088   typedef typename MaskImageType::RegionType   MaskImageRegionType;
00089 
00090   typedef typename Superclass::HistogramType                      HistogramType;
00091   typedef YenThresholdCalculator< HistogramType, InputPixelType > CalculatorType;
00092 
00094   itkStaticConstMacro(InputImageDimension, unsigned int,
00095                       InputImageType::ImageDimension );
00096   itkStaticConstMacro(OutputImageDimension, unsigned int,
00097                       OutputImageType::ImageDimension );
00099 
00100 protected:
00101   YenThresholdImageFilter()
00102     {
00103     this->SetCalculator( CalculatorType::New() );
00104     }
00105   ~YenThresholdImageFilter(){};
00106 
00107 private:
00108   YenThresholdImageFilter(const Self&); //purposely not implemented
00109   void operator=(const Self&); //purposely not implemented
00110 }; // end of class
00111 
00112 } // end namespace itk
00113 
00114 #endif
00115