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

itkDanielssonDistanceMapImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkDanielssonDistanceMapImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2003/02/25 21:18:41 $
00007   Version:   $Revision: 1.20 $
00008 
00009   Copyright (c) 2002 Insight 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 __itkDanielssonDistanceMapImageFilter_h
00018 #define __itkDanielssonDistanceMapImageFilter_h
00019 
00020 #include <itkImageToImageFilter.h>
00021 #include <itkImageRegionIteratorWithIndex.h>
00022 
00023 namespace itk
00024 {
00025 
00055 template <class TInputImage,class TOutputImage>
00056 class ITK_EXPORT DanielssonDistanceMapImageFilter :
00057                  public ImageToImageFilter<TInputImage,TOutputImage>
00058 {
00059 public:
00061   typedef   DanielssonDistanceMapImageFilter    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( DanielssonDistanceMapImageFilter, ImageToImageFilter );
00071 
00073   typedef   TInputImage       InputImageType;
00074 
00077   typedef   TOutputImage      OutputImageType;
00078 
00080   typedef typename InputImageType::RegionType   RegionType;
00081 
00083   typedef typename RegionType::IndexType  IndexType;
00084 
00086   typedef typename InputImageType::OffsetType  OffsetType;
00087 
00089   typedef typename RegionType::SizeType   SizeType;
00090   
00092   itkStaticConstMacro(InputImageDimension, unsigned int,
00093                       InputImageType::ImageDimension);
00094 
00096   typedef Image< OffsetType, itkGetStaticConstMacro(InputImageDimension)> VectorImageType;
00097 
00099   typedef typename InputImageType::ConstPointer InputImagePointer;
00100 
00102   typedef typename OutputImageType::Pointer OutputImagePointer;
00103 
00105   typedef typename VectorImageType::Pointer VectorImagePointer;
00106 
00108   itkSetMacro( SquaredDistance, bool );
00109 
00111   itkGetConstReferenceMacro( SquaredDistance, bool );
00112 
00114   itkBooleanMacro( SquaredDistance );
00115 
00117    itkSetMacro( InputIsBinary, bool );
00118 
00120   itkGetConstReferenceMacro( InputIsBinary, bool );
00121 
00123   itkBooleanMacro( InputIsBinary );
00124 
00130   OutputImageType * GetVoronoiMap(void);
00131 
00140   OutputImageType * GetDistanceMap(void);
00141 
00143   VectorImageType * GetVectorDistanceMap(void);
00144 
00145 protected:
00146   DanielssonDistanceMapImageFilter();
00147   virtual ~DanielssonDistanceMapImageFilter() {};
00148   void PrintSelf(std::ostream& os, Indent indent) const;
00149 
00151   void GenerateData();  
00152 
00154   void PrepareData();  
00155 
00157   void ComputeVoronoiMap();  
00158 
00160   void UpdateLocalDistance(VectorImageType*,
00161                            const IndexType&,
00162                            const OffsetType&);
00163 
00164 private:   
00165   DanielssonDistanceMapImageFilter(const Self&); //purposely not implemented
00166   void operator=(const Self&); //purposely not implemented
00167 
00168   bool                  m_SquaredDistance;
00169   bool                  m_InputIsBinary;
00170 
00174   template <unsigned int VDimension>  
00175   class SquaredDistance
00176   {
00177   }; // end of SquaredDistance class
00178 
00179 }; // end of DanielssonDistanceMapImageFilter class
00180 
00181 } //end namespace itk
00182 
00183 
00184 #ifndef ITK_MANUAL_INSTANTIATION
00185 #include "itkDanielssonDistanceMapImageFilter.txx"
00186 #endif
00187 
00188 #endif

Generated at Fri May 21 01:14:36 2004 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000