Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Open-Science-Tools/nd2reader
Pure Python library for reading NIS Elements ND2 images and metadata
https://github.com/Open-Science-Tools/nd2reader
microscopy microscopy-images nd2 nikon nis-elements pims
Last synced: 29 days ago
JSON representation
Pure Python library for reading NIS Elements ND2 images and metadata
- Host: GitHub
- URL: https://github.com/Open-Science-Tools/nd2reader
- Owner: Open-Science-Tools
- License: gpl-3.0
- Created: 2017-02-14T15:47:40.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-02-25T05:49:58.000Z (10 months ago)
- Last Synced: 2024-09-23T20:18:07.532Z (3 months ago)
- Topics: microscopy, microscopy-images, nd2, nikon, nis-elements, pims
- Language: Python
- Homepage: http://www.lighthacking.nl/nd2reader
- Size: 26.8 MB
- Stars: 45
- Watchers: 5
- Forks: 28
- Open Issues: 33
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: COPYING
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-biological-image-analysis - Nd2reader - A pure-Python package that reads images produced by NIS Elements 4.0+. (Other)
README
# nd2reader
[![Anaconda-Server Badge](https://anaconda.org/conda-forge/nd2reader/badges/version.svg)](https://anaconda.org/conda-forge/nd2reader)
[![Anaconda-Server Badge](https://anaconda.org/conda-forge/nd2reader/badges/downloads.svg)](https://anaconda.org/conda-forge/nd2reader)
[![Build status](https://github.com/rbnvrw/nd2reader/actions/workflows/python-package.yml/badge.svg)](https://github.com/rbnvrw/nd2reader/actions/workflows/python-package.yml)### About
`nd2reader` is a pure-Python package that reads images produced by NIS Elements 4.0+. It has only been definitively tested on NIS Elements 4.30.02 Build 1053. Support for older versions is being actively worked on.
The reader is written in the [pims](https://github.com/soft-matter/pims) framework, enabling easy access to multidimensional files, lazy slicing, and nice display in IPython.### Documentation
The documentation is available [here](http://www.lighthacking.nl/nd2reader/).
### Installation
The package is available on PyPi. Install it using:
```
pip install nd2reader
```If you don't already have the packages `numpy`, `pims`, `six` and `xmltodict`, they will be installed automatically if you use the `setup.py` script.
Python >= 3.5 are supported.#### Installation via Conda Forge
Installing `nd2reader` from the `conda-forge` channel can be achieved by adding `conda-forge` to your channels with:
```
conda config --add channels conda-forge
```Once the `conda-forge` channel has been enabled, `nd2reader` can be installed with:
```
conda install nd2reader
```It is possible to list all of the versions of `nd2reader` available on your platform with:
```
conda search nd2reader --channel conda-forge
```### ND2s
`nd2reader` follows the [pims](https://github.com/soft-matter/pims) framework. To open a file and show the first frame:
```python
from nd2reader import ND2Reader
import matplotlib.pyplot as pltwith ND2Reader('my_directory/example.nd2') as images:
plt.imshow(images[0])
```After opening the file, all `pims` features are supported. Please refer to the [pims documentation](http://soft-matter.github.io/pims/).
#### Backwards compatibility
Older versions of `nd2reader` do not use the `pims` framework. To provide backwards compatibility, a legacy [Nd2](http://www.lighthacking.nl/nd2reader/nd2reader.html#module-nd2reader.legacy) class is provided.
### Contributing
If you'd like to help with the development of nd2reader or just have an idea for improvement, please see the [contributing](https://github.com/rbnvrw/nd2reader/blob/master/CONTRIBUTING.md) page
for more information.### Bug Reports and Features
If this fails to work exactly as expected, please open an [issue](https://github.com/rbnvrw/nd2reader/issues).
If you get an unhandled exception, please paste the entire stack trace into the issue as well.### Acknowledgments
PIMS modified version by Ruben Verweij.
Original version by Jim Rybarski. Support for the development of this package was partially provided by the [Finkelstein Laboratory](http://finkelsteinlab.org/).