Back to FabImage Library website
You are here: Start » Function Reference » Region » Region Spatial Transforms » CropRegionToRectangle
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | FoundationLite |
Creates a region from a rectangular fragment of another one.
Applications: Can be used to obtain a part of a bigger region, but also to enforce specific region frame.
Syntax
C++
C#
void fil::CropRegionToRectangle ( const fil::Region& inRegion, const fil::Rectangle2D& inRectangle, ftl::Optional<const fil::CoordinateSystem2D&> inRectangleAlignment, fil::Region& outRegion, ftl::Optional<fil::Rectangle2D&> outAlignedRectangle = ftl::NIL, ftl::Optional<fil::CoordinateSystem2D&> outOutputAlignment = ftl::NIL )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
![]() |
inRegion | const Region& | Input region | |
![]() |
inRectangle | const Rectangle2D& | Rectangle defining a rotated subregion | |
![]() |
inRectangleAlignment | Optional<const CoordinateSystem2D&> | NIL | Adjusts the rectangle to the position of the inspected object |
![]() |
outRegion | Region& | Output region | |
![]() |
outAlignedRectangle | Optional<Rectangle2D&> | NIL | Input rectangle after transformation (in the region coordinates) |
![]() |
outOutputAlignment | Optional<CoordinateSystem2D&> | NIL | Alignment of the output region |
In-place Processing
This function supports in-place data processing - you can pass the same reference to inRegion and outRegion
Read more about In-place Computation.
Optional Outputs
The computation of following outputs can be switched off by passing value ftl::NIL
to these parameters: outAlignedRectangle, outOutputAlignment.
Read more about Optional Outputs.