Back to FabImage Library website
You are here: Start » Function Reference » Profile » Profile Spatial Transforms » CropProfile

CropProfile
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | FoundationPro |
Confines a profile to its continuous subsequence.
Syntax
C++
C#
void fil::CropProfile ( const fil::Profile& inProfile, const int inStart, ftl::Optional<const int&> inLength, fil::Profile& outProfile )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() |
inProfile | const Profile& | Input profile | ||
![]() |
inStart | const int | 0 - ![]() |
Index of the first element of the input profile that will be included in the output profile | |
![]() |
inLength | Optional<const int&> | 0 - ![]() |
NIL | Length of the output profile |
![]() |
outProfile | Profile& | Output profile |
Description
The operation crops profile to a new size. It removes values from inProfile, except those, which are included between inStart and inStart + inLength indexes.
Remarks
Value of inLength set to Auto means that the operation is performed on all elements starting from inStart till the end of inProfile.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Selected index range exceeds the input profile in CropProfile. |
See Also
- BlendImages – Computes weighted sum pixel by pixel.
- LerpImages – Interpolates two images linearly pixel by pixel.