9.4. ITK Approximate Signed Distance Map Image Filter

Create a map of the approximate signed distance from the boundaries of a binary image.

Group (Subgroup)

ITKDistanceMap (DistanceMap)

Description

The ApproximateSignedDistanceMapImageFilter takes as input a binary image and produces a signed distance map. Each pixel value in the output contains the approximate distance from that pixel to the nearest “object” in the binary image. This filter differs from the DanielssonDistanceMapImageFilter in that it calculates the distance to the “object edge” for pixels within the object.

Negative values in the output indicate that the pixel at that position is within an object in the input image. The absolute value of a negative pixel represents the approximate distance to the nearest object boundary pixel.

WARNING: This filter requires that the output type be floating-point. Otherwise internal calculations will not be performed to the appropriate precision, resulting in completely incorrect (read: zero-valued) output.

The distances computed by this filter are Chamfer distances, which are only an approximation to Euclidean distances, and are not as exact approximations as those calculated by the DanielssonDistanceMapImageFilter . On the other hand, this filter is faster.

This filter requires that an “inside value” and “outside value” be set as parameters. The “inside value” is the intensity value of the binary image which corresponds to objects, and the “outside value” is the intensity of the background. (A typical binary image often represents objects as black (0) and background as white (usually 255), or vice-versa.) Note that this filter is slightly faster if the inside value is less than the outside value. Otherwise an extra iteration through the image is required.

This filter uses the FastChamferDistanceImageFilter and the IsoContourDistanceImageFilter internally to perform the distance calculations.

See Also

Author

  • Zach Pincus

Input Parameter(s)

Parameter Name

Parameter Type

Parameter Notes

Description

Inside Value

Scalar Value

Float64

Set/Get intensity value representing the interior of objects in the mask.

Outside Value

Scalar Value

Float64

Set/Get intensity value representing non-objects in the mask.

Input Cell Data

Parameter Name

Parameter Type

Parameter Notes

Description

Image Geometry

Geometry Selection

Image

Select the Image Geometry Group from the DataStructure.

Input Cell Data

Array Selection

Allowed Types: int8, uint8, int16, uint16, int32, uint32, int64, uint64

The image data that will be processed by this filter.

Output Cell Data

Parameter Name

Parameter Type

Parameter Notes

Description

Output Image Data Array

DataObjectName

The result of the processing will be stored in this Data Array.

Example Pipelines

DREAM3D Mailing Lists

If you need help, need to file a bug report or want to request a new feature, please head over to the DREAM3DNX-Issues GitHub site where the community of DREAM3D-NX users can help answer your questions.