Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkFastChamferDistanceImageFilter.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkFastChamferDistanceImageFilter.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/09/10 14:28:30 $ 00007 Version: $Revision: 1.4 $ 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 __itkFastChamferDistanceImageFilter_h 00018 #define __itkFastChamferDistanceImageFilter_h 00019 00020 #include <itkImageToImageFilter.h> 00021 #include <itkImageRegionIteratorWithIndex.h> 00022 #include <itkNarrowBand.h> 00023 00024 namespace itk 00025 { 00026 00054 template < class TInputImage, class TOutputImage > 00055 class ITK_EXPORT FastChamferDistanceImageFilter : 00056 public ImageToImageFilter<TInputImage,TOutputImage> 00057 { 00058 public: 00060 typedef FastChamferDistanceImageFilter 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( FastChamferDistanceImageFilter, ImageToImageFilter ); 00070 00072 typedef TInputImage InputImageType; 00073 00075 typedef typename InputImageType::RegionType RegionType; 00076 00078 typedef typename InputImageType::PixelType PixelType; 00079 00081 typedef typename RegionType::IndexType IndexType; 00082 00084 typedef typename InputImageType::OffsetType OffsetType; 00085 00087 typedef typename RegionType::SizeType SizeType; 00088 00090 itkStaticConstMacro(ImageDimension, unsigned int, 00091 InputImageType::ImageDimension); 00092 00094 typedef typename InputImageType::ConstPointer InputImagePointer; 00095 00097 typedef BandNode<IndexType,PixelType> BandNodeType; 00098 typedef NarrowBand<BandNodeType> NarrowBandType; 00099 typedef typename NarrowBandType::Pointer NarrowBandPointer; 00100 00101 00103 itkSetVectorMacro( Weights, float, ImageDimension); 00104 itkGetVectorMacro( Weights, const float, ImageDimension); 00105 00106 00108 itkSetMacro( MaximumDistance, float); 00109 itkGetMacro( MaximumDistance, float); 00110 00112 void SetRegionToProcess( const RegionType &r) 00113 { 00114 if ( m_RegionToProcess != r) 00115 { 00116 m_RegionToProcess = r; 00117 this->Modified(); 00118 } 00119 } 00120 RegionType GetRegionToProcess() const 00121 { 00122 return m_RegionToProcess; 00123 } 00124 00125 00126 void SetNarrowBand( NarrowBandType * ptr) 00127 { 00128 if ( m_NarrowBand != ptr ) 00129 { 00130 m_NarrowBand = ptr; 00131 this->Modified(); 00132 } 00133 } 00134 00135 NarrowBandPointer GetNarrowBand() const 00136 { return m_NarrowBand; } 00137 00138 protected: 00139 FastChamferDistanceImageFilter(); 00140 virtual ~FastChamferDistanceImageFilter() {}; 00141 void PrintSelf(std::ostream& os, Indent indent) const; 00142 00145 void GenerateDataND(); 00146 00148 void GenerateData(); 00149 00150 private: 00151 FastChamferDistanceImageFilter(const Self&); //purposely not implemented 00152 void operator=(const Self&); //purposely not implemented 00153 00154 float m_MaximumDistance; 00155 00157 float m_Weights[ImageDimension]; 00158 00159 NarrowBandPointer m_NarrowBand; 00160 00162 typename InputImageType::RegionType m_RegionToProcess; 00163 00164 00165 }; // end of FastChamferDistanceImageFilter class 00166 00167 } //end namespace itk 00168 00169 00170 #ifndef ITK_MANUAL_INSTANTIATION 00171 #include "itkFastChamferDistanceImageFilter.txx" 00172 #endif 00173 00174 #endif

Generated at Sat Mar 31 02:18:06 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000