itkHardConnectedComponentImageFilter.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 __itkHardConnectedComponentImageFilter_h
00018 #define __itkHardConnectedComponentImageFilter_h
00019
00020 #include "itkImageToImageFilter.h"
00021 #include "itkImage.h"
00022
00023 namespace itk
00050 template <class TInputImage, class TOutputImage>
00051 class ITK_EXPORT HardConnectedComponentImageFilter :
00052 public ImageToImageFilter< TInputImage, TOutputImage >
00053 {
00054 public:
00058 typedef HardConnectedComponentImageFilter Self;
00059 typedef ImageToImageFilter< TInputImage, TOutputImage > Superclass;
00060
00065 typedef typename TOutputImage::PixelType OutputPixelType;
00066 typedef typename TOutputImage::InternalPixelType OutputInternalPixelType;
00067 typedef typename TInputImage::PixelType InputPixelType;
00068 typedef typename TInputImage::InternalPixelType InputInternalPixelType;
00069 itkStaticConstMacro(InputImageDimension, unsigned int,
00070 TInputImage::ImageDimension);
00071 itkStaticConstMacro(ImageDimension, unsigned int,
00072 TOutputImage::ImageDimension);
00074
00078 typedef TInputImage InputImageType;
00079 typedef TOutputImage OutputImageType;
00080 typedef typename TInputImage::IndexType IndexType;
00081 typedef typename TInputImage::SizeType SizeType;
00082 typedef typename TOutputImage::RegionType RegionType;
00083 typedef std::list<IndexType> ListType;
00084
00088 typedef SmartPointer<Self> Pointer;
00089 typedef SmartPointer<const Self> ConstPointer;
00090
00094 itkTypeMacro(HardConnectedComponentImageFilter, ImageToImageFilter);
00095
00099 itkNewMacro(Self);
00100
00102 void SetObjectSeed( const IndexType &seed)
00103 {m_Seeds.push_front(seed);}
00104
00105 #ifdef ITK_USE_CONCEPT_CHECKING
00106
00107 itkConceptMacro(SameDimensionCheck,
00108 (Concept::SameDimension<InputImageDimension, ImageDimension>));
00109 itkConceptMacro(IntConvertibleToOutputCheck,
00110 (Concept::Convertible<int, OutputPixelType>));
00111 itkConceptMacro(UnsignedShortConvertibleToOutputCheck,
00112 (Concept::Convertible<unsigned short, OutputPixelType>));
00113 itkConceptMacro(OutputEqualityComparableCheck,
00114 (Concept::EqualityComparable<OutputPixelType>));
00115 itkConceptMacro(UnsignedCharConvertibleToOutputCheck,
00116 (Concept::Convertible<unsigned char, OutputPixelType>));
00117 itkConceptMacro(OutputIncrementDecrementOperatorsCheck,
00118 (Concept::IncrementDecrementOperators<OutputPixelType>));
00119
00121 #endif
00122
00123 protected:
00124 HardConnectedComponentImageFilter() {}
00125 virtual ~HardConnectedComponentImageFilter() {}
00126 HardConnectedComponentImageFilter(const Self&) {}
00127
00131 void GenerateData();
00132 void PrintSelf(std::ostream& os, Indent indent) const
00133 { Superclass::PrintSelf(os,indent); }
00135
00136
00137 private:
00138 ListType m_Seeds;
00139 };
00140
00141 }
00142
00143 #ifndef ITK_MANUAL_INSTANTIATION
00144 #include "itkHardConnectedComponentImageFilter.txx"
00145 #endif
00146
00147 #endif
00148