Browse Source

#56 clearer README, auto-install dependencies, build numpy from source in Docker

zolfa-add_slices_loading
Jim Rybarski 9 years ago
parent
commit
1fc449a6e0
5 changed files with 31 additions and 16 deletions
  1. +2
    -1
      CHANGELOG.md
  2. +8
    -5
      Dockerfile
  3. +1
    -1
      Makefile
  4. +15
    -8
      README.md
  5. +5
    -1
      setup.py

+ 2
- 1
CHANGELOG.md View File

@ -7,7 +7,8 @@
- Unit tests
### CHANGED
- Made the interface for most metadata public.
- Switched to setuptools to automatically install missing dependencies
- Made the interface for most metadata public
- Refactored some poorly-named things
## [1.0.0] - 2015-05-23


+ 8
- 5
Dockerfile View File

@ -3,14 +3,17 @@ MAINTAINER Jim Rybarski <jim@rybarski.com>
RUN mkdir -p /var/nds2
RUN apt-get update && apt-get install -y --no-install-recommends \
python-numpy \
python3-numpy \
build-essential \
libatlas3-base \
liblapack-dev \
libblas-dev \
python \
python3 \
python-dev \
python3-dev \
python-pip \
python3-pip
RUN pip install six
RUN pip3 install six
COPY . /opt/nd2reader
WORKDIR /opt/nd2reader
RUN python setup.py install


+ 1
- 1
Makefile View File

@ -1,4 +1,4 @@
.PHONY: build shell
.PHONY: build py2shell py3shell test
build:
docker build -t jimrybarski/nd2reader .


+ 15
- 8
README.md View File

@ -10,16 +10,19 @@
### Installation
Just use pip (`numpy` is required):
Dependencies will automatically be installed if you don't have them. That said, for optimal performance, you should
install the following packages before installing nd2reader:
`pip install numpy nd2reader`
#### Ubuntu
`apt-get install python-numpy python-six` (Python 2.x)
`apt-get install python3-numpy python3-six` (Python 3.x)
If you want to install via git, clone the repo and run:
#### Other operating systems
These have not been tested yet.
```
pip install numpy
python setup.py install
```
nd2reader is compatible with both Python 2.x and 3.x. I recommend installing using pip:
`pip install nd2reader` (Python 2.x) or `pip3 install nd2reader` (Python 3.x)
### ND2s
@ -50,7 +53,7 @@ You can also get some metadata about the nd2 programatically:
### Images
`nd2reader` will always return an `Image` object, which contains some metadata about the image as well as the
Every method returns an `Image` object, which contains some metadata about the image as well as the
raw pixel data itself. Images are always a 16-bit grayscale image. The `data` attribute holds the numpy array
with the image data:
@ -162,6 +165,10 @@ You can also see how many images are in your image set:
7
```
### Protips
nd2reader is about 14 times faster under Python 3.4 compared to Python 2.7. If you know why, please get in touch!
### Bug Reports and Features
If this fails to work exactly as expected, please open a Github issue. If you get an unhandled exception, please


+ 5
- 1
setup.py View File

@ -1,10 +1,14 @@
from distutils.core import setup
from setuptools import setup
VERSION = "1.1.0"
setup(
name="nd2reader",
packages=['nd2reader', 'nd2reader.model'],
install_requires=[
'numpy>=1.6.2, <2.0',
'six>=1.4, <2.0'
],
version=VERSION,
description='A tool for reading ND2 files produced by NIS Elements',
author='Jim Rybarski',


Loading…
Cancel
Save