You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
3.0 KiB

10 years ago
7 years ago
3 years ago
7 years ago
7 years ago
7 years ago
4 years ago
9 years ago
7 years ago
7 years ago
7 years ago
7 years ago
9 years ago
7 years ago
9 years ago
9 years ago
9 years ago
  1. # nd2reader
  2. [![Anaconda-Server Badge](https://anaconda.org/conda-forge/nd2reader/badges/version.svg)](https://anaconda.org/conda-forge/nd2reader)
  3. [![Anaconda-Server Badge](https://anaconda.org/conda-forge/nd2reader/badges/downloads.svg)](https://anaconda.org/conda-forge/nd2reader)
  4. [![Build status](https://github.com/rbnvrw/nd2reader/actions/workflows/python-package.yml/badge.svg)](https://github.com/rbnvrw/nd2reader/actions/workflows/python-package.yml)
  5. ### About
  6. `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.
  7. 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.
  8. ### Documentation
  9. The documentation is available [here](http://www.lighthacking.nl/nd2reader/).
  10. ### Installation
  11. The package is available on PyPi. Install it using:
  12. ```
  13. pip install nd2reader
  14. ```
  15. 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.
  16. Python >= 3.5 are supported.
  17. #### Installation via Conda Forge
  18. Installing `nd2reader` from the `conda-forge` channel can be achieved by adding `conda-forge` to your channels with:
  19. ```
  20. conda config --add channels conda-forge
  21. ```
  22. Once the `conda-forge` channel has been enabled, `nd2reader` can be installed with:
  23. ```
  24. conda install nd2reader
  25. ```
  26. It is possible to list all of the versions of `nd2reader` available on your platform with:
  27. ```
  28. conda search nd2reader --channel conda-forge
  29. ```
  30. ### ND2s
  31. `nd2reader` follows the [pims](https://github.com/soft-matter/pims) framework. To open a file and show the first frame:
  32. ```python
  33. from nd2reader import ND2Reader
  34. import matplotlib.pyplot as plt
  35. with ND2Reader('my_directory/example.nd2') as images:
  36. plt.imshow(images[0])
  37. ```
  38. After opening the file, all `pims` features are supported. Please refer to the [pims documentation](http://soft-matter.github.io/pims/).
  39. #### Backwards compatibility
  40. 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.
  41. ### Contributing
  42. 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
  43. for more information.
  44. ### Bug Reports and Features
  45. If this fails to work exactly as expected, please open an [issue](https://github.com/rbnvrw/nd2reader/issues).
  46. If you get an unhandled exception, please paste the entire stack trace into the issue as well.
  47. ### Acknowledgments
  48. PIMS modified version by Ruben Verweij.
  49. Original version by Jim Rybarski. Support for the development of this package was partially provided by the [Finkelstein Laboratory](http://finkelsteinlab.org/).