Skip to content

Instructions

Sebastiano Ferraris edited this page Aug 16, 2017 · 11 revisions

The tools and manager in the code can be installed as a python package on a virtualenv (strongly recommended as it is recommended to avoid installing this package on system python interpreter). It is based on NiftyReg, NiftySeg, ITK-snap and some python (2.7) standard libraries

  • Install NiftySeg

  • Install NiftyReg

  • Install ITK-snap

  • Install python requirements in requirements.txt with

    pip install -r requirements.txt

in a virtualenv.

To use as a package in a virtualenv.

  1. activate the virtualenvironment and go in the root folder of the repository.
  • To install as a library (option 1):

python setup.py sdist

cd ../

pip install LabelManager/dist/LabelsManager-XX.tar.gz

where XX is the chosen version.

  • To install as a library (option 2):

python setup.py install

python setup.py develop

  • To install in development mode (option 2)

pip install -e .

  • To verify that it works:

python

from labels_manager.main import LabelsManager as LM

lm = LM('/some/folder')

To uninstall:

pip uninstall LabelsManager

To delete the library in the virtualenv in case something really wrong happen and pip uninstall will not work correctly:

sudo rm -rf /path_to_site_packages_in_virtualenv/site-packages/LabelsManager*

Clone this wiki locally