On 03/08/2015 06:50 PM, Elena Pourmal wrote:
Hi Roger,

On Mar 2, 2015, at 8:42 AM, Roger Martin<[email protected]>  wrote:

Hi,

When writing a generic interface what is a good mechanism to identify an object 
as an Image, a Lite, a Table or Packet Table?


Objects created by the Lite, Table and Packet Table interfaces do not differ 
from the HDF5 objects created by the low level HDF5 interfaces. Lite interface
allow to create/write/read datasets and attributes of atomic datatypes with 
less HDF5 functions calls. Table APIs facilitate creation and access
to the HDF5 datasets with compound datatypes, while Packet Table API focus on 
appending data to the datasets.

Image and Palette are the only HDF5 objects that do have some specific 
characteristics defined by the HDF5 Image specification ( see 
http://www.hdfgroup.org/HDF5/doc/ADGuide/ImageSpec.html). Two of the H5IM 
functions H5IMis_image 
(http://www.hdfgroup.org/HDF5/doc/HL/RM_H5IM.html#H5IMis_image) and 
H5IMis_palette 
(http://www.hdfgroup.org/HDF5/doc/HL/RM_H5IM.html#H5IMis_palette) verify that 
an HDF5 dataset satisfies HDF5 image or palette specification.


The HDFView looks like it goes by low level and the properties describe them as 
datasets.

Yes, this is correct.

Is there a good combination of H5T interfaces(and others) to determine the 
above?

Lite, Table, and Image have “info” functions to find the properties that can be 
set by those interfaces (dimension sizes and datatypes). For Packet Table, one 
has to use H5T functions to get information about datatypes.

I see Packet Table has an isvalid but that is available only after opening a 
Packet table

H5PTis_valid just checks that identifier is valid and it can be passed to other 
Packet Table functions. It is not like H5IMis_image that checks against Image 
spec.

Did I answer your questions?
Hi Elena, you've clarified the current status:-) I probably didn't write a clear question. When I make a layer API to h5 it defines the h5's "schema", what is in it and what is a member of what etc. And I know when/where to retrieve using the different high level interfaces.

But when someone provides an h5 in general I would like to be able to use the high level functions; pull a table using the H5TB or a dataset with H5LT for example. Without the user providing a specification. I've started writing some heuristics to determine if a dataset is compatible to a high level interface. Was thinking these would be handy and was looking for the most efficient and fail proof means.


Elena

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Elena Pourmal  The HDF Group  http://hdfgroup.org
1800 So. Oak St., Suite 203, Champaign IL 61820
217.531.6112
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5



_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

Reply via email to