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: 2002/09/11 19:39:01 $
00007   Version:   $Revision: 1.19 $
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 
00076   typedef   TOutputImage      OutputImageType;
00077 
00079   typedef typename InputImageType::RegionType   RegionType;
00080 
00082   typedef typename RegionType::IndexType  IndexType;
00083 
00085   typedef typename InputImageType::OffsetType  OffsetType;
00086 
00088   typedef typename RegionType::SizeType   SizeType;
00089   
00091   itkStaticConstMacro(InputImageDimension, unsigned int,
00092                       InputImageType::ImageDimension);
00093 
00095   typedef Image< OffsetType, itkGetStaticConstMacro(InputImageDimension)> VectorImageType;
00096 
00098   typedef typename InputImageType::ConstPointer InputImagePointer;
00099 
00101   typedef typename OutputImageType::Pointer OutputImagePointer;
00102 
00104   typedef typename VectorImageType::Pointer VectorImagePointer;
00105 
00107   itkSetMacro( SquaredDistance, bool );
00108 
00110   itkGetConstReferenceMacro( SquaredDistance, bool );
00111 
00113   itkBooleanMacro( SquaredDistance );
00114 
00116    itkSetMacro( InputIsBinary, bool );
00117 
00119   itkGetConstReferenceMacro( InputIsBinary, bool );
00120 
00122   itkBooleanMacro( InputIsBinary );
00123 
00129   OutputImageType * GetVoronoiMap(void);
00130 
00139   OutputImageType * GetDistanceMap(void);
00140 
00142   VectorImageType * GetVectorDistanceMap(void);
00143 
00144 protected:
00145   DanielssonDistanceMapImageFilter();
00146   virtual ~DanielssonDistanceMapImageFilter() {};
00147   void PrintSelf(std::ostream& os, Indent indent) const;
00148 
00150   void GenerateData();  
00151 
00153   void PrepareData();  
00154 
00156   void ComputeVoronoiMap();  
00157 
00159   void UpdateLocalDistance(VectorImageType*,
00160                            const IndexType&,
00161                            const OffsetType&);
00162 
00163 private:   
00164   DanielssonDistanceMapImageFilter(const Self&); //purposely not implemented
00165   void operator=(const Self&); //purposely not implemented
00166 
00167   bool                  m_SquaredDistance;
00168   bool                  m_InputIsBinary;
00169 
00173   template <unsigned int VDimension>  
00174   class SquaredDistance
00175   {
00176   }; // end of SquaredDistance class
00177 
00178 }; // end of DanielssonDistanceMapImageFilter class
00179 
00180 } //end namespace itk
00181 
00182 
00183 #ifndef ITK_MANUAL_INSTANTIATION
00184 #include "itkDanielssonDistanceMapImageFilter.txx"
00185 #endif
00186 
00187 #endif

Generated at Wed Mar 12 01:12:52 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000