Back to FabImage Library website
You are here: Start » Function Reference » Profile » Profile Point Transforms » NormalizeProfile

NormalizeProfile
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | FoundationPro |
Rescales a profile linearly, so that its minimum becomes inNewMinimum and its maximum becomes inNewMaximum.
Syntax
C++
C#
void fil::NormalizeProfile ( const fil::Profile& inProfile, ftl::Optional<const fil::Range&> inRange, ftl::Optional<float> inNewMinimum, ftl::Optional<float> inNewMaximum, const float inSaturateHighestFraction, const float inSaturateLowestFraction, fil::Profile& outProfile, float& outA, float& outB )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() |
inProfile | const Profile& | Input profile | ||
![]() |
inRange | Optional<const Range&> | NIL | ||
![]() |
inNewMinimum | Optional<float> | NIL | Desired minimum value of the resulting profile (if set to Nil, the minimum of the input profile is used) | |
![]() |
inNewMaximum | Optional<float> | NIL | Desired maximum value of the resulting profile (if set to Nil, the maximum of the input profile is used) | |
![]() |
inSaturateHighestFraction | const float | 0.0 - 1.0 | 0.0f | Fraction of the highest values skipped during normalization |
![]() |
inSaturateLowestFraction | const float | 0.0 - 1.0 | 0.0f | Fraction of the lowest values skipped during normalization |
![]() |
outProfile | Profile& | Normalized profile | ||
![]() |
outA | float& | Multiplicative parameter of the applied linear transformation | ||
![]() |
outB | float& | Additive parameter of the applied linear transformation |
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Range exceeds inProfile in NormalizeProfile. |
DomainError | The sum of inSaturateHighestFraction and inSaturateLowestFraction can't be greater than 1 in NormalizeProfile. |