store_chord ( : Region : Row, ColumnBegin, ColumnEnd : )

Create an image region from a runlength coding.

The operator store_chord creates a region described by the input chord structure. The chord representation is created by examining a region line by line with ascending line number (= from "top" to "bottom"). Every line runs through from left to right (ascending column number); all starting and ending points being stored by region segments (=chords). Thus a region can be described by a sequence of chords, a chord being defined by line number as well as starting and ending points (column number). The storing is fastest when the chords are sorted. The order is as follows:

       (l1,b1,e1) <= (l2,b2,e2) := l1 < l2 oder l1 = l2 und b1 <= b2
.


Attention

All pixels must be located within the image format. If no chords are passed an empty region is created.


Parameters

Region (output_object)
region -> object
Created region.

Row (input_control)
chord.y(-array) -> integer
Lines of the chords.
Default value: 100
Suggested values: 0, 50, 100, 200, 300, 500
Range of values: 0 <= Row <= 511 (lin)
Minimum increment: 1
Recommended increment: 10

ColumnBegin (input_control)
chord.x1(-array) -> integer
Columns of the starting points of the chords.
Default value: 50
Suggested values: 0, 50, 100, 200, 300, 500
Range of values: 0 <= ColumnBegin <= 511 (lin)
Minimum increment: 1
Recommended increment: 10
Number of elements: ColumnBegin == Row

ColumnEnd (input_control)
chord.x2(-array) -> integer
Columns of the ending points of the chords.
Default value: 200
Suggested values: 50, 100, 200, 300, 500
Range of values: 0 <= ColumnEnd <= 511 (lin)
Minimum increment: 1
Recommended increment: 10
Number of elements: ColumnEnd == Row
Restriction: ColumnEnd >= ColumnBegin


Complexity

F shall be the number of pixels. If the pixels are sorted in ascending order the runtime complexity is: O(F), otherwise it is O(F)*F).


Result

If the data is correct the operator store_chord returns the value TRUE, otherwise an exception is raised. The clipping of the current image format is set via the operator set_system(::'clip_region',<true/false>:). If an empty region is created (= empty input) the operator set_system(::'store_empty_region',<true/false>:) determines whether the region is returned.


Possible Predecessors

fetch_chord


Alternatives

store_coord, store_polygon, store_lines, store_filled_polygon


See also

reduce_domain



Copyright © 1996-1997 MVTec Software GmbH