Create distance map

Creates a distance map for a selected object set.

Description

Creates a distance map for a selected object set. Pixels in the output image are encoded with the distance to the nearest image edge or centroid (depending on setting). A single distance map image is created for all objects in the specified set. Uses the plugin "MorphoLibJ".

Parameters

ParameterDescription
Input objectsObjects from workspace for which distance map will be created. A single distance map will be created for all objects.
Output imageOutput distance map image which will be added to the workspace. This will contain the distance map for each object.
Reference modeControls where the distances are calculated from:
  • "Distance from object centroid" Each pixel is encoded with the distance from the centre of the respective object.
  • "Distance from object edge" Each pixel is encoded with the distance from the edge of the respective object.
Invert map within objectsWhen selected (and "Reference mode" is set to "Distance from object edge"), the distance map will be inverted, such that the distances inside objects are also positive. If not selected, the distances inside objects will be negative. Distance values outside objects are always positive.
Masking modeControls which regions of the image are displayed:
  • "Inside and outside" Distances both inside and outside the objects are non-zero.
  • "Inside only" Distances are shown inside each object, but are set to zero for all pixels outside an object.
  • "Outside only" Distances are shown outside each object, but are set to zero for all pixels inside an object.
Normalise map per objectWhen selected, the distance values inside each object are normalised to the range 0-1. Normalisation is performed on an object-by-object basis, so the absolute distance values cannot be directly compared between objects.
Spatial units modeControls whether spatial values are assumed to be specified in calibrated units (as defined by the "Input control" parameter "Spatial unit") or pixel units.