00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkBinaryThinningImageFilter.h,v $ 00005 Language: C++ 00006 Date: $Date: 2005/01/31 19:39:38 $ 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 __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 00102 00103 protected: 00104 BinaryThinningImageFilter(); 00105 virtual ~BinaryThinningImageFilter() {}; 00106 void PrintSelf(std::ostream& os, Indent indent) const; 00107 00109 void GenerateData(); 00110 00112 void PrepareData(); 00113 00115 void ComputeThinImage(); 00116 00117 00118 private: 00119 BinaryThinningImageFilter(const Self&); //purposely not implemented 00120 void operator=(const Self&); //purposely not implemented 00121 00122 }; // end of BinaryThinningImageFilter class 00123 00124 } //end namespace itk 00125 00126 #ifndef ITK_MANUAL_INSTANTIATION 00127 #include "itkBinaryThinningImageFilter.txx" 00128 #endif 00129 00130 #endif