[Back to Interface] [Prev] [Next]

SDreadchunk/sfrchnk/sfrcchnk

intn SDreadchunk(int32 sds_id, int32 *origin, VOIDP datap)

sds_id IN:

Data set identifier returned by SDcreate or SDselect

origin IN:

Origin of the chunk to be read

datap OUT:

Buffer for the chunk to be read

Purpose

Reads a data chunk from a chunked data set.

Return value

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

Description

SDreadchunk reads the entire chunk of data from the chunked data set identified by the parameter sds_id, and stores the data in the buffer datap. Reading starts at the location specified by the parameter origin. SDreadchunk is used when an entire chunk of data is to be read. SDreaddata is used when the read operation is to be done regardless of the chunking scheme used in the data set.

The parameter origin specifies the coordinates of the chunk according to the chunk position in the chunked array. Refer to the Chapter 3 of the HDF User's Guide, titled Scientific Data Sets (SD API), for a description of the organization of chunks in a data set.

SDreadchunk will return FAIL (or -1) when an attempt is made to read from a non-chunked data set.

Note that there are two FORTRAN-77 versions of this routine; one for numeric data (sfrchnk) and one for character data (sfrcchnk).

FORTRAN

integer sfrchnk(sds_id, origin, datap)

integer sds_id, origin(*)

<valid numeric data type> datap(*)

integer sfrcchnk(sds_id, origin, datap)

integer sds_id, origin(*)

character*(*) datap(*)



[Back to Interface] [Prev] [Next]

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