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

itkGrayscaleMorphologicalClosingImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkGrayscaleMorphologicalClosingImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-04-28 14:36:29 $
00007   Version:   $Revision: 1.11 $
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 __itkGrayscaleMorphologicalClosingImageFilter_h
00018 #define __itkGrayscaleMorphologicalClosingImageFilter_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 "itkOptGrayscaleMorphologicalClosingImageFilter.h"
00027 #else
00028 
00029 
00030 #include "itkImageToImageFilter.h"
00031 
00032 namespace itk {
00033 
00055 template<class TInputImage, class TOutputImage, class TKernel>
00056 class ITK_EXPORT GrayscaleMorphologicalClosingImageFilter : 
00057     public ImageToImageFilter<TInputImage, TOutputImage>
00058 {
00059 public:
00061   typedef GrayscaleMorphologicalClosingImageFilter      Self;
00062   typedef ImageToImageFilter<TInputImage, TOutputImage> Superclass;
00063   typedef SmartPointer<Self>                            Pointer;
00064   typedef SmartPointer<const Self>                      ConstPointer;
00065 
00067   itkNewMacro(Self);  
00068 
00070   itkTypeMacro(GrayscaleMorphologicalClosingImageFilter, 
00071                ImageToImageFilter);
00072 
00073   typedef TInputImage                              InputImageType;
00074   typedef TOutputImage                             OutputImageType;
00075   typedef typename InputImageType::Pointer         InputImagePointer;
00076   typedef typename OutputImageType::RegionType     OutputImageRegionType;
00077 
00079   typedef typename TInputImage::PixelType PixelType;
00080 
00082   typedef TKernel KernelType;
00083 
00085   itkSetMacro(Kernel, KernelType);
00086 
00088   itkGetConstReferenceMacro(Kernel, KernelType);
00089 
00091   itkStaticConstMacro(InputImageDimension, unsigned int,
00092                       TInputImage::ImageDimension);
00093   itkStaticConstMacro(OutputImageDimension, unsigned int,
00094                       TOutputImage::ImageDimension);
00095   itkStaticConstMacro(KernelDimension, unsigned int,
00096                       TKernel::NeighborhoodDimension);
00098 
00101   itkSetMacro(SafeBorder, bool);
00102   itkGetConstReferenceMacro(SafeBorder, bool);
00103   itkBooleanMacro(SafeBorder);
00105 
00107   typedef typename TKernel::PixelType            KernelPixelType;
00108 
00109 #ifdef ITK_USE_CONCEPT_CHECKING
00110 
00111   itkConceptMacro(SameTypeCheck,
00112     (Concept::SameType<PixelType, typename TOutputImage::PixelType>));
00113   itkConceptMacro(SameDimensionCheck1,
00114     (Concept::SameDimension<InputImageDimension, OutputImageDimension>));
00115   itkConceptMacro(SameDimensionCheck2,
00116     (Concept::SameDimension<InputImageDimension, KernelDimension>));
00117   itkConceptMacro(InputLessThanComparableCheck,
00118     (Concept::LessThanComparable<PixelType>));
00119   itkConceptMacro(InputGreaterThanComparableCheck,
00120     (Concept::GreaterThanComparable<PixelType>));
00121   itkConceptMacro(KernelGreaterThanComparableCheck,
00122     (Concept::GreaterThanComparable<KernelPixelType>));
00123 
00125 #endif
00126 
00127 protected:
00128   GrayscaleMorphologicalClosingImageFilter();
00129   ~GrayscaleMorphologicalClosingImageFilter() {};
00130   void PrintSelf(std::ostream& os, Indent indent) const;
00131 
00135   void GenerateInputRequestedRegion();
00136 
00138   void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output));
00139 
00142   void  GenerateData ();
00143 
00144 private:
00145   GrayscaleMorphologicalClosingImageFilter(const Self&); //purposely not implemented
00146   void operator=(const Self&); //purposely not implemented
00147 
00149   KernelType m_Kernel;
00150 
00151   bool m_SafeBorder;
00152 
00153 }; // end of class
00154 
00155 } // end namespace itk
00156   
00157 #ifndef ITK_MANUAL_INSTANTIATION
00158 #include "itkGrayscaleMorphologicalClosingImageFilter.txx"
00159 #endif
00160 
00161 #endif
00162 
00163 #endif
00164 

Generated at Tue Sep 15 03:08:56 2009 for ITK by doxygen 1.5.8 written by Dimitri van Heesch, © 1997-2000