3
3
Program: Insight Segmentation & Registration Toolkit
4
4
Module: $RCSfile: itkSignedDanielssonDistanceMapImageFilter.h,v $
6
Date: $Date: 2006-03-30 15:36:25 $
7
Version: $Revision: 1.4 $
6
Date: $Date: 2008-10-17 20:49:56 $
7
Version: $Revision: 1.5 $
9
9
Copyright (c) Insight Software Consortium. All rights reserved.
10
10
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
25
25
//Simple functor to invert an image for Outside Danielsson distance map
30
template <class InputPixelType> class InvertIntensityFunctor
33
InputPixelType operator()( InputPixelType input )
37
return NumericTraits<InputPixelType>::Zero;
41
return NumericTraits<InputPixelType>::One;
30
template <class InputPixelType> class InvertIntensityFunctor
33
InputPixelType operator()( InputPixelType input )
37
return NumericTraits<InputPixelType>::Zero;
41
return NumericTraits<InputPixelType>::One;
52
52
/** \class SignedDanielssonDistanceMapImageFilter
54
* This class is parametrized over the type of the input image
55
* and the type of the output image.
57
* This filter computes the distance map of the input image
58
* as an approximation with pixel accuracy to the Euclidean distance.
60
* For purposes of evaluating the signed distance map, the input is assumed
61
* to be binary composed of pixels with value 0 and non-zero.
63
* The inside is considered as having negative distances. Outside is treated
64
* as having positive distances. To change the convention,
65
* use the InsideIsPositive(bool) function.
67
* As a convention, the distance is evaluated from the boundary of the ON pixels.
70
* - A signed distance map with the approximation to the euclidean distance.
71
* - A voronoi partition. (See itkDanielssonDistanceMapImageFilter)
72
* - A vector map containing the component of the vector relating
73
* the current pixel with the closest point of the closest object
74
* to this pixel. Given that the components of the distance are
75
* computed in "pixels", the vector is represented by an
76
* itk::Offset. That is, physical coordinates are not used.
77
* (See itkDanielssonDistanceMapImageFilter)
79
* This filter internally uses the DanielssonDistanceMap filter.
80
* This filter is N-dimensional.
82
* \sa itkDanielssonDistanceMapImageFilter
84
* \ingroup ImageFeatureExtraction
54
* This class is parametrized over the type of the input image
55
* and the type of the output image.
57
* This filter computes the distance map of the input image
58
* as an approximation with pixel accuracy to the Euclidean distance.
60
* For purposes of evaluating the signed distance map, the input is assumed
61
* to be binary composed of pixels with value 0 and non-zero.
63
* The inside is considered as having negative distances. Outside is treated
64
* as having positive distances. To change the convention,
65
* use the InsideIsPositive(bool) function.
67
* As a convention, the distance is evaluated from the boundary of the ON pixels.
70
* - A signed distance map with the approximation to the euclidean distance.
71
* - A voronoi partition. (See itkDanielssonDistanceMapImageFilter)
72
* - A vector map containing the component of the vector relating
73
* the current pixel with the closest point of the closest object
74
* to this pixel. Given that the components of the distance are
75
* computed in "pixels", the vector is represented by an
76
* itk::Offset. That is, physical coordinates are not used.
77
* (See itkDanielssonDistanceMapImageFilter)
79
* This filter internally uses the DanielssonDistanceMap filter.
80
* This filter is N-dimensional.
82
* \sa itkDanielssonDistanceMapImageFilter
84
* \ingroup ImageFeatureExtraction
88
88
template <class TInputImage,class TOutputImage>
89
89
class ITK_EXPORT SignedDanielssonDistanceMapImageFilter :
93
93
/** Standard class typedefs. */
94
typedef SignedDanielssonDistanceMapImageFilter Self;
94
typedef SignedDanielssonDistanceMapImageFilter Self;
95
95
typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
96
typedef SmartPointer<Self> Pointer;
97
typedef SmartPointer<const Self> ConstPointer;
96
typedef SmartPointer<Self> Pointer;
97
typedef SmartPointer<const Self> ConstPointer;
99
99
/** Method for creation through the object factory */
100
100
itkNewMacro(Self);