How to use HDF Group DataPlugin for HDF5

Updated Sep 20, 2022

Environment

Software

  • HDF Group DataPlugin for HDF5
  • DIAdem
  • LabVIEW

HDF Group DataPlugin for HDF5 (Hierarchical Data Format 5) is used by DIAdem to browse * .h5; * .hdf; * .hdf5; * .he5 data files. Since the installation and usage of this data plug-in is different from the usage of other data plug-ins, the settings and procedures introduced in this article are required.

Installation of HDF Group DataPlugin for HDF5

To use HDF Group DataPlugin for HDF5, download and install HDF Group DataPlugin for HDF5 2021 Q4. The installer name is ni-dataplugins-hdf5_21.3_online.exe, and when you start the exe, the installation process by the NI Package Manager starts.

The above software is not a data plugin for reading HDF data, so even if you complete the installation
DIAdem does not increase the number of data plugins. However, you can see it on the NI Package Manager for HDF Group DataPlugin --HDF5.
 
HDF Installed tab.png

To actually use the data plugin, it must be installed separately. Here, we will use the sample data plugin to check the procedure for loading the data.
 

Data plugin installation

Download and install the hdf5_example.uri attached to this article. Since hdf5_example.uri contains a sample data plugin, you can read the data by installing this data plugin.
 
hdf5 example registered.png
 

Load data using the data plugin

If you load the sample data (random.h5) attached to this document, the data will be loaded normally as shown below.
 
HDF5DataPortal.png

To see the HDF5 data in a script, use the DataStore API as in the script below. Save the script below as ReadHDF5.VBS and save it in the same folder as the attached sample data.
Option Explicit
ScriptInclude ProgramDrv & "Libr\Documents\Utils\ODS\DataStoreDialogs.vbs"
 
dim filepath : filepath = currentScriptPath & "random.h5"
 
dim param : param = "<filename readonly=""YES"">" & replace(filepath, "&", "&amp;") & "</filename>"
 
' This plugin needs an explicit enable call
EnableDataStoreAPI = "HDF5"
dim store : set store = navigator.ConnectDataStoreByParameter("HDF5", param)
 
' follow rootgroup
' Use a sud dialog to show content
call ODS_DataStoreDialogs_Content(store)
 
' the dialog show the structure that can be used in the Pluginplugin HDF5_Example.uri
 

If you execute the script with DIAdem while the above script and sample data exist in the same folder, the sample data will start to be read and you can check the data structure as shown below.
 
HDFScript.png

Was this information helpful?

Yes

No