Convert objects to image

Creates an image showing all objects in a specified collection.

Description

Creates an image showing all objects in a specified collection. The value (intensity) of each pixel can be based on object (or relative) ID numbers as well as various metrics, such as measurements or relationship counts. Output images will be 32-bit type, except when in "Random colour" or "Single colour" modes, which are 8-bit as the extra precision is not required.

Note: This output method is unable to correctly render overlapping objects (those with any matching coordinates); as such, the output image will show the result for one of objects for these coordinates.

Parameters

ParameterDescription
Input objectsObject collection to convert to an image. All objects will be rendered onto the same output image.
Output imageImage showing all objects in the input collection. Note: This output method is unable to correctly render overlapping objects (those with any matching coordinates); as such, the output image will show the result for one of objects for these coordinates.
Output modeControls what coordinates are used to represent each object.
  • "Object centroid" Only the pixel closest to the centroid (mean XYZ coordinate) of each object is added to the output image.
  • "Whole object" All coordinates of each object are added to the output image.
Colour modeMethod for assigning colour of each object:
  • "Child count" Colour is determined by the number of children each object has. Colour range runs across the first half of the visible spectrum (i.e. red to cyan) and is maximised, so the object with the fewest children is shown in red and the object with the most, in cyan. Objects without any children are always shown in red. Child objects used for counting are selected with the "Child objects for colour" parameter.
  • "ID" Colour is quasi-randomly selected based on the ID number of the object. The colour used for a specific ID number will always be the same and is calculated using the equation hue = (ID * 1048576 % 255) / 255.
  • "Measurement value" Colour is determined by a measurement value. Colour range runs across the first half of the visible spectrum (i.e. red to cyan) and is maximised, so the object with the smallest measurement is shown in red and the object with the largest, in cyan. Objects missing the relevant measurement are always shown in red. The measurement value is selected with the "Measurement for colour" parameter.
  • "Parent ID" Colour is quasi-randomly selected based on the ID number of a parent of this object. The colour used for a specific ID number will always be the same and is calculated using the equation hue = (ID * 1048576 % 255) / 255. The parent object is selected with the "Parent object for colour" parameter.
  • "Parent measurement value" Colour is determined by a measurement value of a parent of this object. Colour range runs across the first half of the visible spectrum (i.e. red to cyan) and is maximised, so the object with the smallest measurement is shown in red and the object with the largest, in cyan. Objects either missing the relevant measurement or without the relevant parent are always shown in red. The parent object is selected with the "Parent object for colour" parameter and the measurement value is selected with the "Measurement for colour" parameter.
  • "Partner count" Colour is determined by the number of partners each object has. Colour range runs across the first half of the visible spectrum (i.e. red to cyan) and is maximised, so the object with the fewest partners is shown in red and the object with the most, in cyan. Objects without any partners are always shown in red. Partner objects used for counting are selected with the "Partner objects for colour" parameter.
  • "Random colour" Colour is randomly selected for each object. Unlike the "ID" option, the colours generated here will be different for each evaluation of the module.
  • "Single colour" (default option) Colour is fixed to one of a predetermined list of colours. All objects will be assigned the same overlay colour. The colour is chosen using the "Single colour" parameter.
Single colour modeWhen "Colour mode" is set to "Single colour", the input objects will be converted to a binary image. This parameter controls if the output image will have the logic "Black objects, white background" or "White objects, black background".
Child objects for colourObject collection used to determine the colour based on number of children per object when "Colour mode" is set to "Child count". These objects will be children of the input objects.
MeasurementMeasurement used to determine the colour when "Colour mode" is set to either "Measurement value" or "Parent measurement value".
Parent object for colourObject collection used to determine the colour based on either the ID or measurement value of a parent object when "Colour mode" is set to either "Parent ID" or "Parent measurement value". These objects will be parents of the input objects.
Partner objects for colourObject collection used to determine the colour based on number of partners per object when "Colour mode" is set to "Partner count". These objects will be partners of the input objects.