00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkApproximateSignedDistanceMapImageFilter_h
00018 #define __itkApproximateSignedDistanceMapImageFilter_h
00019
00020 #include "itkImageToImageFilter.h"
00021 #include "itkFastChamferDistanceImageFilter.h"
00022 #include "itkIsoContourDistanceImageFilter.h"
00023
00024 namespace itk {
00025
00066 template<class TInputImage, class TOutputImage>
00067 class ITK_EXPORT ApproximateSignedDistanceMapImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
00068 {
00069 public:
00071 typedef ApproximateSignedDistanceMapImageFilter Self;
00072 typedef ImageToImageFilter<TInputImage, TOutputImage> Superclass;
00073 typedef SmartPointer<Self> Pointer;
00074 typedef SmartPointer<const Self> ConstPointer;
00075
00077 itkTypeMacro(ApproximateSignedDistanceMapImageFilter, ImageToImageFilter) ;
00078
00080 itkNewMacro(Self) ;
00081
00083 typedef TInputImage InputImageType;
00084
00086 typedef TOutputImage OutputImageType;
00087
00089 typedef typename InputImageType::PixelType InputPixelType;
00090
00092 typedef typename OutputImageType::PixelType OutputPixelType;
00093
00095 typedef typename OutputImageType::SizeType OutputSizeType;
00096 typedef typename OutputSizeType::SizeValueType OutputSizeValueType;
00098 itkStaticConstMacro(InputImageDimension, unsigned int,
00099 InputImageType::ImageDimension);
00100
00102 typedef typename InputImageType::ConstPointer InputImagePointer;
00103
00105 typedef typename OutputImageType::Pointer OutputImagePointer;
00106
00108 itkSetMacro(InsideValue, InputPixelType);
00109 itkGetMacro(InsideValue, InputPixelType);
00110
00112 itkSetMacro(OutsideValue, InputPixelType);
00113 itkGetMacro(OutsideValue, InputPixelType);
00114
00115 protected:
00116 ApproximateSignedDistanceMapImageFilter();
00117 virtual ~ApproximateSignedDistanceMapImageFilter() {};
00118 virtual void GenerateData();
00119 void PrintSelf(std::ostream& os, Indent indent) const;
00120
00121
00122 private:
00123 ApproximateSignedDistanceMapImageFilter(const Self&);
00124 void operator=(const Self&);
00125
00126 typedef IsoContourDistanceImageFilter<InputImageType, OutputImageType> IsoContourType;
00127 typedef FastChamferDistanceImageFilter<OutputImageType, OutputImageType> ChamferType;
00128 typename IsoContourType::Pointer m_IsoContourFilter;
00129 typename ChamferType::Pointer m_ChamferFilter;
00130
00131 InputPixelType m_InsideValue;
00132 InputPixelType m_OutsideValue;
00133
00134 };
00135
00136 }
00137
00138 #ifndef ITK_MANUAL_INSTANTIATION
00139 #include "itkApproximateSignedDistanceMapImageFilter.txx"
00140 #endif
00141
00142 #endif