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

itkGrayscaleMorphologicalOpeningImageFilter.h

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

Generated at Mon Jul 12 2010 18:29:27 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000