ITK  4.0.0
Insight Segmentation and Registration Toolkit
itkWhiteTopHatImageFilter.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 #ifndef __itkWhiteTopHatImageFilter_h
00019 #define __itkWhiteTopHatImageFilter_h
00020 
00021 #include "itkKernelImageFilter.h"
00022 
00023 namespace itk
00024 {
00037 template< class TInputImage, class TOutputImage, class TKernel >
00038 class ITK_EXPORT WhiteTopHatImageFilter:
00039   public KernelImageFilter< TInputImage, TOutputImage, TKernel >
00040 {
00041 public:
00043   typedef WhiteTopHatImageFilter                                  Self;
00044   typedef KernelImageFilter< TInputImage, TOutputImage, TKernel > Superclass;
00045   typedef SmartPointer< Self >                                    Pointer;
00046   typedef SmartPointer< const Self >                              ConstPointer;
00047 
00049   typedef TInputImage                            InputImageType;
00050   typedef TOutputImage                           OutputImageType;
00051   typedef typename InputImageType::Pointer       InputImagePointer;
00052   typedef typename InputImageType::ConstPointer  InputImageConstPointer;
00053   typedef typename InputImageType::RegionType    InputImageRegionType;
00054   typedef typename InputImageType::PixelType     InputImagePixelType;
00055   typedef typename OutputImageType::Pointer      OutputImagePointer;
00056   typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
00057   typedef typename OutputImageType::RegionType   OutputImageRegionType;
00058   typedef typename OutputImageType::PixelType    OutputImagePixelType;
00059 
00061   typedef TKernel KernelType;
00062 
00064   itkStaticConstMacro(InputImageDimension, unsigned int,
00065                       TInputImage::ImageDimension);
00066   itkStaticConstMacro(OutputImageDimension, unsigned int,
00067                       TOutputImage::ImageDimension);
00069 
00071   itkNewMacro(Self);
00072 
00074   itkTypeMacro(WhiteTopHatImageFilter,
00075                KernelImageFilter);
00076 
00079   itkSetMacro(SafeBorder, bool);
00080   itkGetConstReferenceMacro(SafeBorder, bool);
00081   itkBooleanMacro(SafeBorder);
00083 
00085   enum {
00086     BASIC = 0,
00087     HISTO = 1,
00088     ANCHOR = 2,
00089     VHGW = 3
00090     } AlgorithmChoice;
00091 
00093   itkSetMacro(Algorithm, int);
00094   itkGetConstMacro(Algorithm, int);
00096 
00097   itkSetMacro(ForceAlgorithm, bool);
00098   itkGetConstReferenceMacro(ForceAlgorithm, bool);
00099   itkBooleanMacro(ForceAlgorithm);
00100 protected:
00101   WhiteTopHatImageFilter();
00102   ~WhiteTopHatImageFilter() {}
00103   void PrintSelf(std::ostream & os, Indent indent) const;
00104 
00105   void GenerateData();
00106 
00107 private:
00108   WhiteTopHatImageFilter(const Self &); //purposely not implemented
00109   void operator=(const Self &);         //purposely not implemented
00110 
00111   bool m_SafeBorder;
00112 
00113   int m_Algorithm;
00114 
00115   bool m_ForceAlgorithm;
00116 }; // end of class
00117 } // end namespace itk
00118 
00119 #ifndef ITK_MANUAL_INSTANTIATION
00120 #include "itkWhiteTopHatImageFilter.hxx"
00121 #endif
00122 
00123 #endif
00124