Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkWhiteTopHatImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkWhiteTopHatImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-04-28 14:36:34 $
00007   Version:   $Revision: 1.9 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 #ifndef __itkWhiteTopHatImageFilter_h
00018 #define __itkWhiteTopHatImageFilter_h
00019 
00020 // First make sure that the configuration is available.
00021 // This line can be removed once the optimized versions
00022 // gets integrated into the main directories.
00023 #include "itkConfigure.h"
00024 
00025 #ifdef ITK_USE_CONSOLIDATED_MORPHOLOGY
00026 #include "itkOptWhiteTopHatImageFilter.h"
00027 #else
00028 
00029 
00030 #include "itkImageToImageFilter.h"
00031 
00032 namespace itk {
00033 
00045 template<class TInputImage, class TOutputImage, class TKernel>
00046 class ITK_EXPORT WhiteTopHatImageFilter : 
00047     public ImageToImageFilter<TInputImage, TOutputImage>
00048 {
00049 public:
00051   typedef WhiteTopHatImageFilter                        Self;
00052   typedef ImageToImageFilter<TInputImage, TOutputImage> Superclass;
00053   typedef SmartPointer<Self>                            Pointer;
00054   typedef SmartPointer<const Self>                      ConstPointer;
00055 
00057   typedef TInputImage                              InputImageType;
00058   typedef typename InputImageType::Pointer         InputImagePointer;
00059   typedef typename InputImageType::ConstPointer    InputImageConstPointer;
00060   typedef typename InputImageType::RegionType      InputImageRegionType;
00061   typedef typename InputImageType::PixelType       InputImagePixelType;
00062 
00063   typedef TOutputImage                             OutputImageType;
00064   typedef typename OutputImageType::Pointer        OutputImagePointer;
00065   typedef typename OutputImageType::ConstPointer   OutputImageConstPointer;
00066   typedef typename OutputImageType::RegionType     OutputImageRegionType;
00067   typedef typename OutputImageType::PixelType      OutputImagePixelType;
00068   
00070   typedef TKernel KernelType;
00071 
00073   itkStaticConstMacro(InputImageDimension, unsigned int,
00074                       TInputImage::ImageDimension);
00075   itkStaticConstMacro(OutputImageDimension, unsigned int,
00076                       TOutputImage::ImageDimension);
00078 
00080   itkNewMacro(Self);  
00081 
00083   itkTypeMacro(WhiteTopHatImageFilter,
00084                ImageToImageFilter);
00085 
00087   itkSetMacro(Kernel, KernelType);
00088 
00090   itkGetConstReferenceMacro(Kernel, KernelType);
00091 
00094   itkSetMacro(SafeBorder, bool);
00095   itkGetConstReferenceMacro(SafeBorder, bool);
00096   itkBooleanMacro(SafeBorder);
00098 
00100   typedef typename TKernel::PixelType            KernelPixelType;
00101 
00102 #ifdef ITK_USE_CONCEPT_CHECKING
00103 
00104   itkConceptMacro(InputAdditiveOperatorsCheck,
00105     (Concept::AdditiveOperators<InputImagePixelType>));
00106   itkConceptMacro(InputConvertibleToOutputCheck,
00107     (Concept::Convertible<InputImagePixelType, OutputImagePixelType>));
00108   itkConceptMacro(InputGreaterThanComparableCheck,
00109     (Concept::GreaterThanComparable<InputImagePixelType>));
00110   itkConceptMacro(KernelGreaterThanComparableCheck,
00111     (Concept::GreaterThanComparable<KernelPixelType>));
00112 
00114 #endif
00115 
00116 protected:
00117   WhiteTopHatImageFilter();
00118   ~WhiteTopHatImageFilter() {};
00119   void PrintSelf(std::ostream& os, Indent indent) const;
00120 
00124   void GenerateInputRequestedRegion();
00125 
00127   void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output));
00128 
00129   void GenerateData();
00130   
00131 
00132 private:
00133   WhiteTopHatImageFilter(const Self&); //purposely not implemented
00134   void operator=(const Self&); //purposely not implemented
00135 
00137   KernelType m_Kernel;
00138 
00139   bool m_SafeBorder;
00140 }; // end of class
00141 
00142 } // end namespace itk
00143   
00144 #ifndef ITK_MANUAL_INSTANTIATION
00145 #include "itkWhiteTopHatImageFilter.txx"
00146 #endif
00147 
00148 #endif
00149 
00150 #endif
00151 

Generated at Fri Apr 16 20:03:30 2010 for ITK by doxygen 1.6.1 written by Dimitri van Heesch, © 1997-2000