00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkBinaryThinningImageFilter_h
00018 #define __itkBinaryThinningImageFilter_h
00019
00020 #include <itkNeighborhoodIterator.h>
00021 #include <itkImageToImageFilter.h>
00022 #include <itkImageRegionIteratorWithIndex.h>
00023
00024 namespace itk
00025 {
00026
00055 template <class TInputImage,class TOutputImage>
00056 class ITK_EXPORT BinaryThinningImageFilter :
00057 public ImageToImageFilter<TInputImage,TOutputImage>
00058 {
00059 public:
00061 typedef BinaryThinningImageFilter Self;
00062 typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00063 typedef SmartPointer<Self> Pointer;
00064 typedef SmartPointer<const Self> ConstPointer;
00065
00067 itkNewMacro(Self);
00068
00070 itkTypeMacro( BinaryThinningImageFilter, ImageToImageFilter );
00071
00073 typedef TInputImage InputImageType;
00074
00076 typedef TOutputImage OutputImageType;
00077
00079 typedef typename InputImageType::RegionType RegionType;
00080
00082 typedef typename RegionType::IndexType IndexType;
00083
00085 typedef typename InputImageType::PixelType PixelType;
00086
00088 typedef typename RegionType::SizeType SizeType;
00089
00091 typedef typename InputImageType::ConstPointer InputImagePointer;
00092
00094 typedef typename OutputImageType::Pointer OutputImagePointer;
00095
00097 typedef typename Superclass::OutputImagePixelType OutputImagePixelType;
00098
00100 typedef NeighborhoodIterator<TInputImage> NeighborhoodIteratorType;
00101
00103 OutputImageType * GetThinning(void);
00104
00106 itkStaticConstMacro(InputImageDimension, unsigned int,
00107 TInputImage::ImageDimension );
00108 itkStaticConstMacro(OutputImageDimension, unsigned int,
00109 TOutputImage::ImageDimension );
00111
00112 #ifdef ITK_USE_CONCEPT_CHECKING
00113
00114 itkConceptMacro(SameDimensionCheck,
00115 (Concept::SameDimension<InputImageDimension, OutputImageDimension>));
00116 itkConceptMacro(InputAdditiveOperatorsCheck,
00117 (Concept::AdditiveOperators<PixelType>));
00118 itkConceptMacro(InputConvertibleToIntCheck,
00119 (Concept::Convertible<PixelType, int>));
00120 itkConceptMacro(IntConvertibleToInputCheck,
00121 (Concept::Convertible<int, PixelType>));
00122 itkConceptMacro(SameTypeCheck,
00123 (Concept::SameType<PixelType, typename TOutputImage::PixelType>));
00124 itkConceptMacro(InputIntComparableCheck,
00125 (Concept::Comparable<PixelType, int>));
00126
00128 #endif
00129
00130 protected:
00131 BinaryThinningImageFilter();
00132 virtual ~BinaryThinningImageFilter() {};
00133
00135 void GenerateData();
00136
00138 void PrepareData();
00139
00141 void ComputeThinImage();
00142
00143
00144 private:
00145 BinaryThinningImageFilter(const Self&);
00146 void operator=(const Self&);
00147
00148 };
00149
00150 }
00151
00152 #ifndef ITK_MANUAL_INSTANTIATION
00153 #include "itkBinaryThinningImageFilter.txx"
00154 #endif
00155
00156 #endif
00157