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: 2004/03/07 02:00:51 $
00007   Version:   $Revision: 1.29 $
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 __itkDanielssonDistanceMapImageFilter_h
00018 #define __itkDanielssonDistanceMapImageFilter_h
00019 
00020 #include <itkImageToImageFilter.h>
00021 #include <itkImageRegionIteratorWithIndex.h>
00022 
00023 namespace itk
00024 {
00025 
00058 template <class TInputImage,class TOutputImage>
00059 class ITK_EXPORT DanielssonDistanceMapImageFilter :
00060     public ImageToImageFilter<TInputImage,TOutputImage>
00061 {
00062 public:
00064   typedef DanielssonDistanceMapImageFilter    Self;
00065   typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00066   typedef SmartPointer<Self> Pointer;
00067   typedef SmartPointer<const Self> ConstPointer;
00068 
00070   itkNewMacro(Self);
00071 
00073   itkTypeMacro( DanielssonDistanceMapImageFilter, ImageToImageFilter );
00074 
00076   typedef   TInputImage       InputImageType;
00077 
00080   typedef   TOutputImage      OutputImageType;
00081 
00083   typedef typename InputImageType::RegionType   RegionType;
00084 
00086   typedef typename RegionType::IndexType  IndexType;
00087 
00089   typedef typename InputImageType::OffsetType  OffsetType;
00090 
00092   typedef typename RegionType::SizeType   SizeType;
00093   
00095   itkStaticConstMacro(InputImageDimension, unsigned int,
00096                       InputImageType::ImageDimension);
00097 
00099   typedef Image< OffsetType,
00100                  itkGetStaticConstMacro(InputImageDimension)> VectorImageType;
00101 
00103   typedef typename InputImageType::ConstPointer InputImagePointer;
00104 
00106   typedef typename OutputImageType::Pointer OutputImagePointer;
00107 
00109   typedef typename VectorImageType::Pointer VectorImagePointer;
00110 
00112   itkSetMacro( SquaredDistance, bool );
00113 
00115   itkGetConstReferenceMacro( SquaredDistance, bool );
00116 
00118   itkBooleanMacro( SquaredDistance );
00119 
00125   itkSetMacro( InputIsBinary, bool );
00126 
00128   itkGetConstReferenceMacro( InputIsBinary, bool );
00129 
00131   itkBooleanMacro( InputIsBinary );
00132 
00134   itkSetMacro( UseImageSpacing, bool );
00135 
00137   itkGetConstReferenceMacro( UseImageSpacing, bool );
00138 
00140   itkBooleanMacro( UseImageSpacing );
00141 
00147   OutputImageType * GetVoronoiMap(void);
00148 
00157   OutputImageType * GetDistanceMap(void);
00158 
00160   VectorImageType * GetVectorDistanceMap(void);
00161 
00162 protected:
00163   DanielssonDistanceMapImageFilter();
00164   virtual ~DanielssonDistanceMapImageFilter() {};
00165   void PrintSelf(std::ostream& os, Indent indent) const;
00166 
00168   void GenerateData();  
00169 
00171   void PrepareData();  
00172 
00174   void ComputeVoronoiMap();  
00175 
00177   void UpdateLocalDistance(VectorImageType*,
00178                            const IndexType&,
00179                            const OffsetType&);
00180 
00181 private:   
00182   DanielssonDistanceMapImageFilter(const Self&); //purposely not implemented
00183   void operator=(const Self&); //purposely not implemented
00184 
00185   bool                  m_SquaredDistance;
00186   bool                  m_InputIsBinary;
00187   bool                  m_UseImageSpacing;
00188 
00189 }; // end of DanielssonDistanceMapImageFilter class
00190 
00191 } //end namespace itk
00192 
00193 
00194 #ifndef ITK_MANUAL_INSTANTIATION
00195 #include "itkDanielssonDistanceMapImageFilter.txx"
00196 #endif
00197 
00198 #endif

Generated at Wed May 24 23:01:50 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000