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.

25 lines
921 B

8 years ago
  1. # Tutorial
  2. ### Installation
  3. For now, the package is only available via GitHub. Install it using:
  4. ```
  5. pip install --upgrade https://github.com/rbnvrw/nd2reader/tarball/master
  6. ```
  7. 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.
  8. `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.
  9. ### Opening ND2s
  10. `nd2reader` follows the [pims](https://github.com/soft-matter/pims) framework. To open a file and show the first frame:
  11. ```python
  12. from nd2reader import ND2Reader
  13. import matplotlib.pyplot as plt
  14. with ND2Reader('my_directory/example.nd2') as images:
  15. plt.imshow(images[0])
  16. ```
  17. After opening the file, all `pims` features are supported. Please refer to the [pims documentation](http://soft-matter.github.io/pims/).