Back to FabImage Library website

You are here: Start » Function Reference » Profile Features » ProfileMaximum

ProfileMaximum


Header:FIL.h
Namespace:fil

Finds the highest value of the input profile, its precise location and the corresponding index.

Syntax

C++
C#
 
void fil::ProfileMaximum
(
	const fil::Profile& inProfile,
	ftl::Optional<const fil::Range&> inRange,
	fil::ProfileInterpolationMethod::Type inInterpolationMethod,
	float& outMaximumPoint,
	ftl::Optional<int&> outMaximumIndex = ftl::NIL,
	ftl::Optional<float&> outMaximumValue = ftl::NIL
)

Parameters

Name Type Default Description
inProfile const Profile& Input profile
inRange Optional<const Range&> NIL
inInterpolationMethod ProfileInterpolationMethod::Type Quadratic4 Profile points' interpolation method
outMaximumPoint float& Position of highest value with respect to profile's offset and scale
outMaximumIndex Optional<int&> NIL Index of highest value
outMaximumValue Optional<float&> NIL Highest value

Optional Outputs

The computation of following outputs can be switched off by passing value ftl::NIL to these parameters: outMaximumIndex, outMaximumValue.

Read more about Optional Outputs.

Errors

List of possible exceptions:

Error type Description
DomainError Empty profile in ProfileMaximum.
DomainError Empty profile range in ProfileMaximum.
DomainError Range exceeds the input profile in ProfileMaximum.