Skip to main content

Browser-based GUI HDF Viewer in Python

Project description

BroH5

(Bro)wser-based GUI (H)DF(5) Viewer in Python

Web browser-based GUI software is increasingly popular for its cross-platform compatibility, but typically requires web programming knowledge.

The Nicegui framework simplifies this, enabling pure Python development of browser-based GUIs. This project uses Nicegui to create an HDF viewer, showcasing its effectiveness for local app development. Unlike other apps such as Hdfviewer, Vitables, Nexpy, or H5web, which are built using C, Java, Qt/PyQt, or HTML/JavaScript; this project is unique in being a browser-based GUI, but written entirely in Python with a minimal codebase.

Features

  • A browser-based GUI software for viewing HDF (Hierarchical Data Format) file written in pure Python with minimal codebase.

  • The software provides essential tools for viewing hdf files such as: displaying tree structures or paths to datasets/groups; and presenting datasets as values, images, plots, or tables. Users also can save datasets to images or csv formats.

    Fig_01

    Fig 04

    Fig 05

    Fig_02

  • Broh5 can view compressed hdf files by using compressors from hdf5plugin.

  • The codebase is designed using the RUI (Rendering-Utilities-Interactions) concept, which is known as the MVC (Model-View-Controller) pattern in the GUI development community. This design allows for the development of complex software and makes it easier to extend its capabilities.

Installation

Broh5 can be installed using pip, conda, or directly from the source. Users can also generate a standalone executable file for convenient usage. Details are at:

Documentation

Documentation page is at: https://broh5.readthedocs.io. Brief functionalities of broh5:

  • Users can open a hdf file by clicking the "Select file" button. Multiple hdf files can be opened sequentially.

  • Upon opening, the tree structure of the current hdf file is displayed, allowing users to navigate different branches (hdf groups) or leaves (hdf datasets). The path to datasets/groups is also displayed. If a dataset contains a string or a single float/integer value, it will be shown.

  • If dataset is a 3D array, it's presented as an image. Users can slice through various images and adjust the contrast. Slicing is available for different axes; however, for large datasets, slicing along axis 2 is disabled due to processing time. Starting from version 1.3.0, users can choose to display a zoomed area of the current image or the intensity profile across a mouse-clicked location.

  • Datasets that are 1D or 2D arrays will be shown as plots or tables, selectively.

  • Users have the option to save images or tables to disk.

Update notes

  • 30/10/2023: Published codes, deployed on pip and conda.
  • 11/02/2024: Added tab for displaying image histogram and statistical information.
  • 30/04/2024: Allow to open/save from the last opened folder.
  • 04/07/2024: Added features for image zooming and intensity profile plotting
  • 01/02/2025: Fixed a bug related to the OK button in FilePicker.
  • 05/02/2025: Updated the table-format method for nicegui 2.0 and later.

Author

Nghia T. Vo - NSLS-II, Brookhaven National Lab, USA.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

broh5-1.4.0.tar.gz (24.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

broh5-1.4.0-py3-none-any.whl (24.4 kB view details)

Uploaded Python 3

File details

Details for the file broh5-1.4.0.tar.gz.

File metadata

  • Download URL: broh5-1.4.0.tar.gz
  • Upload date:
  • Size: 24.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for broh5-1.4.0.tar.gz
Algorithm Hash digest
SHA256 3cab3796367bee6f814b02625c364542cd6dbf2f5cd345e474d75360bd166251
MD5 592e0ae72feb411e810c1b56f637879d
BLAKE2b-256 af327cd7c5518062d1a033268bf45a83bf97f323bccd7838aded83da16c1456f

See more details on using hashes here.

File details

Details for the file broh5-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: broh5-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 24.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for broh5-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 87b58155bbc333b425b9cd4f1b6dbc999fb8dc880724a8c617afcf34e8a27a39
MD5 efbad848dc26794e9c639e14d1be470b
BLAKE2b-256 efde37b1463d2bae3d75214fa27e9ecd4330ffad6959744724e9114d68dbff27

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page