Metadata-Version: 2.1
Name: broh5
Version: 1.2.0
Summary: Browser-based GUI HDF Viewer in Python
Home-page: https://github.com/algotom/broh5
Download-URL: https://github.com/algotom/broh5.git
Author: Nghia Vo
Author-email: nvo@bnl.gov
License: Apache 2.0
Keywords: HDF Viewer,NXS Viewer,Browser-based GUI
Platform: Any
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Natural Language :: English
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>1.21
Requires-Dist: h5py>3.7
Requires-Dist: hdf5plugin
Requires-Dist: pillow
Requires-Dist: matplotlib
Requires-Dist: nicegui>1.4.5

# 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](https://nicegui.io/) 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](https://github.com/algotom/broh5/raw/main/figs/fig_01.png)

  ![Fig_02](https://github.com/algotom/broh5/raw/main/figs/fig_02.png)

- Broh5 can view compressed hdf files by using compressors from
  [hdf5plugin](https://pypi.org/project/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. The name 'MVC' may not be very intuitive for 
  those new to GUI development. However, this design allows for the development 
  of complex software and makes it easier to extend its capabilities.

Installation
------------

Broh5 can be installed using [pip](https://pypi.org/project/broh5/),
[conda](https://anaconda.org/conda-forge/broh5), or directly from the
[source](https://broh5.readthedocs.io/en/latest/toc/installation.html#installing-from-source). 
Users can also generate a [standalone executable file](https://broh5.readthedocs.io/en/latest/toc/installation.html#generating-a-standalone-executable-file) 
for convenient usage. Details are at:

  - https://broh5.readthedocs.io/en/latest/toc/installation.html

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.
  - 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: Publish codes, deploy on pip and conda.
- 11/02/2024: Add tab for displaying image histogram and statistical information.
- 30/04/2024: Allow to open/save from the last opened folder.
 
Author
------

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