00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkConnectedClosingImageFilter_h
00018 #define __itkConnectedClosingImageFilter_h
00019
00020 #include "itkImageToImageFilter.h"
00021
00022 namespace itk {
00023
00042 template<class TInputImage, class TOutputImage>
00043 class ITK_EXPORT GrayscaleConnectedClosingImageFilter :
00044 public ImageToImageFilter<TInputImage, TOutputImage>
00045 {
00046 public:
00048 typedef GrayscaleConnectedClosingImageFilter Self;
00049 typedef ImageToImageFilter<TInputImage, TOutputImage>
00050 Superclass;
00051 typedef SmartPointer<Self> Pointer;
00052 typedef SmartPointer<const Self> ConstPointer;
00053
00055 typedef TInputImage InputImageType;
00056 typedef TOutputImage OutputImageType;
00057 typedef typename InputImageType::Pointer InputImagePointer;
00058 typedef typename InputImageType::ConstPointer InputImageConstPointer;
00059 typedef typename InputImageType::RegionType InputImageRegionType;
00060 typedef typename InputImageType::PixelType InputImagePixelType;
00061 typedef typename InputImageRegionType::IndexType InputImageIndexType;
00062 typedef typename OutputImageType::Pointer OutputImagePointer;
00063 typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
00064 typedef typename OutputImageType::RegionType OutputImageRegionType;
00065 typedef typename OutputImageType::PixelType OutputImagePixelType;
00066
00068 itkStaticConstMacro(InputImageDimension, unsigned int,
00069 TInputImage::ImageDimension);
00070 itkStaticConstMacro(OutputImageDimension, unsigned int,
00071 TOutputImage::ImageDimension);
00072
00074 itkNewMacro(Self);
00075
00077 itkTypeMacro(GrayscaleConnectedClosingImageFilter,
00078 ImageToImageFilter);
00079
00081 itkSetMacro(Seed, InputImageIndexType);
00082 itkGetMacro(Seed, InputImageIndexType);
00083
00088 unsigned long GetNumberOfIterationsUsed()
00089 { itkLegacyBody(itk::GrayscaleConnectedClosingImageFilter::GetNumberOfIterationsUsed, 2.2);
00090 return m_NumberOfIterationsUsed; };
00091
00098 itkSetMacro(FullyConnected, bool);
00099 itkGetConstReferenceMacro(FullyConnected, bool);
00100 itkBooleanMacro(FullyConnected);
00101
00102 protected:
00103 GrayscaleConnectedClosingImageFilter();
00104 ~GrayscaleConnectedClosingImageFilter() {};
00105 void PrintSelf(std::ostream& os, Indent indent) const;
00106
00110 void GenerateInputRequestedRegion() ;
00111
00113 void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output));
00114
00117 void GenerateData();
00118
00119
00120 private:
00121 GrayscaleConnectedClosingImageFilter(const Self&);
00122 void operator=(const Self&);
00123
00124 unsigned long m_NumberOfIterationsUsed;
00125 InputImageIndexType m_Seed;
00126
00127 bool m_FullyConnected;
00128 } ;
00129
00130 }
00131
00132 #ifndef ITK_MANUAL_INSTANTIATION
00133 #include "itkGrayscaleConnectedClosingImageFilter.txx"
00134 #endif
00135
00136 #endif
00137
00138