Page tree

The license could not be verified: License Certificate has expired!

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The HDF5 Image API defines a standard storage for HDF5 datasets that are intended to be interpreted as images. This version of the API is primarily concerned with two dimensional raster data, which are indexed 8 bit images (an image in which each pixel stored is an index into a table palette), and 24 bit true color images (an image where the pixel storage contains 3 color planes, red , green , blue, in this case)

  • Writing Indexed Images and Palettes
  • Writing True Color Images and Reading Images
  • Palettes

...

Writing Indexed Images and Palettes

...

The following example demonstrates how to create an indexed HDF5 image with an associated palette.

C Example

      ] --

ex_image1.c

...

Writing True Color Images and Reading Images

...

The following example demonstrates how to create indexed and true color HDF5 images. The example uses realistic image data read from ASCII files. The corresponding HDF5 file that is generated is also referenced here. You can use an HDF5 file browser that handles HDF5 images to access this file by clicking on the link below.

C Example

      ] --

ex_image2.c

      [

HDF5 file

      ] --

ex_image2.h5

8 bit raster image.
Click
for a full size image

24 bit raster image.

...

The following C program provides an examples of how to generate HDF5  image data from floating point data.  In the example, real life topographic data (from the North American hemisphere) is used. In the dataset sea values are represented as negative numbers and land values are represented as positive numbers. The example generates 3 HDF5 images, one that generates an image from all the values, another that generates an image from the land values and another that generates an image from the sea values. 

      [

C Example

      ] --

ex_image3.c

      [

HDF5 file

      ] --

ex_image3.h5

The images obtained are:

Processing all the data.
Click
for a full size image

Processing the land data.
Click
for a full size image

Processing the sea data.
Click
for a full size image

...