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: 2006/05/24 12:44:48 $
00007   Version:   $Revision: 1.1 $
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   typedef typename InputImageType::PixelType   InputPixelType;
00094   typedef typename OutputImageType::PixelType  OutputPixelType;
00095 
00096   typedef typename InputImageType::SizeType    InputSizeType;
00097   typedef typename OutputImageType::SizeType   OutputSizeType;
00098 
00099   typedef typename InputImageType::IndexType   InputIndexType;
00100   typedef typename OutputImageType::IndexType  OutputIndexType;
00101 
00102   typedef typename InputImageType::SpacingType  InputSpacingType;
00103   typedef typename OutputImageType::SpacingType OutputSpacingType;
00104 
00106   itkSetMacro(SquaredDistance, bool);
00107 
00109   itkGetConstReferenceMacro(SquaredDistance, bool);
00110 
00112   itkBooleanMacro(SquaredDistance);
00113 
00116   itkSetMacro(InsideIsPositive, bool);
00117 
00120   itkGetConstReferenceMacro(InsideIsPositive, bool);
00121 
00125   itkBooleanMacro(InsideIsPositive);
00126 
00128   itkSetMacro(UseImageSpacing, bool);
00129 
00131   itkGetConstReferenceMacro(UseImageSpacing, bool);
00132 
00134   itkBooleanMacro(UseImageSpacing);
00135 
00140   itkSetMacro(BackgroundValue, InputPixelType);
00141   itkGetConstReferenceMacro(BackgroundValue, InputPixelType);
00143 
00144 protected:
00145 
00146   SignedMaurerDistanceMapImageFilter();
00147 
00148   virtual ~SignedMaurerDistanceMapImageFilter();
00149   
00150   void PrintSelf(std::ostream& os, Indent indent) const;
00151 
00152   void GenerateData();
00153 
00154   
00155 private:
00156 
00157   SignedMaurerDistanceMapImageFilter(const Self&); //purposely not implemented
00158   void operator=(const Self&); //purposely not implemented
00159   
00160   void Voronoi( unsigned int, OutputIndexType );
00161   bool Remove( OutputPixelType, OutputPixelType, OutputPixelType, 
00162                OutputPixelType, OutputPixelType, OutputPixelType );
00163   
00164   InputPixelType         m_BackgroundValue;  
00165   InputSpacingType       m_Spacing;
00166 
00167   bool     m_InsideIsPositive;
00168   bool     m_UseImageSpacing;
00169   bool     m_SquaredDistance;
00170 
00171 };
00172 
00173 } // end namespace itk
00174 
00175 #ifndef ITK_MANUAL_INSTANTIATION
00176 #include "itkSignedMaurerDistanceMapImageFilter.txx"
00177 #endif
00178 
00179 #endif
00180 

Generated at Sun Sep 23 14:15:59 2007 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000