Back to FabImage Studio website

You are here: Start » Filter Reference » Region » Region Features » RegionDiameter


Module: FoundationBasic

Computes the longest segment connecting two pixels contained in region and its length.

Name Type Description
Input value inRegion Region Input region
Output value outDiameter Segment2D
Output value outDiameterLength Real


The operation finds the most distant pair of region pixels and returns the distance between them (outDiameterLength) and the segment representing the diameter (outDiameter). If there is more than one pair of maximal distance, the returned segment will correspond to one of them. The orientation of the resulting outDiameter is always between 0 and 180 degrees.


  • If the input region is not guaranteed to be non-empty, precede this filter with SkipEmptyRegion.


The resulting outDiameterLength = 276.4815, outDiameter segment was drawn onto the region.


This filter can throw an exception to report error. Read how to deal with errors in Error Handling.

List of possible exceptions:

Error type Description
DomainError Empty region on input in RegionDiameter.

Complexity Level

This filter is available on Basic Complexity Level.

See Also

  • PathDiameter – Finds the longest segment connecting two characteristic points of a path.