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)

 

Anchor
wrtidx
wrtidx
     

 

Background Color
colorcyan

Writing Indexed Images and Palettes

To write an HDF5 indexed image the H5IMmake_image_8bit function is used:

...

This function accepts a parameter file_id, obtained from the basic HDF5 library function H5Fcreate, a dataset name, the width and height of the dataset, and the data. This function is most useful when associated with a palette

The following table represents a palette with 9 entries:

...

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

C Example

 

Anchor
wrttci
wrttci

 

 

Background Color
colorcyan

Writing True Color Images and Reading Images

To write an HDF5 true color image the H5IMmake_image_24bit function is used:

...

HDF5 file

8 bit raster image.
(Click on image for a full size image)

24 bit raster image.

PROGRAMMING EXAMPLE

...

The images obtained are:

Processing all the data.
(Click on image for a full size image)

Processing the land data.
(Click on image for a full size image)

Processing the sea data.
(Click on image for a full size image)

 

Anchor
palettes
palettes

 

 

Background Color
colorcyan

Palettes

A palette is the means by which color is applied to an image and is also referred to as a color lookup table. It is a table in which every row contains the numerical representation of a particular color. In the example of an 8 bit standard RGB color model palette, this numerical representation of a color is presented as a triplet specifying the intensity of red, green, and blue components that make up each color.

Like an HDF5 image, an HDF5 palette is an HDF5 dataset written with standard attributes conforming to the HDF5 Image and Palette Specification. The programming model is similar to the HDF5 image model. To create an HDF5 palette the H5IMmake_palette function is used:

...