`nd2reader` is a pure-Python package that reads images produced by NIS Elements.
`nd2reader` is a pure-Python package that reads images produced by NIS Elements.
.nd2 files contain images and metadata, which can be split along multiple dimensions: time, fields of view (xy-plane), focus (z-plane), and filter channel.
.nd2 files contain images and metadata, which can be split along multiple dimensions: time, fields of view (xy-plane), focus (z-plane), and filter channel.
`nd2reader` produces data in numpy arrays, which makes it trivial to use with the image analysis packages `scikit-image` and `OpenCV`.
`nd2reader` produces data in numpy arrays, which makes it trivial to use with the image analysis packages such as `scikit-image` and `OpenCV`.
### Installation
### Installation
@ -20,9 +18,9 @@ If you want to install via git, clone the repo and run:
`python setup.py install`
`python setup.py install`
### Usage
### Simple Iteration
nd2reader provides two main ways to view image data. For most cases, you'll just want to iterate over each image:
For most cases, you'll just want to iterate over each image:
```
```
import nd2reader
import nd2reader
@ -31,10 +29,12 @@ for image in nd2:
do_something(image.data)
do_something(image.data)
```
```
### Image Sets
If you have complicated hierarchical data, it may be easier to use image sets, which groups images together if they
If you have complicated hierarchical data, it may be easier to use image sets, which groups images together if they