The HDF Group

HDF User’s Guide

Version 4.2.7


[Top] [Prev][Next]


List of Examples


Chapter 1 - Introduction to HDF
Chapter 2 - HDF Fundamentals
Chapter 3 - Scientific Data Sets (SD API)
EXAMPLE 1. Creating an HDF file and an Empty SDS. 29
EXAMPLE 2. Writing to an SDS. 33
EXAMPLE 3. Writing a Slab of Data to an SDS. 36
EXAMPLE 4. Altering Values within an SDS Array. 39
EXAMPLE 5. Appending Data to an SDS Array with an Unlimited Dimension. 43
EXAMPLE 6. Compressing SDS Data. 49
EXAMPLE 7. Moving Data to the External File. 56
EXAMPLE 8. Reading from an SDS. 59
EXAMPLE 9. Reading Subsets of an SDS. 61
EXAMPLE 10. Getting Information about a File and an SDSs. 68
EXAMPLE 11. Locating an SDS by Its Name. 74
EXAMPLE 12. Setting and Retrieving Dimension Information. 83
EXAMPLE 13. Distinguishing a Dimension Scale from a Data Set in a File. 89
EXAMPLE 14. Setting Attributes. 93
EXAMPLE 15. Reading Attributes. 98
EXAMPLE 16. Calibrating Data. 111
EXAMPLE 17. Writing and Reading a Chunked SDS. 122
Chapter 4 - Vdatas (VS API)
EXAMPLE 1. Accessing a Vdata in an HDF File 144
EXAMPLE 2. Creating and Storing One-field Vdatas Using VHstoredata and VHstoredatam 152
EXAMPLE 3. Writing a Vdata of Homogeneous Type 163
EXAMPLE 4. Writing a Multi-field and Mixed-type Vdata with Packing 169
EXAMPLE 5. Reading a Vdata of Homogeneous Type 176
EXAMPLE 6. Reading a Multi-field and Mixed-type Vdata with Packing 179
EXAMPLE 7. Locating a Vdata Containing Specified Field Names 184
EXAMPLE 8. Operations on Field and Vdata Attributes 194
EXAMPLE 9. Obtaining Vdata Information 200
Chapter 5 - Vgroups (V API)
EXAMPLE 1. Creating HDF Files and Vgroups 219
EXAMPLE 2. Adding an SDS to a New Vgroup 221
EXAMPLE 3. Adding Three Vdatas into a Vgroup 225
EXAMPLE 4. Obtaining Information about Lone Vgroups 236
EXAMPLE 5. Operations on Vgroup Attributes 243
EXAMPLE 6. Obtaining Information about the Contents of a Vgroup 253
Chapter 6 - 8-Bit Raster Images (DFR8 API)
EXAMPLE 1. Writing an 8-Bit Raster Image to an HDF File 263
EXAMPLE 2. Writing a Palette and an Image in RIS8 Format 265
EXAMPLE 3. Writing a Set of Compressed 8-Bit Raster Images 267
EXAMPLE 4. Compressing and Writing a 8-Bit Raster Image 268
EXAMPLE 5. Reading an 8-Bit Raster Image 272
Chapter 7 - 24-bit Raster Images (DF24 API)
EXAMPLE 1. Writing a 24-Bit Raster Image to an HDF File 282
EXAMPLE 2. Writing 24-Bit Raster Images Using Scan-plane Interlacing 283
EXAMPLE 3. Compressing and Writing a 24-Bit Raster Image 285
EXAMPLE 4. Reading a 24-Bit Raster Image from an HDF File 288
Chapter 8 - General Raster Images (GR API)
EXAMPLE 1. Creating and Writing a Raster Image 302
EXAMPLE 2. Modifying an Existing Raster Image 305
EXAMPLE 3. Reading a Raster Image. 314
EXAMPLE 4. Obtaining File and Image Information. 323
EXAMPLE 5. Operations on File and Raster Image Attributes. 327
EXAMPLE 6. Obtaining File and Image Attribute. 332
EXAMPLE 7. Writing a Palette. 340
EXAMPLE 8. Reading a Palette. 344
EXAMPLE 9. Creating and Writing a Chunked Raster Image 351
Chapter 9 - Palettes (DFP API)
EXAMPLE 1. Writing a Palette 361
EXAMPLE 2. Reading a Palette 363
Chapter 10 - Annotations (AN API)
EXAMPLE 1. Creating File and Data Annotations 373
EXAMPLE 2. Reading File and Data Annotations 378
EXAMPLE 3. Obtaining Annotation Information 386
Chapter 11 - Single-file Annotations (DFAN API)
EXAMPLE 1. Writing a File Label and a File Description 394
EXAMPLE 2. Writing an Object Label and Description to a Scientific Data Set 396
EXAMPLE 3. Reading a File Label and a File Description 399
EXAMPLE 4. Reading an Object Label and Description 402
EXAMPLE 5. Getting a List of Labels for All Scientific Data Sets 406
Chapter 12 - Single-File Scientific Data Sets (DFSD API)
EXAMPLE 1. Creating and Writing to a DFSD Scientific Data Set 413
EXAMPLE 2. Reading from a DFSD Scientific Data Set 417
EXAMPLE 3. Assigning Predefined String Attributes to a File 425
EXAMPLE 4. Reading a Data Set and its Attribute Record 427
Chapter 13 - Error Reporting
EXAMPLE 1. Writing Errors to a Console Window 433
Chapter 14 - HDF Performance Issues
Chapter 15 - HDF Command-line Utilities
Chapter 16 - Raw Data Information
EXAMPLE 1. Getting Data Information of SDS. 504

HDF 4.2.7 - February 2012
Copyright
The HDF Group
www.hdfgroup.org
The HDF Group