Ruben Verweij 3590a7ec6b | 8 years ago | |
---|---|---|
docs@6e17cadb9d | 8 years ago | |
nd2reader | 8 years ago | |
sphinx | 8 years ago | |
tests | 8 years ago | |
.codeclimate.yml | 8 years ago | |
.gitignore | 8 years ago | |
.gitmodules | 8 years ago | |
.travis.yml | 8 years ago | |
CONTRIBUTING.md | 8 years ago | |
CONTRIBUTORS.txt | 8 years ago | |
LICENSE.txt | 10 years ago | |
README.md | 8 years ago | |
badge.svg | 8 years ago | |
requirements.txt | 8 years ago | |
setup.cfg | 10 years ago | |
setup.py | 8 years ago | |
test.py | 8 years ago |
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 framework, enabling easy access to multidimensional files, lazy slicing, and nice display in IPython.
The documentation is available here.
For now, the package is only available via GitHub. Install it using:
pip install --upgrade https://github.com/rbnvrw/nd2reader/tarball/master
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.
nd2reader
is an order of magnitude faster in Python 3. I recommend using it unless you have no other choice. Python 2.7 and Python >= 3.4 are supported.
nd2reader
follows the pims framework. To open a file and show the first frame:
from nd2reader import ND2Reader
import matplotlib.pyplot as plt
with 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.
Older versions of nd2reader
do not use the pims
framework. To provide backwards compatibility, a legacy Nd2 class is provided.
If you'd like to help with the development of nd2reader or just have an idea for improvement, please see the contributing page for more information.
If this fails to work exactly as expected, please open an issue. If you get an unhandled exception, please paste the entire stack trace into the issue as well.
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.