DS_CONTOUR(3)

EXPERIMENTAL_FUNC
ds_contour - Extract contours from a 2-dimensional array.

SYNOPSIS
#include <karma_ds.h>

flag ds_contour

(CONST char *image, unsigned int elem_type, CONST dim_desc *hdim, CONST uaddr *hoffsets, CONST dim_desc *vdim, CONST uaddr *voffsets, unsigned int num_levels, CONST double *contour_levels, uaddr structure_size, uaddr *buffer_sizes, double **x0_arr, double **y0_arr, double **x1_arr, double **y1_arr, uaddr *num_segments)

DESCRIPTION
This routine will extract contours from a 2-dimensional Intelligent Array, producing a list of line segments that approximate the countours. The co-ordinates of the line segments are in linear world co-ordinates.

image
    The start of the image slice data.

elem_type
    The type of the data.

hdim
    The horizontal dimension descriptor.

hoffsets
    The address offsets for data along the horizontal dimension.

vdim
    The vertical dimension descriptor.

voffsets
    The address offsets for data along the vertical dimension.

num_levels
    The number of contour levels.

contour_levels
    The array of contour levels.

structure_size
    The size (in bytes) of the per-level data structure. The calling function is expected to pass pointers to various fields in the first structure. The fields are modified.

buffer_sizes
    A pointer to the first co-ordinate buffer size field.

x0_arr
    A pointer to the first x0 co-ordinate array field. The co-ordinate array may be internally reallocated.

y0_arr
    A pointer to the first y0 co-ordinate array field. The co-ordinate array may be internally reallocated.

x1_arr
    A pointer to the first x1 co-ordinate array field. The co-ordinate array may be internally reallocated.

y1_arr
    A pointer to the first y1 co-ordinate array field. The co-ordinate array may be internally reallocated.

num_segments
    A pointer to the first number of segments field.

RETURN VALUE
TRUE on success, else FALSE.

Multi-threading Level
Unsafe.

AUTHOR
Richard Gooch (rgooch@atnf.csiro.au)

AVAILABLITY
The Karma Distribution is available for anonymous ftp from: ftp://ftp.atnf.csiro.au/pub/software/karma/ ftp://wuarchive.wustl.edu/graphics/graphics/packages/karma/ ftp://ftp.pwr.wroc.pl/pub/karma/ The Karma Home Page is: http://www.atnf.csiro.au/karma/