[Top] [Prev] [Next]

12.2 The DFSD Scientific Data Set Data Model

The scientific data set, or SDS, data model supports four primary data objects: arrays, dimensions, dimension scales, and dimension attributes. As in the multifile SD SDS model, the fundamental object of the data model is the SDS array. Unlike the SD multifile SDS model the DFSD SDS model has, in addition to dimension attributes, attributes that refer to the SDS array itself.

FIGURE 12a - The Contents of a Three-Dimensional DFSD Scientific Data Set

12.2.1 Required DFSD SDS Objects

The only required objects in the DFSD SDS model are the array and the data type of the array data. Without this information, the data set is inaccessible. Required objects are created by the library using the information supplied at the time the SDS is defined.

ble>

FORTRAN-77
DFR8readref

[intn]

(d8rref)
filename
char *
character*(*)
Name of HDF file containing the raster image.

ref
uint16
integer
Reference number for next call to DFR8getimage.

6.5.4 Specifying the Next 8-Bit Raster Image to be Read: DFR8restart

DFR8restart causes the next call to DFR8getimage or DFR8getdims to read the first raster image set in the file. Use the following call to invoke DFR8restart:

C:		status = DFR8restart( );
FORTRAN:	status = d8first( )


[Top] [Prev] [Next]

hdfhelp@ncsa.uiuc.edu
HDF User's Guide - 05/19/99, NCSA HDF Development Group. ./usr/share/doc/libhdf4g/html-userguide/RIS8s.fm5.html0000644000000000000000000001333206720605755022554 0ustar rootroot000000000000008-Bit Raster Images (DFR8 API) [Top] [Prev] [Next]

6.6 8-Bit Raster Image Information Retrieval Routines

6.6.1 Querying the Total Number of 8-Bit Raster Images: DFR8nimages

DFR8nimages returns the total number of 8-bit raster image sets in a file and has the following syntax:

C:		num_of_images = DFR8nimages(filename);
FORTRAN:	num_of_images = d8nimg(filename)

TABLE 6I - DFR8nimages Parameter List

Routine Name

[Return Type]

(FORTRAN-77)
Parameter
Parameter Type
Description
C
FORTRAN-77
DFR8nimages

[intn]

(d8nims)
filename
char *
character*(*)
Name of the HDF file.

6.6.2 Determining the Reference Number of the Most-Recently-Accessed 8-Bit Raster Image: DFR8lastref

DFR8lastref returns the reference number most recently used in writing or reading an 8-bit raster image. This routine is primarily used for attaching annotations to images and adding images to vgroups. (See Chapters 8, titled Annotations (DFAN API) and Chapter 5, titled Vgroups (V API) for more detailed information on how to use reference numbers in connection with these applications.)

The following calling sequence uses DFR8lastref to find the reference number of the 8-bit raster image most recently added to an HDF file:

C:		status = DFR8addimage(filename, image, width, height, compress);
		lastref = DFR8lastref( );
FORTRAN:	status = d8aimg(filename, image, width, height, compress)
		lastref = d8lref( )
DFR8putimage or DFR8getimage can be used instead of DFR8addimage with similar results.

6.6.3 Determining the Reference Number of the Palette of the Most-Recently-Accessed 8-Bit Raster Image: DFR8getpalref

DFR8getpalref returns the reference number of the palette associated with the most recently used in writing or reading an 8-bit raster image. The DFR8getdims routine must be called before DFR8getpalref, as DFR8getdims initializes internal structures required by DFR8getpalref.

There is currently no FORTRAN-77 version of the DFR8getpalref routine.

TABLE 6J - DFR8nimages Parameter List

Routine Name

[Return Type]

Parameter
Parameter Type
Description
C
DFR8getpalref

[intn]

pal_ref
uint16 *
Pointer to the returned reference number of the palette.



[Top] [Prev] [Next]

hdfhelp@ncsa.uiuc.edu
HDF User's Guide - 05/19/99, NCSA HDF Development Group. ./usr/share/doc/libhdf4g/html-userguide/RIS8s.fm6.html0000644000000000000000000000530406720605755022555 0ustar rootroot000000000000008-Bit Raster Images (DFR8 API) [Top] [Prev]

6.7 RIS8 Backward Compatibility Issues

6.7.1 Attribute "long_name" Included in HDF for netCDF Compatibility

In several routines of the RIS8 interface, the value returned by label is the value of the attribute named "long_name" and that the value returned by coordsys is the value of the attribute named "cordsys".

This was done in order to provide HDF with the ability to read netCDF files. While this aspect of HDF functionality will not affect its ability to read HDF data files written by programs compiled with earlier versions of HDF, it is advisable for HDF users to know this to be aware of the significance of the "long_name" and "cordsys" attribute names in a list of attributes.

6.7.2 Raster Image Group Implementation with New RIS8 Tags

As HDF has evolved, a variety of structures have been used to store raster image sets. For instance, HDF first began grouping 8-bit raster images together with dimensions and palettes by insuring that their reference numbers fell in a certain