Installation

Important

The libvips and OpenSlide packages are required, but not available on PyPi. You will need to make sure your environment has these packages available.

Important

Windows is VERY finicky with OpenSlide, and it’s not always straightforward. The recommended way for windows users is through Docker.

With Conda (Preferred)

The preferred method uses miniconda because there are several necessary modules that cannot be installed with pip. To install miniconda:

$ sudo apt-get update
$ wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
$ bash miniconda.sh -b -p $HOME/miniconda
$ source "$HOME/miniconda/etc/profile.d/conda.sh"
$ hash -r
$ conda config --set always_yes yes --set changeps1 no
$ conda update -q conda

Once conda is installed, then you can install dicom_wsi:

$ conda config --add channels bioconda
$ conda config --add channels conda-forge
$ conda create -q -n test-environment python pyvips openjpeg libtiff
$ conda activate test-environment
$ pip install -U -r requirements_dev.txt

If using iSyntax files, you also need libtiff http://download.osgeo.org/libtiff/tiff-4.1.0.zip

Stable release

To install dicom-wsi, run this command in your terminal (assuming you already have the non-pip installed libraries):

$ pip install dicom_wsi

If you don’t have pip installed, this Python installation guide can guide you through the process.

From sources

The sources for dicom-wsi can be downloaded from the Github repo.

You can either clone the public repository:

$ git clone git://github.com/Steven-N-Hart/dicom_wsi

Or download the tarball:

$ curl -OJL https://github.com/Steven-N-Hart/dicom_wsi/tarball/master

Once you have a copy of the source, you can install it with:

$ python setup.py install

With Docker

You can also build a container using Docker:

$ docker build -t stevennhart/dicom_wsi .

Development with PyCharm

If you are going to do some development work with PyCharm, you will need to copy the binary files into your venv.