VIEWIMG_CREATE(3)

FUNCTION
viewimg_create - Create viewable image from 2D slice.

SYNOPSIS
#include <karma_viewimg.h>

ViewableImage viewimg_create

(KWorldCanvas canvas, multi_array *multi_desc, array_desc *arr_desc, char *slice, unsigned int hdim, unsigned int vdim, unsigned int elem_index)

DESCRIPTION
This routine will create a PseudoColour viewable image object from a 2-dimensional slice of a Karma data structure. At a later time, this viewable image may be made visible. This routine will not cause the canvas to be refreshed.

canvas
    The world canvas onto which the viewable image may be drawn. Many viewable images may be associated with a single canvas.

multi_desc
    The multi_array descriptor which contains the Karma data structure. The routine increments the attachment count on the descriptor on successful completion. This may be NULL.

arr_desc
    The array descriptor.

slice
    The start of the slice data.

hdim
    The dimension index of the horizontal dimension.

vdim
    The dimension index of the vertical dimension.

elem_index
    The element index in the data packets.

RETURN VALUE
A viewable image on success, else NULL.

Multi-threading Level
Unsafe.

NOTES
The routine may produce cache data which will vastly increase the speed of subsequent operations on this data. Prior to process exit, a call MUST be made to <-viewimg_destroy->, otherwise shared memory segments could remain after the process exits.

The ViewableImage will be automatically destroyed if the canvas is destroyed.

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/