Skip to content

About

VSCode extension to explore and visualize HDF5 files

Topics

Resources

Contributing

Stars

53 stars

Watchers

5 watching

Forks

Repository files navigation

H5Web for Visual Studio Code

Explore and visualise HDF5 files directly in Visual Studio Code with H5Web and its H5WasmProvider.

GIF recording

Supported HDF5 file extensions

Out of the box, the H5Web viewer is configured as the default editor for the following file extensions: .h5, .hdf, .hdf5, hf5, .nx (NeXus), .nxs, .nx5, .nexus, .cxi (Coherent X-ray Imaging), .nc (netCDF4), .nc4, .loom, .jld2, .h5ebsd, .edaxh5, .oh5, .dream3d, .geoh5, .h5oina, .h5ad, .nde.

To add more extensions, don't hesitate to open an issue or a pull request. Alternatively, you can use VS Code's workbench.editorAssociations setting to set H5Web as the default editor for additional extensions:

"workbench.editorAssociations": {
  "*.foo": "h5web.viewer",
},

You can also open any file in H5Web with right click -> Open with... -> H5Web (any extension), or, if you've already opened the file, by switching editor type (VS Code 1.132+) or invoking View: Reopen Editor With... from the command palette:

GIF recording

Note that some of the extensions configured to open with H5Web are not guaranteed to map to HDF5 files. For instance, the .nc extension is also used for netCDF3 files, which are not based on HDF5 and are therefore not compatible with H5Web. If this is an issue, you can use the workbench.editorAssociations to restore the default editor association as follows:

"workbench.editorAssociations": {
  "*.nc": "default",
},

Supported HDF5 compression plugins

The extension supports reading datasets compressed with any of the plugins available in h5wasm-plugins@0.2.1.

Known limitations

This extension uses h5wasm to read HDF5 files and therefore suffers from the following limitations:

Files bigger than 2GB cannot be opened automatically from the VS Code Explorer

They can still be viewed with the extension. When opening such a file, the H5Web webview editor will request you to to browse and select it manually to open it.

External links cannot be resolved

This is a limitation of h5wasm that the extension uses to read HDF5 files.

Incompatiblity with snap packages and Wayland on Linux

When using the extension to view datasets with a VS Code instance installed from snap, you may encounter an error Error creating WebGL context.

This is an issue from VSCode snap package that forces the use of XWayland/X11 instead of Wayland. Since it can not be worked around, our advice is use another VSCode installation instead (e.g. via apt).

Configuration

h5web.colorScheme

Specifies whether to use a light or dark color scheme. By default, H5Web follows VS Code's theme.

After changing this setting, please reopen your H5Web editors for the new color scheme to take effect.

About

VSCode extension to explore and visualize HDF5 files

Topics

Resources

Contributing

Stars

53 stars

Watchers

5 watching

Forks

Releases

Used by

Contributors

Languages