I have matrix of grayscale pixels (8, 12 or 16 bits per pixel).
Now I can save it to HDF5 using HDF5dotNet as dataset with rank 2.
How may I save it as raster image? To view image in HDFView.
And my second question: now I can write an entire dataset (an entire matrix).
How may I write and read only one of matrix's row or column? Or change one
element of matrix dataset?
Have a look at the HDF5 Image spec http://www.hdfgroup.org/HDF5/doc/ADGuide/ImageSpec.html .
You'll need a few additional attributes (e.g., CLASS, IMAGE_SUBCLASS) to
convince HDFView
that it's dealing with an image. (I can send you an example next week if you
can't sort it out.)
Ad 2.
Have a look at sections 4 and 6 of the User's Guide
(http://www.hdfgroup.org/HDF5/doc/UG/index.html).
Using the current version of the HDFDotNet wrapper you can select a
hyperslab (or unions).
You'll be able to select points (elements) in the next drop of the HDFDotNet
wrapper.
I have matrix of grayscale pixels (8, 12 or 16 bits per pixel).
Now I can save it to HDF5 using HDF5dotNet as dataset with rank 2.
How may I save it as raster image? To view image in HDFView.
And my second question: now I can write an entire dataset (an entire
matrix).
How may I write and read only one of matrix's row or column? Or change one
element of matrix dataset?
Have a look at the HDF5 Image spec http://www.hdfgroup.org/HDF5/doc/ADGuide/ImageSpec.html .
You'll need a few additional attributes (e.g., CLASS, IMAGE_SUBCLASS) to
convince HDFView
that it's dealing with an image. (I can send you an example next week if you
can't sort it out.)
When a dataset doesn't have those attributes, one can use an Image View in HDFView to display data as an image: right click on the dataset in the Tree Window, then choose "Open As", and then choose Image in the "Data Selection" Window.
Elena
···
On Mar 22, 2011, at 11:44 AM, Gerd Heber wrote:
Ad 2.
Have a look at sections 4 and 6 of the User's Guide
(http://www.hdfgroup.org/HDF5/doc/UG/index.html\).
Using the current version of the HDFDotNet wrapper you can select a
hyperslab (or unions).
You'll be able to select points (elements) in the next drop of the HDFDotNet
wrapper.
Best, G.
-----Original Message-----
From: hdf-forum-bounces@hdfgroup.org [mailto:hdf-forum-bounces@hdfgroup.org]
On Behalf Of Pavel Rudchenko
Sent: Tuesday, March 22, 2011 8:08 AM
To: hdf-forum@hdfgroup.org
Subject: [Hdf-forum] Write raster image using HDF5dotNet
Hello.
I have matrix of grayscale pixels (8, 12 or 16 bits per pixel).
Now I can save it to HDF5 using HDF5dotNet as dataset with rank 2.
How may I save it as raster image? To view image in HDFView.
And my second question: now I can write an entire dataset (an entire
matrix).
How may I write and read only one of matrix's row or column? Or change one
element of matrix dataset?