[Back to Interface] [Prev] [Next]

DFSDreadslab/dsrslab

intn DFSDreadslab(char *filename, int32 start[], int32 slab_size[], int32 stride[], VOIDP buffer, int32 buffer_size[])

filename IN:

Name of the HDF file

start IN:

Buffer of size rank containing the coordinates for the start of the slab

slab_size IN:

Buffer of size rank containing the size of each dimension in the slab

stride IN:

Subsampling (not yet implemented)

buffer OUT:

\Buffer for the returned slab

buffer_size OUT:

Dimensions of the buffer parameter

Purpose

Reads a slab of data from any scientific dataset.

Return value

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

Description

DFSDreadslab will access to the scientific dataset following the current one if DFSDgetdims or DFSDgetdata are not called earlier. The start array indices are one-based. The rank of start must be the same as the number of dimensions of the specified variable. The elements of slab_size must be no larger than the dimensions of the scientific dataset in order. The stride feature is not currently implemented. For now just pass the start array as the argument for stride where it will be ignored.

To extract a slab of lower dimension than that of the dataset, enter 1 in the slab_size array for each omitted dimension. For example, to extract a two-dimensional slab from a three-dimensional dataset, specify the beginning coordinates in three dimensions and enter a 1 for the missing dimension in the slab_size array. More specifically, to extract a 3 x 4 slab containing the elements (6, 7, 8) through (8, 7, 11) specify the beginning coordinates as {6, 7, 8} and the slab size as {3, 1, 4}.

FORTRAN

integer function dsrslab(filename, start, slab_size, stride, buffer, buffersize)

character*(*) filename, buffer

integer start(*), slab_size(*),

integer stride(*), buffer_size(*)



[Back to Interface] [Prev] [Next]

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