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

itkSignedMaurerDistanceMapImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkSignedMaurerDistanceMapImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2007/09/27 11:36:41 $
00007   Version:   $Revision: 1.2 $
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 __itkSignedMaurerDistanceMapImageFilter_h
00018 #define __itkSignedMaurerDistanceMapImageFilter_h
00019 
00020 #include "itkImage.h"
00021 #include "itkImageToImageFilter.h"
00022 
00059 namespace itk
00060 {
00061 
00062 template <class TInputImage, class TOutputImage>
00063 class SignedMaurerDistanceMapImageFilter :
00064     public ImageToImageFilter< TInputImage, TOutputImage >
00065 {
00066 public:
00067 
00069   itkStaticConstMacro(InputImageDimension, unsigned int,
00070                       TInputImage::ImageDimension);
00071   itkStaticConstMacro(OutputImageDimension, unsigned int,
00072                       TOutputImage::ImageDimension);
00074 
00075 
00077   typedef TInputImage    InputImageType;
00078   typedef TOutputImage   OutputImageType;
00079 
00081   typedef SignedMaurerDistanceMapImageFilter   Self;
00082   typedef ImageToImageFilter<
00083                        InputImageType, 
00084                        OutputImageType>        Superclass;
00085 
00086   typedef SmartPointer<Self>                   Pointer;
00087   typedef SmartPointer<const Self>             ConstPointer;
00088 
00090   itkNewMacro(Self);
00091 
00093   itkTypeMacro(SignedMaurerDistanceMapImageFilter, 
00094                ImageToImageFilter);
00095 
00097   typedef typename InputImageType::PixelType   InputPixelType;
00098   typedef typename OutputImageType::PixelType  OutputPixelType;
00099 
00100   typedef typename InputImageType::SizeType    InputSizeType;
00101   typedef typename OutputImageType::SizeType   OutputSizeType;
00102 
00103   typedef typename InputImageType::IndexType   InputIndexType;
00104   typedef typename OutputImageType::IndexType  OutputIndexType;
00105 
00106   typedef typename InputImageType::SpacingType  InputSpacingType;
00107   typedef typename OutputImageType::SpacingType OutputSpacingType;
00108 
00110   itkSetMacro(SquaredDistance, bool);
00111 
00113   itkGetConstReferenceMacro(SquaredDistance, bool);
00114 
00116   itkBooleanMacro(SquaredDistance);
00117 
00120   itkSetMacro(InsideIsPositive, bool);
00121 
00124   itkGetConstReferenceMacro(InsideIsPositive, bool);
00125 
00129   itkBooleanMacro(InsideIsPositive);
00130 
00132   itkSetMacro(UseImageSpacing, bool);
00133 
00135   itkGetConstReferenceMacro(UseImageSpacing, bool);
00136 
00138   itkBooleanMacro(UseImageSpacing);
00139 
00144   itkSetMacro(BackgroundValue, InputPixelType);
00145   itkGetConstReferenceMacro(BackgroundValue, InputPixelType);
00147 
00148 protected:
00149 
00150   SignedMaurerDistanceMapImageFilter();
00151 
00152   virtual ~SignedMaurerDistanceMapImageFilter();
00153   
00154   void PrintSelf(std::ostream& os, Indent indent) const;
00155 
00156   void GenerateData();
00157 
00158   
00159 private:
00160 
00161   SignedMaurerDistanceMapImageFilter(const Self&); //purposely not implemented
00162   void operator=(const Self&); //purposely not implemented
00163   
00164   void Voronoi( unsigned int, OutputIndexType );
00165   bool Remove( OutputPixelType, OutputPixelType, OutputPixelType, 
00166                OutputPixelType, OutputPixelType, OutputPixelType );
00167   
00168   InputPixelType         m_BackgroundValue;  
00169   InputSpacingType       m_Spacing;
00170 
00171   bool     m_InsideIsPositive;
00172   bool     m_UseImageSpacing;
00173   bool     m_SquaredDistance;
00174 
00175 };
00176 
00177 } // end namespace itk
00178 
00179 #ifndef ITK_MANUAL_INSTANTIATION
00180 #include "itkSignedMaurerDistanceMapImageFilter.txx"
00181 #endif
00182 
00183 #endif
00184 

Generated at Tue Jul 29 22:24:30 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000