You are here: Start » AVL.NET » AVL.RegionDifference(AvlNet.Region, AvlNet.Region, AvlNet.Region)

AVL.RegionDifference(AvlNet.Region, AvlNet.Region, AvlNet.Region)

Computes a region containing pixels from the first input region, but not from the second input region.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax


public static void RegionDifference(
	AvlNet.Region inRegion1,
	AvlNet.Region inRegion2,
	out AvlNet.Region outRegion
)

Parameters

inRegion1
Type: AvlNet.Region
First input region
inRegion2
Type: AvlNet.Region
Second input region
outRegion
Type: AvlNet.Region
Output region

Description

The operation computes the logical difference of two given regions. That is, the resulting region contains pixel locations that belong to the first input region but do not belong to the second one. Both dimensions (width and height) of the resulting region are set to the corresponding dimensions of the first input region.

Examples

Sample region inRegion1

Sample region inRegion2

RegionDifference(inRegion1, inRegion2)

RegionDifference(inRegion2, inRegion1)

Errors

Error type Description
DomainError Input and output regions are not distinct in RegionDifference.

See also