00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkConnectedOpeningImageFilter_h
00018 #define __itkConnectedOpeningImageFilter_h
00019
00020 #include "itkImageToImageFilter.h"
00021
00022 namespace itk {
00023
00043 template<class TInputImage, class TOutputImage>
00044 class ITK_EXPORT GrayscaleConnectedOpeningImageFilter :
00045 public ImageToImageFilter<TInputImage, TOutputImage>
00046 {
00047 public:
00049 typedef GrayscaleConnectedOpeningImageFilter Self;
00050 typedef ImageToImageFilter<TInputImage, TOutputImage>
00051 Superclass;
00052 typedef SmartPointer<Self> Pointer;
00053 typedef SmartPointer<const Self> ConstPointer;
00054
00056 typedef TInputImage InputImageType;
00057 typedef TOutputImage OutputImageType;
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 typedef typename InputImageRegionType::IndexType InputImageIndexType;
00063 typedef typename OutputImageType::Pointer OutputImagePointer;
00064 typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
00065 typedef typename OutputImageType::RegionType OutputImageRegionType;
00066 typedef typename OutputImageType::PixelType OutputImagePixelType;
00067
00069 itkStaticConstMacro(InputImageDimension, unsigned int,
00070 TInputImage::ImageDimension);
00071 itkStaticConstMacro(OutputImageDimension, unsigned int,
00072 TOutputImage::ImageDimension);
00073
00075 itkNewMacro(Self);
00076
00078 itkTypeMacro(GrayscaleConnectedOpeningImageFilter,
00079 ImageToImageFilter);
00080
00082 itkSetMacro(Seed, InputImageIndexType);
00083 itkGetMacro(Seed, InputImageIndexType);
00084
00089 unsigned long GetNumberOfIterationsUsed()
00090 { itkLegacyBody(itk::GrayscaleConnectedOpeningImageFilter::GetNumberOfIterationsUsed, 2.2);
00091 return m_NumberOfIterationsUsed; };
00092
00099 itkSetMacro(FullyConnected, bool);
00100 itkGetConstReferenceMacro(FullyConnected, bool);
00101 itkBooleanMacro(FullyConnected);
00102
00103 protected:
00104 GrayscaleConnectedOpeningImageFilter();
00105 ~GrayscaleConnectedOpeningImageFilter() {};
00106 void PrintSelf(std::ostream& os, Indent indent) const;
00107
00111 void GenerateInputRequestedRegion() ;
00112
00114 void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output));
00115
00118 void GenerateData();
00119
00120
00121 private:
00122 GrayscaleConnectedOpeningImageFilter(const Self&);
00123 void operator=(const Self&);
00124
00125 unsigned long m_NumberOfIterationsUsed;
00126 InputImageIndexType m_Seed;
00127
00128 bool m_FullyConnected;
00129
00130 } ;
00131
00132 }
00133
00134 #ifndef ITK_MANUAL_INSTANTIATION
00135 #include "itkGrayscaleConnectedOpeningImageFilter.txx"
00136 #endif
00137
00138 #endif
00139
00140