VisionX V4VARENDVisionX V4
NAME

varend − trace and fill boundaries

SYNOPSIS

varend [-H] [if=<inputfile>] [of=<outputfile>] [-f] [bl=<integer>] [-b] [-c] [-s] [-x] [kc=] [hc=] [bc=] [fc=] [-d] [-v]

DESCRIPTION

Varend takes a set of planar boundaries and draws them into a 3D image. A set of planar boundaries is a VisionX file containing a bounding box and a set of VisionX 3-D vectors, each having constant z coordinate. Every vector is considered as a 2D polyline lying on a plane parallel to the xy plane (given it has a constant z).
Varend can optionally fill the internal regions determined by the set of boundaries. One point of the image is internal iff, considering a horizontal ray emanating from the point, the number of times this ray intersects the line segments making up all the polylines that lie on the same plane as the point is odd.
Varend may be used, for instance, to create segmented images needed in estimating the volumes of marked image ROIs (e,g. lesions or nodules in medical images).

CONSTRAINTS

There is an internal limit to the total number of points that can be processed.
The fill algorithm is recusive - on big images it may use all the stack space allowed by the shell (see limit or ulimit entries of your shell man page).
The floating points coordinates of each boundary point are rounded before proceeding with the tracing.
Vectors are traced using Bresenham’s algorithm; hence they are assumed to be 8 connected.
Outputs a byte image without frame markers; use vdim -c to add them, if needed.

OPTIONS

if=<input filename>

Specifies the input filename.

of=<output file>

Specifies the output filename.

-f

Fill the regions enclosed by the boundaries using inclusion/exclusion rules (if a boundary is inside a filled region, its inner pixels will be marked as hole). See also -x

-x

Fill the regions enclosed by the boundaries with no exclusion rules. All the inner pixels are always turned into fill-color valued pixel. This option is especially useful when there the boundary crossings are overlaps on the same region and not an indication of region exclusion. See also -f.

-c

Close all the boundaries.

-s

Skip (do not draw) non-closed boundaries.

bl=<integer>

Draw a boundary only if it has more than bl points (default=2).

kc=<value>

Background color (default=0)

hc=<value>

Color of holes, i.e. background areas completely sorrounded by boundary or foreground pixels (default=kc)

fc=<value>

Fill color (default=128)

bc=<value>

Boundary color (default=128)

-b

Create each image with a tight bounding box.

-v

Verbose output messages.

-d

Very verbose output option.

AUTHOR

A. Biancardi & A.B. Chan & B.M. Kressler & A.A Enquobahrie