[Back to Interface] [Prev] [Next]

GRgetattr/mggnatt/mggcatt

intn GRgetattr(int32 [obj]_id, int32 attr_index, VOIDP values)

[obj]_id IN:

Raster image identifier (ri_id), returned by GRcreate or GRselect, or GR interface identifier (gr_id), returned by GRstart

attr_index IN:

Index of the attribute

values OUT:

Buffer for the attribute values

Purpose

Reads the values of an attribute for a data object.

Return value

Returns SUCCEED (or 0) if successful and FAIL (or -1) otherwise.

Description

GRgetattr obtains all values of the attribute that is specified by its index, attr_index, and is attached to the object identified by the parameter obj_id. The values are stored in the buffer values.

The value of the parameter attr_index can be obtained by using GRfindattr, GRnametoindex, or GRreftoindex, depending on available information. Valid values of attr_index range from 0 to the total number of attributes of the object - 1. The total number of attributes attached to the file can be obtained using the routine GRfileinfo. The total number of attributes attached to the image can be obtained using the routine GRgetiminfo.

GRgetattr only reads all values assigned to the attribute and not a subset.

Note that there are two FORTRAN-77 versions of this routine; one for numeric data (mggnatt) and the other for character data (mggcatt).

FORTRAN

integer function mggnatt([obj]_id, attr_index, values)

integer [obj]_id, attr_index

<valid numeric data type> values(*)

integer function mggcatt([obj]_id, attr_index, values)

integer [obj]_id, attr_index

character*(*) values



[Back to Interface] [Prev] [Next]

hdfhelp@ncsa.uiuc.edu
HDF Reference Manual - 07/29/98, NCSA HDF Development Group.