Back to FabImage Library website

You are here: Start » Function Reference » Region » Region Features » RegionCaliperDiameter

RegionCaliperDiameter


Header: FIL.h
Namespace: fil
Module: FoundationBasic

Computes the longest and the shortest width of the input region measured as distance between parallel lines containing the whole region.

Syntax

C++
C#
 
void fil::RegionCaliperDiameter
(
	const fil::Region& inRegion,
	ftl::Optional<fil::Segment2D&> outMinDiameter = ftl::NIL,
	ftl::Optional<float&> outMinDiameterLength = ftl::NIL,
	ftl::Optional<fil::Segment2D&> outMaxDiameter = ftl::NIL,
	ftl::Optional<float&> outMaxDiameterLength = ftl::NIL
)

Parameters

Name Type Default Description
Input value
inRegion const Region& Input region
Output value
outMinDiameter Optional<Segment2D&> NIL
Output value
outMinDiameterLength Optional<float&> NIL
Output value
outMaxDiameter Optional<Segment2D&> NIL
Output value
outMaxDiameterLength Optional<float&> NIL

Optional Outputs

The computation of following outputs can be switched off by passing value ftl::NIL to these parameters: outMinDiameter, outMinDiameterLength, outMaxDiameter, outMaxDiameterLength.

Read more about Optional Outputs.

Errors

List of possible exceptions:

Error type Description
DomainError Empty region on input in RegionCaliperDiameter.