00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkGrayscaleMorphologicalOpeningImageFilter.h,v $ 00005 Language: C++ 00006 00007 Copyright (c) Insight Software Consortium. All rights reserved. 00008 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notices for more information. 00013 00014 =========================================================================*/ 00015 #ifndef __itkGrayscaleMorphologicalOpeningImageFilter_h 00016 #define __itkGrayscaleMorphologicalOpeningImageFilter_h 00017 00018 #include "itkImageToImageFilter.h" 00019 00020 namespace itk { 00021 00044 template<class TInputImage, class TOutputImage, class TKernel> 00045 class ITK_EXPORT GrayscaleMorphologicalOpeningImageFilter : 00046 public ImageToImageFilter<TInputImage, TOutputImage> 00047 { 00048 public: 00050 typedef GrayscaleMorphologicalOpeningImageFilter Self; 00051 typedef ImageToImageFilter<TInputImage, TOutputImage> Superclass; 00052 typedef SmartPointer<Self> Pointer; 00053 typedef SmartPointer<const Self> ConstPointer; 00054 00056 itkNewMacro(Self); 00057 00059 itkTypeMacro(GrayscaleMorphologicalOpeningImageFilter, 00060 ImageToImageFilter); 00061 00062 typedef TInputImage InputImageType; 00063 typedef TOutputImage OutputImageType; 00064 typedef typename InputImageType::Pointer InputImagePointer; 00065 typedef typename OutputImageType::RegionType OutputImageRegionType; 00066 00068 typedef typename TInputImage::PixelType PixelType ; 00069 00071 typedef TKernel KernelType; 00072 00074 itkSetMacro(Kernel, KernelType); 00075 00077 itkGetConstReferenceMacro(Kernel, KernelType); 00078 00079 protected: 00080 GrayscaleMorphologicalOpeningImageFilter(); 00081 ~GrayscaleMorphologicalOpeningImageFilter() {}; 00082 void PrintSelf(std::ostream& os, Indent indent) const; 00083 00087 void GenerateInputRequestedRegion() ; 00088 00090 void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output)); 00091 00094 void GenerateData (); 00095 00096 private: 00097 GrayscaleMorphologicalOpeningImageFilter(const Self&); //purposely not implemented 00098 void operator=(const Self&); //purposely not implemented 00099 00101 KernelType m_Kernel ; 00102 00103 } ; // end of class 00104 00105 } // end namespace itk 00106 00107 #ifndef ITK_MANUAL_INSTANTIATION 00108 #include "itkGrayscaleMorphologicalOpeningImageFilter.txx" 00109 #endif 00110 00111 #endif 00112 00113