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 NeighborhoodIterator<TInputImage> NeighborhoodIteratorType ;
00098
00100 OutputImageType * GetThinning(void);
00101
00103 itkStaticConstMacro(InputImageDimension, unsigned int,
00104 TInputImage::ImageDimension );
00105 itkStaticConstMacro(OutputImageDimension, unsigned int,
00106 TOutputImage::ImageDimension );
00108
00109 #ifdef ITK_USE_CONCEPT_CHECKING
00110
00111 itkConceptMacro(SameDimensionCheck,
00112 (Concept::SameDimension<InputImageDimension, OutputImageDimension>));
00113 itkConceptMacro(InputAdditiveOperatorsCheck,
00114 (Concept::AdditiveOperators<PixelType>));
00115 itkConceptMacro(InputConvertibleToIntCheck,
00116 (Concept::Convertible<PixelType, int>));
00117 itkConceptMacro(IntConvertibleToInputCheck,
00118 (Concept::Convertible<int, PixelType>));
00119 itkConceptMacro(SameTypeCheck,
00120 (Concept::SameType<PixelType, typename TOutputImage::PixelType>));
00121 itkConceptMacro(InputIntComparableCheck,
00122 (Concept::Comparable<PixelType, int>));
00123
00125 #endif
00126
00127 protected:
00128 BinaryThinningImageFilter();
00129 virtual ~BinaryThinningImageFilter() {};
00130 void PrintSelf(std::ostream& os, Indent indent) const;
00131
00133 void GenerateData();
00134
00136 void PrepareData();
00137
00139 void ComputeThinImage();
00140
00141
00142 private:
00143 BinaryThinningImageFilter(const Self&);
00144 void operator=(const Self&);
00145
00146 };
00147
00148 }
00149
00150 #ifndef ITK_MANUAL_INSTANTIATION
00151 #include "itkBinaryThinningImageFilter.txx"
00152 #endif
00153
00154 #endif
00155