itkApproximateSignedDistanceMapImageFilter.h
Go to the documentation of this file.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;
00097
00099 itkStaticConstMacro(InputImageDimension, unsigned int,
00100 InputImageType::ImageDimension);
00101
00103 typedef typename InputImageType::ConstPointer InputImagePointer;
00104
00106 typedef typename OutputImageType::Pointer OutputImagePointer;
00107
00109 itkSetMacro(InsideValue, InputPixelType);
00110 itkGetMacro(InsideValue, InputPixelType);
00112
00114 itkSetMacro(OutsideValue, InputPixelType);
00115 itkGetMacro(OutsideValue, InputPixelType);
00117
00118 #ifdef ITK_USE_CONCEPT_CHECKING
00119
00120 itkConceptMacro(InputEqualityComparableCheck,
00121 (Concept::EqualityComparable<typename InputImageType::PixelType>));
00122
00124 #endif
00125
00126 protected:
00127 ApproximateSignedDistanceMapImageFilter();
00128 virtual ~ApproximateSignedDistanceMapImageFilter() {};
00129 virtual void GenerateData();
00130 void PrintSelf(std::ostream& os, Indent indent) const;
00131
00132
00133 private:
00134 ApproximateSignedDistanceMapImageFilter(const Self&);
00135 void operator=(const Self&);
00136
00137 typedef IsoContourDistanceImageFilter<InputImageType, OutputImageType> IsoContourType;
00138 typedef FastChamferDistanceImageFilter<OutputImageType, OutputImageType> ChamferType;
00139 typename IsoContourType::Pointer m_IsoContourFilter;
00140 typename ChamferType::Pointer m_ChamferFilter;
00141
00142 InputPixelType m_InsideValue;
00143 InputPixelType m_OutsideValue;
00144
00145 };
00146
00147 }
00148
00149 #ifndef ITK_MANUAL_INSTANTIATION
00150 #include "itkApproximateSignedDistanceMapImageFilter.txx"
00151 #endif
00152
00153 #endif
00154