clip_region ( Region : RegionClipped : Row1, Column1, Row2, Column2 : )

Clip a region to a rectangle.

clip_region clips the input regions to the rectangle given by the four control parameters. clip_region is more efficient than calling intersection with a rectangle generated by gen_rectangle1.


Parameters

Region (input_object)
region(-array) -> object
Region to be clipped.

RegionClipped (output_object)
region(-array) -> object
Clipped regions.

Row1 (input_control)
rectangle.origin.y -> integer
Row coordinate of the upper left corner of the rectangle.
Default value: 0
Suggested values: 0, 128, 200, 256
Typical range of values: -oo <= Row1 <= -oo (lin)

Column1 (input_control)
rectangle.origin.x -> integer
Column coordinate of the upper left corner of the rectangle.
Default value: 0
Suggested values: 0, 128, 200, 256
Typical range of values: -oo <= Column1 <= -oo (lin)

Row2 (input_control)
rectangle.corner.y -> integer
Row coordinate of the lower right corner of the rectangle.
Default value: 256
Suggested values: 128, 200, 256, 512
Typical range of values: 0 <= Row2 <= 511 (lin)
Minimum increment: 1
Recommended increment: 10

Column2 (input_control)
rectangle.corner.x -> integer
Column coordinate of the lower right corner of the rectangle.
Default value: 256
Suggested values: 128, 200, 256, 512
Typical range of values: 0 <= Column2 <= 511 (lin)
Minimum increment: 1
Recommended increment: 10


Result

clip_region returns 2 (H_MSG_TRUE) if all parameters are correct. The behavior in case of empty input (no regions given) can be set via set_system('no_object_result',<Result>) and the behavior in case of an empty input region via set_system('empty_region_result',<Result>). If necessary, an exception handling is raised.


Parallelization Information

clip_region is reentrant and automatically parallelized (on tuple level).


Possible Predecessors

threshold, connection, regiongrowing, pouring


Possible Successors

select_shape, disp_region


Alternatives

intersection, gen_rectangle1, clip_region_rel


Module

Foundation



Copyright © 1996-2008 MVTec Software GmbH