00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkBinaryPruningImageFilter_h
00018 #define __itkBinaryPruningImageFilter_h
00019
00020 #include <itkImageToImageFilter.h>
00021 #include <itkImageRegionIteratorWithIndex.h>
00022 #include <itkNeighborhoodIterator.h>
00023
00024 namespace itk
00025 {
00051 template <class TInputImage,class TOutputImage>
00052 class ITK_EXPORT BinaryPruningImageFilter :
00053 public ImageToImageFilter<TInputImage,TOutputImage>
00054 {
00055 public:
00057 typedef BinaryPruningImageFilter Self;
00058 typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00059 typedef SmartPointer<Self> Pointer;
00060 typedef SmartPointer<const Self> ConstPointer;
00061
00063 itkNewMacro(Self);
00064
00066 itkTypeMacro( BinaryPruningImageFilter, ImageToImageFilter );
00067
00069 typedef TInputImage InputImageType;
00070
00072 typedef TOutputImage OutputImageType;
00073
00075 typedef typename InputImageType::RegionType RegionType;
00076
00078 typedef typename RegionType::IndexType IndexType;
00079
00081 typedef typename InputImageType::PixelType PixelType ;
00082
00084 typedef typename RegionType::SizeType SizeType;
00085
00087 typedef typename InputImageType::ConstPointer InputImagePointer;
00088
00090 typedef typename OutputImageType::Pointer OutputImagePointer;
00091
00093 typedef NeighborhoodIterator<TInputImage> NeighborhoodIteratorType ;
00094
00096 OutputImageType * GetPruning(void);
00097
00099 itkSetMacro(Iteration, unsigned int);
00100 itkGetMacro(Iteration, unsigned int);
00102
00104 itkStaticConstMacro(InputImageDimension, unsigned int,
00105 TInputImage::ImageDimension );
00106 itkStaticConstMacro(OutputImageDimension, unsigned int,
00107 TOutputImage::ImageDimension );
00109
00110 #ifdef ITK_USE_CONCEPT_CHECKING
00111
00112 itkConceptMacro(SameDimensionCheck,
00113 (Concept::SameDimension<InputImageDimension, OutputImageDimension>));
00114 itkConceptMacro(SameTypeCheck,
00115 (Concept::SameType<PixelType, typename TOutputImage::PixelType>));
00116 itkConceptMacro(AdditiveOperatorsCheck,
00117 (Concept::AdditiveOperators<PixelType>));
00118 itkConceptMacro(IntConvertibleToPixelTypeCheck,
00119 (Concept::Convertible<int, PixelType>));
00120 itkConceptMacro(PixelLessThanIntCheck,
00121 (Concept::LessThanComparable<PixelType, int>));
00122
00124 #endif
00125
00126 protected:
00127 BinaryPruningImageFilter();
00128 virtual ~BinaryPruningImageFilter() {};
00129 void PrintSelf(std::ostream& os, Indent indent) const;
00130
00132 void GenerateData();
00133
00135 void PrepareData();
00136
00138 void ComputePruneImage();
00139
00140
00141 private:
00142 BinaryPruningImageFilter(const Self&);
00143 void operator=(const Self&);
00144
00145 unsigned int m_Iteration;
00146
00147 };
00148
00149 }
00150
00151 #ifndef ITK_MANUAL_INSTANTIATION
00152 #include "itkBinaryPruningImageFilter.txx"
00153 #endif
00154
00155 #endif
00156