Back to FabImage Library website
You are here: Start » Function Reference » Profile » Profile Local Transforms » ConvolveProfile

ConvolveProfile
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | FoundationPro |
Applies a user-defined convolution to a profile.
Syntax
C++
C#
void fil::ConvolveProfile ( const fil::Profile& inProfile, ftl::Optional<const fil::Range&> inRange, const ftl::Array<float>& inMask, bool inNormalizeMaskValues, ftl::Optional<int> inMaskOrigin, fil::Profile& outProfile )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
![]() |
inProfile | const Profile& | Profile to be processed | |
![]() |
inRange | Optional<const Range&> | NIL | |
![]() |
inMask | const Array<float>& | Convolution kernel mask that will be applied to the profile | |
![]() |
inNormalizeMaskValues | bool | False | If set to true, the kernel mask will be normalized so that its values sum up to one |
![]() |
inMaskOrigin | Optional<int> | NIL | Index of the kernel mask element that will be aligned against the profile values |
![]() |
outProfile | Profile& | Output profile |
Description
The operation computes each value as a convolution of inProfile and inMask values.
Values which mask exceeds profile dimension are set to zero.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Convolution mask is empty in ConvolveProfile. |
DomainError | Mask origin exceeds dimensions of convolution mask in ConvolveProfile. |
DomainError | Normalization of kernel mask which values add up to zero was requested in ConvolveProfile. |
DomainError | Range exceeds the input profile in ConvolveProfile. |