calculate-distance-map <input> <output> [options]


Computes distance transformation of binary object mask.



Binary object mask.


Distance transform.

Command options

-distance <name>

Name of the distance transform. (default: euclidean)

  • cityblock: Manhatten city block (L1) distance.
  • euclidean: Euclidean distance.
  • laplacian: Laplacian distance.

Euclidean distance transform options


Compute distance transform in 2D.


Compute distance transform in 3D. (default)


Compute radial distance transform. (default: off)


Compute radial distance transform in t dimension only.

-isotropic [<s>]

Resample distance transform to isotropic voxel size, where the voxel size is s times the minimum voxel size. When no argument given, s defaults to 1. (default: 0/off)

-outside <file>

Binary mask with non-zero values at voxels which are outside the region for which distance values are to be computed. Required by laplacian -distance, where it defines the boundary voxels with a maximum distance value of 1.

Standard options

-v, -verbose [n]

Increase/Set verbosity of output messages. (default: 0)

-debug [level]

Increase/Set debug level for output of intermediate results. (default: 0)

-version [major.minor]

Print version and exit or set version to emulate.


Print revision (or version) number only and exit.

-h, -help

Print help and exit.

Terminal options

-color, -nocolor

Enable/disable colored output. (default: off)

Parallelization options

-threads <n>

Use maximal <n> threads for parallel execution. (default: automatic)