Back to FabImage Library website

You are here: Start » Function Reference » Region Spatial Transforms » TrimRegionToRectangle

TrimRegionToRectangle


Header:FIL.h
Namespace:fil

Limits a region to a rectangular area.

Syntax

C++
C#
 
void fil::TrimRegionToRectangle
(
	const fil::Region& inRegion,
	const fil::Rectangle2D& inRectangle,
	ftl::Optional<const fil::CoordinateSystem2D&> inRectangleAlignment,
	fil::Region& outRegion,
	ftl::Optional<fil::Rectangle2D&> outAlignedRectangle = ftl::NIL
)

Parameters

Name Type Default Description
inRegion const Region& Input region
inRectangle const Rectangle2D& Trimming rectangle
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)

Optional Outputs

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

Read more about Optional Outputs.