Skip to content

Commit b037e92

Browse files
committed
Merge branch 'master' of https://github.com/soft-matter/pims_nd2
2 parents c3c6572 + 29a10d3 commit b037e92

File tree

1 file changed

+24
-10
lines changed

1 file changed

+24
-10
lines changed

README.md

+24-10
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,39 @@
1-
pims_nd2
2-
========
1+
pims_nd2 : A reader for Nikon .ND2
2+
==================================
3+
[![build status](https://travis-ci.org/soft-matter/pims_nd2.png?branch=master)](https://travis-ci.org/soft-matter/pims_nd2)
34

4-
This package lets [pims](https://github.com/soft-matter/pims) interface with the [ND2SDK](http://www.nd2sdk.com) for fast reading of Nikon *.nd2 files.
5+
This package contains a fast reader for Nikon *.nd2 files. Because the reader is based on [Nikon binaries](http://www.nd2sdk.com), this reader is also compatible with older versions of *.nd2 files. The reader is written in the [pims](https://github.com/soft-matter/pims) framework, enabling easy access to multidimensional files, lazy slicing, and nice IPython representation.
56

6-
This is implemented on Windows, Linux and OSX systems.
7+
Installation
8+
------------
9+
10+
pims_nd2 is implemented on Windows, Linux and OSX systems. To obtain the latest stable version, install via PyPi:
11+
12+
pip install pims_nd2
13+
14+
The ND2 SDK binaries are included in the package and will be copied into the `pims_nd2` package folder.
715

816
Dependencies
917
------------
1018

11-
This reader is based on `pims.FramesSequenceND`, which is available from version 0.3. Apart from [pims](https://github.com/soft-matter/pims) there are no extra dependencies. The required c libraries are included and will be added to the PATH variable at runtime.
19+
This reader is based on `pims.FramesSequenceND`, which is available from pims version 0.3.0. Apart from [pims](https://github.com/soft-matter/pims) there are no extra dependencies.
1220

1321
Examples
1422
--------
1523

16-
The following code opens the demo file included in the package and iterates through the first 3 frames. Note that frames are only read when necessary.
24+
The following code opens a movie file and displays a frame. Frames are only actually read when necessary.
25+
26+
from pims import ND2_Reader
27+
frames = ND2_Reader('some_movie.nd2')
28+
frames[82] # display frame 82
29+
30+
The following code opens the multidimensional demo file included in the package and iterates through the first 3 frames. Note in the first lines, we tell the reader which axis to iterate over and which axes to include in one frame. Also we select the first channel for reading.
1731

18-
from pims_nd2 import ND2_Reader
32+
from pims import ND2_Reader
1933
with ND2_Reader('cluster.nd2') as frames:
20-
frames.iter_axes = 't'
21-
frames.bundle_axes = 'zyx'
22-
frames.default_coords['c'] = 1
34+
frames.iter_axes = 't' # 't' is the default already
35+
frames.bundle_axes = 'zyx' # when 'z' is available, this will be default
36+
frames.default_coords['c'] = 1 # 0 is the default setting
2337
for frame in frames[:3]:
2438
# do something with 3D frames in channel 1
2539

0 commit comments

Comments
 (0)