hdf images hdf images

HDF User's Guide Examples

These examples are used in the HDF User's Guide. The examples are included in the HDF source code, and the links below are to locations in the unpacked source code, available from the Obtain the HDF Software page.

   AN    GR    SD    VD    VG

Annotations (AN):

These examples are used in Chapter 10 -- Annotations (AN API) of the HDF User's Guide.

Example Description C Example Fortran Example
1. Creating File and Data Annotations AN_create_annotation.c AN_create_annotation.f
2. Reading File and Data Annotations AN_read_annotation.c AN_read_annotation.f
3. Obtaining Annotation Information AN_get_annotation_info.c AN_get_annotation_info.f

General Raster (GR):

These examples are used in Chapter 8 -- General Raster Images (GR API) of the HDF User's Guide.

Example Description C Example Fortran Example
1. Creating and Writing a RI GR_create_and_write_image.c GR_create_and_write_image.f
2. Modifying an Existing RI GR_modify_image.c GR_modify_image.f
3. Reading a RI GR_read_image.c GR_read_image.f
4. Obtaining File and Image Information GR_image_info.c GR_image_info.f
5. Operations on File and RI Attributes GR_set_attribute.c GR_set_attribute.f
6. Obtaining File and Image Attribute GR_get_attribute.c GR_get_attribute.f
7. Writing a Palette GR_write_palette.c GR_write_palette.f
8. Reading a Palette GR_read_palette.c GR_read_palette.f
9. Creating and Writing a Chunked RI    

Scientific Datasets (SD):

These examples are used in Chapter 3 --Scientific Data Sets (SD API) of the HDF User's Guide.

Example Description C Example Fortran Example
1. Creating an HDF File and Empty SDS SD_create_sds.c SD_create_sds.f
2. Writing to an SDS SD_write_to_sds.c SD_write_to_sds.f
3. Writing a Slab of Data to an SDS SD_write_slab.c SD_write_slab.f
4. Altering Values within an SDS Array SD_alter_sds_values.c SD_alter_sds_values.f
5. Appending Data to an SDS Array w/Unlimited Dim SD_unlimited_sds.c SD_unlimited_sds.f
6. Compressing SDS Data SD_compress_sds.c SD_compress_sds.f
7. Moving Data to the External File SD_mv_sds_to_external.c SD_mv_sds_to_external.f
8. Reading from an SDS SD_read_from_sds.c SD_read_from_sds.f
9. Reading Subsets of an SDS SD_read_subsets.c SD_read_subsets.f
10. Getting Information about a File and SDS SD_get_info.c SD_get_info.f
11. Locating an SDS by its Name SD_find_sds_by_name.c SD_find_sds_by_name.f
12. Setting and Retrieving Dimension Information SD_set_get_dim_info.c SD_set_get_dim_info.f
13. Distinguishing a Dimension Scale from a Data Set SD_dimscale_vs_sds.c SD_dimscale_vs_sds.f
14. Setting Attributes SD_set_attr.c SD_set_attr.f
15. Reading Attributes SD_get_attr.c SD_get_attr.f
16. Calibrating Data N/A N/A
17. Writing and Reading a Chunked SDS SD_chunking_example.c SD_chunking_example.f

Vdatas (VD):

These examples are used in Chapter 4 -- Vdatas (VS API) of the HDF User's Guide.

Example Description C Example Fortran Example
1. Accessing a Vdata in an HDF File VD_create_vdatas.c VD_create_vdatas.f
2. Creating and Storing One-Field Vdatas VD_create_onefield_vdatas.c VD_create_onefield_vdatas.f
3. Writing a Vdata of Homogenous Type VD_write_to_vdata.c VD_write_to_vdata.f
4. Writing a Multi-field and Mixed Vdata with Packing VD_write_mixed_vdata.c VD_write_mixed_vdata.f
5. Reading a Vdata of Homogenous Type VD_read_from_vdata.c VD_read_from_vdata.f
6. Reading a Multi-field Mixed-type Vdata w/Packing VD_read_mixed_vdata.c VD_read_mixed_vdata.f
7. Locating a VData Containing Specified Field Names VD_locate_vdata.c VD_locate_vdata.f
8. Operations on Field and Vdata Attributes VD_set_get_vdata_attr.c VD_set_get_vdata_attr.f
9. Obtaining Vdata Information VD_get_vdata_info.c VD_get_vdata_info.f

Vgroups (VG):

These examples are used in Chapter 5 -- Vgroups (V API) of the HDF User's Guide.

Example Description C Example Fortran Example
1. Creating HDF Files and Vgroups VG_create_vgroup.c VG_create_vgroup.f
2. Adding an SDS to a New Vgroup VG_add_sds_to_vgroup.c VG_add_sds_to_vgroup.f
3. Adding Three Vdatas into a Vgroup VG_insert_vdatas_to_vgroup.c VG_insert_vdatas_to_vgroup.f
4. Obtaining Information about Lone Vgroups VG_get_vgroup_info.c VG_get_vgroup_info.f
5. Operations on Vgroup Attributes VG_set_get_vgroup_attr.c VG_set_get_vgroup_attr.f
6. Obtaining Information about Contents of Vgroup VG_vgroup_contents.c VG_vgroup_contents.f


- - Last modified: 08 August 2017