SkipEmptyRegion


If the input region contains at least one pixel, then it is copied to the output; otherwise Nil is returned.

Applications:Secures against domain errors caused by empty regions, e.g. just before the RegionMassCenter filter is to be invoked.

Syntax

C++
Python
 
def SkipEmptyRegion(
	inRegion: Region,
	/
)
-> (
	outNotEmptyRegion: Region | None,
	outIsNotEmpty: bool
)

Parameters

Name Type Default Description
Input value inRegion Region Input region
Output value outNotEmptyRegion Region | None
Output value outIsNotEmpty bool