00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkBinaryPruningImageFilter.h,v $ 00005 Language: C++ 00006 Date: $Date: 2005/01/28 15:08:54 $ 00007 Version: $Revision: 1.3 $ 00008 00009 Copyright (c) Insight Software Consortium. All rights reserved. 00010 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 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 { 00026 00054 template <class TInputImage,class TOutputImage> 00055 class ITK_EXPORT BinaryPruningImageFilter : 00056 public ImageToImageFilter<TInputImage,TOutputImage> 00057 { 00058 public: 00060 typedef BinaryPruningImageFilter Self; 00061 typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass; 00062 typedef SmartPointer<Self> Pointer; 00063 typedef SmartPointer<const Self> ConstPointer; 00064 00066 itkNewMacro(Self); 00067 00069 itkTypeMacro( BinaryPruningImageFilter, ImageToImageFilter ); 00070 00072 typedef TInputImage InputImageType; 00073 00075 typedef TOutputImage OutputImageType; 00076 00078 typedef typename InputImageType::RegionType RegionType; 00079 00081 typedef typename RegionType::IndexType IndexType; 00082 00084 typedef typename InputImageType::PixelType PixelType ; 00085 00087 typedef typename RegionType::SizeType SizeType; 00088 00090 typedef typename InputImageType::ConstPointer InputImagePointer; 00091 00093 typedef typename OutputImageType::Pointer OutputImagePointer; 00094 00096 typedef NeighborhoodIterator<TInputImage> NeighborhoodIteratorType ; 00097 00099 OutputImageType * GetPruning(void); 00100 00102 itkSetMacro(Iteration, unsigned int); 00103 itkGetMacro(Iteration, unsigned int); 00104 00105 00106 protected: 00107 BinaryPruningImageFilter(); 00108 virtual ~BinaryPruningImageFilter() {}; 00109 void PrintSelf(std::ostream& os, Indent indent) const; 00110 00112 void GenerateData(); 00113 00115 void PrepareData(); 00116 00118 void ComputePruneImage(); 00119 00120 00121 private: 00122 BinaryPruningImageFilter(const Self&); //purposely not implemented 00123 void operator=(const Self&); //purposely not implemented 00124 00125 unsigned int m_Iteration; 00126 00127 }; // end of BinaryThinningImageFilter class 00128 00129 } //end namespace itk 00130 00131 #ifndef ITK_MANUAL_INSTANTIATION 00132 #include "itkBinaryPruningImageFilter.txx" 00133 #endif 00134 00135 #endif