Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nvladimus/npy2bdv
Fast writing of numpy 3d-arrays into HDF5 Fiji/BigDataViewer files.
https://github.com/nvladimus/npy2bdv
bigdataviewer h5 hdf5 numpy
Last synced: 6 days ago
JSON representation
Fast writing of numpy 3d-arrays into HDF5 Fiji/BigDataViewer files.
- Host: GitHub
- URL: https://github.com/nvladimus/npy2bdv
- Owner: nvladimus
- License: gpl-3.0
- Created: 2019-08-20T16:10:51.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-08-22T10:26:53.000Z (6 months ago)
- Last Synced: 2025-02-07T12:12:39.881Z (13 days ago)
- Topics: bigdataviewer, h5, hdf5, numpy
- Language: Python
- Homepage:
- Size: 4.13 MB
- Stars: 35
- Watchers: 6
- Forks: 12
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# npy2bdv
A library for writing/reading HDF5/XML datasets of
Fiji BigDataViewer/BigStitcher format as numpy arrays.
[](https://www.python.org/downloads/release/python-360/)
[](https://www.gnu.org/licenses/gpl-3.0)
## Installation
Run `pip install npy2bdv` in the command line. Use `import npy2bdv` in the code.
## Documentation
For a quick start, see examples in the Jupyter
[`notebook`](/docs/examples/examples_h5writing.ipynb).API [documentation](https://nvladimus.github.io/npy2bdv/).
## Supported H5/XML writing options
* compression methods `None`, `gzip`, `lzf` (`None` by default).
* downsampling options:
- any number of mipmap levels
- computed via averaging, compatible with BigDataViewer/BigStitcher convention.
* user-defined block sizes for H5 storage (default `4,256,256`)
* any number of time points, illuminations, channels, tiles, angles.
* arbitrary affine transformation for each individual view (e.g. translation, rotation, shear).
* arbitrary voxel calibration for each view, to account for spatial anisotropy.
* individual views can differ in dimensions, voxel size, voxel units, exposure time, and exposure units.
* missing views are labeled in XML automatically.
* support of additional meta-information:
- camera properties: `name`, `exposureTime`, `exposureUnits`
- `microscope` (name and version), `user`
* writing virtual stacks of arbitrary size, by plane or sub-stack. Handy when your stack is larger than your RAM.
- virtual stacks can be written with multiple subsampling levels and compression.
## New features
See [Recent changes](CHANGELOG.md)
## Writing speed
Currently speeds betewen 150 - 320 MB/s were achieved with confidence. Speeds of up to 2300 MB/s reported in earlier versions are likely due to bugs in testing methods in notebook [`examples_h5writing.ipynb`](/docs/examples/examples_h5writing.ipynb). More tesing is underway.## Acknowledgements
This code was inspired by [Talley Lambert's](https://github.com/tlambert03/imarispy) code
and improved by generous input from Adam Glaser, [VolkerH](https://github.com/VolkerH), Doug Shepherd,
[Peter H](https://github.com/abred), [Mike Taormina](https://github.com/miketaormina) and [Pradeep Rajasekhar](https://github.com/pr4deepr).
To report issues or bugs please use the [issues](https://github.com/nvladimus/npy2bdv/issues) tool.
## Citation
You can cite it like so
[](https://zenodo.org/badge/latestdoi/203410946)## Support
If you find this library useful, send me some love :blush:It will give me some dopamine and motivation to keep improving it :heart: