Herror ::clip_region_rel (
    Hobject Region,
    Hobject *RegionClipped,
    const HTuple &Top,
    const HTuple &Bottom,
    const HTuple &Left,
    const HTuple &Right
)
HRegion HRegion::ClipRegionRel (
    const HTuple &Top,
    const HTuple &Bottom,
    const HTuple &Left,
    const HTuple &Right
) const
HRegionArray HRegionArray::ClipRegionRel (
    const HTuple &Top,
    const HTuple &Bottom,
    const HTuple &Left,
    const HTuple &Right
) const

Clip a region relative to its size.

::clip_region_rel clips a region to a rectangle lying within the region. The size of the rectangle is determined by the enclosing rectangle of the region, which is reduced by the values given in the four control parameters. All four parameters must contain numbers larger or equal to zero, and determine by which amount the rectangle is reduced at the top (Top), at the bottom (Bottom), at the left (Left), and at the right (Right). If all parameters are set to zero, the region remains unchanged.


Parameters

Region (input_object)
region(-array) -> Hobject: HRegion(Array)
Regions to be clipped.

RegionClipped (output_object)
region(-array) -> Hobject * : HRegion(Array)
Clipped regions.

Top (input_control)
integer -> HTuple.long
Number of rows clipped at the top.
Default value: 1
Suggested values: 0, 1, 2, 3, 4, 5, 7, 10, 20, 30, 50
Typical range of values: 0 <= Top
Minimum increment: 1
Recommended increment: 1

Bottom (input_control)
integer -> HTuple.long
Number of rows clipped at the bottom.
Default value: 1
Suggested values: 0, 1, 2, 3, 4, 5, 7, 10, 20, 30, 50
Typical range of values: 0 <= Bottom
Minimum increment: 1
Recommended increment: 1

Left (input_control)
integer -> HTuple.long
Number of columns clipped at the left.
Default value: 1
Suggested values: 0, 1, 2, 3, 4, 5, 7, 10, 20, 30, 50
Typical range of values: 0 <= Left
Minimum increment: 1
Recommended increment: 1

Right (input_control)
integer -> HTuple.long
Number of columns clipped at the right.
Default value: 1
Suggested values: 0, 1, 2, 3, 4, 5, 7, 10, 20, 30, 50
Typical range of values: 0 <= Right
Minimum increment: 1
Recommended increment: 1


Result

::clip_region_rel returns 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.


Possible Predecessors

::threshold, ::connection, ::regiongrowing, ::pouring


Possible Successors

::select_shape, ::disp_region


Alternatives

::smallest_rectangle1, ::intersection, ::gen_rectangle1, ::clip_region


Module

Region processing



Copyright © 1996-2002 MVTec Software GmbH