[Back to Interface] [Prev] [Next]

DFSDgetslice/dsgslc

intn DFSDgetslice(char *filename, int32 winst[], int32 windims[], VOIDP data, int32 dims[])

filename IN:

Name of HDF file

winst IN:

Array containing the coordinates for the start of the slice

windim IN:

Array containing the dimensions of the slice

data OUT:

Array for returning slice

dims OUT:

Dimensions of array data

Purpose

Reads part of a scientific dataset from a file.

Return value

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

Description

DFSDgetslice accesses the dataset last accessed by DFSDgetdims. If DFSDgetdims has not been called for the named file, DFSDgetslice gets a slice from the next dataset in the file. Array winst specifies the coordinates of the start of the slice. Array windims gives the size of the slice. The number of elements in winst and windims must be equal to the rank of the dataset. For example, if the file contains a three-dimensional dataset, winst may contain the values {2, 4, 3}, while windims contains the values {3, 1, 4} and the dims should be at least {3, 1, 4}, the same size as the slice. This will extract a 3 x 4, two-dimensional slice, containing the elements between (2, 4, 3) and (4, 4, 6) from the original dataset.

The data array is the array into which the slice is read. It must be at least as big as the desired slice. The dims array is the array containing the actual dimensions of the array data. The user assigns values to dims before calling DFSDgetslice.

All parameters assume FORTRAN-77-style one-based arrays.

DFSDgetslice is obsolete in favor of DFSDreadslab. DFSDreadslab is the recommended function call to use when reading hyperslabs (previously known as data slices). HDF will continue to support DFSDgetslice only to maintain backward compatibility with HDF applications built on earlier versions of the library.

FORTRAN

integer function dsgslc(filename, winst, windims, data, dims)

character*(*) filename, data

integer winst(*), windims(*), dims(*)



[Back to Interface] [Prev] [Next]

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