You are here: Start » FIL.NET » Function Reference » Region » Region Features » FIL.RegionDiameter
Computes the longest segment connecting two pixels contained in region and its length.
Namespace: | FilNet |
---|---|
Assembly: | FIL.NET.dll |
Syntax
C++
C#
public static void RegionDiameter ( FilNet.Region inRegion, NullableValue<FilNet.Segment2D> outDiameter, NullableValue<float> outDiameterLength )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inRegion | FilNet.Region | Input region. | ||
![]() | outDiameter | FilNet.NullableValue<FilNet.Segment2D> | Can be null to skip this parameter calculation. | ||
![]() | outDiameterLength | FilNet.NullableValue<float> | Can be null to skip this parameter calculation. |
Description
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.
Examples
![]() |
The resulting outDiameterLength = 276.4815, outDiameter segment was drawn onto the region.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Empty region on input in RegionDiameter. |