Back to FabImage Studio website

You are here: Start » Filter Reference » Region » Region Metrics » RegionToRegionDistance

RegionToRegionDistance


Module: FoundationBasic

Computes minimal distance between one of the points of the first region with one of the points of the second region.

Name Type Range Description
Input value inRegion1 Region First input region
Input value inRegion2 Region Second input region
Input value inResolution Real 0.0 - Number of real-world units per one pixel
Output value outDistance Real
Output value outConnectingSegment Segment2D

Description

Operation computes length of the shortest segment that connects center of one of inRegion1's point which center of one of inRegion2's point.

Examples

RegionToRegionDistance performed on sample regions produced outDistance = 118,5116. The shortest segment connecting regions is presented on the bottom image

Remarks

  • inRegion1 and inRegion2 must not be empty, otherwise an error with appropriate description occurs.

Errors

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 RegionToRegionDistance.

Complexity Level

This filter is available on Basic Complexity Level.