Giter Site home page Giter Site logo

open-science-tools / nd2reader Goto Github PK

View Code? Open in Web Editor NEW
45.0 5.0 28.0 27.41 MB

Pure Python library for reading NIS Elements ND2 images and metadata

Home Page: http://www.lighthacking.nl/nd2reader

License: GNU General Public License v3.0

Python 98.41% Makefile 0.44% Batchfile 1.12% HTML 0.03%
nd2 pims nikon nis-elements microscopy microscopy-images

nd2reader's Introduction

nd2reader

Anaconda-Server Badge Anaconda-Server Badge Build status

About

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.

Documentation

The documentation is available here.

Installation

The package is available on PyPi. Install it using:

pip install nd2reader

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. Python >= 3.5 are supported.

Installation via Conda Forge

Installing nd2reader from the conda-forge channel can be achieved by adding conda-forge to your channels with:

conda config --add channels conda-forge

Once the conda-forge channel has been enabled, nd2reader can be installed with:

conda install nd2reader

It is possible to list all of the versions of nd2reader available on your platform with:

conda search nd2reader --channel conda-forge

ND2s

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.

Backwards compatibility

Older versions of nd2reader do not use the pims framework. To provide backwards compatibility, a legacy Nd2 class is provided.

Contributing

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.

Bug Reports and Features

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.

Acknowledgments

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.