itkGrayscaleMorphologicalOpeningImageFilter.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkGrayscaleMorphologicalOpeningImageFilter_h
00018 #define __itkGrayscaleMorphologicalOpeningImageFilter_h
00019
00020
00021
00022
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
00107 #ifdef ITK_USE_CONCEPT_CHECKING
00108
00109 itkConceptMacro(SameTypeCheck,
00110 (Concept::SameType<PixelType, typename TOutputImage::PixelType>));
00111 itkConceptMacro(SameDimensionCheck1,
00112 (Concept::SameDimension<InputImageDimension, OutputImageDimension>));
00113 itkConceptMacro(SameDimensionCheck2,
00114 (Concept::SameDimension<InputImageDimension, KernelDimension>));
00115 itkConceptMacro(InputLessThanComparableCheck,
00116 (Concept::LessThanComparable<PixelType>));
00117 itkConceptMacro(InputGreaterThanComparableCheck,
00118 (Concept::GreaterThanComparable<PixelType>));
00119 itkConceptMacro(KernelGreaterThanIntCheck,
00120 (Concept::GreaterThanComparable<typename TKernel::PixelType, int>));
00121
00123 #endif
00124
00125 protected:
00126 GrayscaleMorphologicalOpeningImageFilter();
00127 ~GrayscaleMorphologicalOpeningImageFilter() {};
00128 void PrintSelf(std::ostream& os, Indent indent) const;
00129
00133 void GenerateInputRequestedRegion();
00134
00136 void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output));
00137
00140 void GenerateData ();
00141
00142 private:
00143 GrayscaleMorphologicalOpeningImageFilter(const Self&);
00144 void operator=(const Self&);
00145
00147 KernelType m_Kernel;
00148
00149 bool m_SafeBorder;
00150
00151 };
00152
00153 }
00154
00155 #ifndef ITK_MANUAL_INSTANTIATION
00156 #include "itkGrayscaleMorphologicalOpeningImageFilter.txx"
00157 #endif
00158
00159 #endif
00160
00161 #endif
00162