Back to FabImage Library website
You are here: Start » Function Reference » Region » Region Relations » GetMaximumRegion

GetMaximumRegion
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | FoundationBasic |
Returns the region from the input array that corresponds to the largest computed feature value.
Applications: Use this filter when you have an array of regions and you want to select one of them that best matches some criterion.
Syntax
C++
C#
void fil::GetMaximumRegion ( const ftl::Array<fil::Region>& inRegions, fil::RegionFeature::Type inFeature, fil::Region& outRegion, ftl::Optional<float&> outValue = ftl::NIL, ftl::Optional<int&> outIndex = ftl::NIL )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
![]() |
inRegions | const Array<Region>& | Input regions | |
![]() |
inFeature | RegionFeature::Type | Region feature value to be computed | |
![]() |
outRegion | Region& | Output region | |
![]() |
outValue | Optional<float&> | NIL | Computed feature value of the output region |
![]() |
outIndex | Optional<int&> | NIL |
Optional Outputs
The computation of following outputs can be switched off by passing value ftl::NIL
to these parameters: outValue, outIndex.
Read more about Optional Outputs.
Description
The filter computes the selected feature value for every input region and returns the one for which value is the largest.
Examples
![]() |
![]() |
GetMaximumRegion performed with Area as the selected region feature.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Empty region array on input in GetMaximumRegion. |
See Also
- GetMinimumRegion – Returns the region from the input array that corresponds to the smallest computed feature value.
- SortRegions – Changes the order of regions from the input array according to an ascending/descending sequence of their computed feature values.
- ClassifyRegions – Splits an array of regions according to the selected feature and range.