Getting Information


Contents:



How to Get Information

Typical functions that you would use to get information regarding a General Raster Image are as follows:

Sample Program

The gr_gi program reads file information and GR data set information for data set 'Image_1' from the gr1.hdf file, and then prints it to the screen.

You can either download the C or FORTRAN program at the end, or just take a look at the HTML version, with the HDF calls highlighted:

If you have downloaded this program, then you can compile and run it. Following is a detailed review of what this program does:

Output of Sample Program

The gr_gi program outputs the following information:
Number of Datasets: 1
Number of File Attributes: 0
Data Set Name: Image_1
Number of Components: 2
Number Type: 22
Interlace: 0
Number of Attributes: 0
Dimension 1: 15
Dimension 2: 10

Download Sample Program (optional)

Programs used in this tutorial: [Compiling a program]