00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkConnectedComponentFunctorImageFilter_h
00018 #define __itkConnectedComponentFunctorImageFilter_h
00019
00020 #include "itkConnectedComponentImageFilter.h"
00021 #include "itkImage.h"
00022
00023 namespace itk
00024 {
00025
00053 template <class TInputImage, class TOutputImage, class TFunctor, class TMaskImage=TInputImage>
00054 class ITK_EXPORT ConnectedComponentFunctorImageFilter :
00055 public ConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage >
00056 {
00057 public:
00061 typedef ConnectedComponentFunctorImageFilter Self;
00062 typedef ConnectedComponentImageFilter< TInputImage, TOutputImage, TMaskImage > Superclass;
00063
00067 typedef typename Superclass::InputImagePointer InputImagePointer;
00068
00073 typedef typename TOutputImage::PixelType OutputPixelType;
00074 typedef typename TOutputImage::InternalPixelType OutputInternalPixelType;
00075 typedef typename TInputImage::PixelType InputPixelType;
00076 typedef typename TInputImage::InternalPixelType InputInternalPixelType;
00077 itkStaticConstMacro(ImageDimension, unsigned int,
00078 TOutputImage::ImageDimension);
00079
00083 typedef TFunctor FunctorType;
00084 typedef TInputImage InputImageType;
00085 typedef TMaskImage MaskImageType;
00086 typedef TOutputImage OutputImageType;
00087 typedef typename TInputImage::IndexType IndexType;
00088 typedef typename TInputImage::SizeType SizeType;
00089 typedef typename TOutputImage::RegionType RegionType;
00090 typedef std::list<IndexType> ListType;
00091
00092 typedef typename MaskImageType::Pointer MaskImagePointer;
00093
00097 typedef SmartPointer<Self> Pointer;
00098 typedef SmartPointer<const Self> ConstPointer;
00099
00103 itkTypeMacro(ConnectedComponentFunctorImageFilter, ImageToImageFilter);
00104
00108 itkNewMacro(Self);
00109
00114 FunctorType& GetFunctor() { return m_Functor; };
00115 const FunctorType& GetFunctor() const { return m_Functor; };
00116
00123 void SetFunctor(const FunctorType& functor)
00124 {
00125 m_Functor = functor;
00126 this->Modified();
00127 }
00128
00129 protected:
00130 ConnectedComponentFunctorImageFilter() {}
00131 virtual ~ConnectedComponentFunctorImageFilter() {}
00132 ConnectedComponentFunctorImageFilter(const Self&) {}
00133
00134 FunctorType m_Functor;
00135
00139 void GenerateData();
00140
00141 };
00142
00143 }
00144
00145 #ifndef ITK_MANUAL_INSTANTIATION
00146 #include "itkConnectedComponentFunctorImageFilter.txx"
00147 #endif
00148
00149 #endif