qipipe - Quantitative Imaging pipeline¶
qipipe processes DICOM study images.
The following instructions assume that you start in your home directory.
We recommend the Anaconda environment for scientific packages and pip
for the remaining Python packages. Install
qipipe using the
qipipedependencies hosted by Anaconda:
wget -q --no-check-certificate -O \ - https://www.github.com/ohsu-qin/qipipe/raw/master/requirements_conda.txt \ | xargs conda install --yes
wget -q --no-check-certificate -O \ - https://www.github.com/ohsu-qin/qipipe/raw/master/constraints.txt \ > /tmp/constraints.txt
qipipepackage using pip:
pip install qipipe --constraint /tmp/constraints.txt && rm /tmp/constraints.txt
pushd ~/workspace git clone git://github.com/stnava/ANTs.git mkdir $HOME/ants cd $HOME/ants ccmake ../workspace/ANTs cmake #=> Enter “c" #=> Enter “g” #=> Exit back to the terminal make -j 4 popd
Then, prepend ANTS to your shell login script. E.g., for Linux or Mac OS X, open an editor on
$HOME/.bash_profileand add the following lines:
# Prepend ANTS to the path. ANTS_HOME=$HOME/ants export PATH=$ANTS_HOME/bin
and refresh your environment:. $HOME/.bash_profile
Run the following command for the pipeline options:
Download the source by cloning the source repository, e.g.:
cd ~/workspace git clone https://github.com/ohsu-qin/qipipe.git cd qipipe
Installing from a local qipipe clone requires the constraints option:
pip install -c constraints.txt -e .
Testing is performed with the nose package, which can be installed separately as follows:
conda install nose
The unit tests are then run as follows:
API documentation is built automatically by ReadTheDocs when the
project is pushed to GitHub. The modules documented are defined in
doc/api. If you add a new Python file to a package directory
pkg, then include it in the
doc/apipkg ``.rst`` file.
Documentation can be generated locally as follows:
Install Sphinx and
docutils, if necessary:
conda install Sphinx docutils
Run the following in the
Read The Docs builds occur in a limited context that sometimes fails
on dependencies, e.g. when an install a requires C extension. In that
case, the project has a
eliminates the problematic dependency and specify the requirements
file in the Read The Docs project Advance Settings.
pip install twine
The release is then published as follows:
Confirm that the unit tests run without failure.
Add a one-line summary release theme to
Commit these changes:
git add --message 'Bump version.' History.rst qipipe/__init__.py
Merge changes on a branch to the current master branch, e.g.:
git checkout master git pull git merge --no-ff <branch>
Reconfirm that the unit tests run without failure.
Build the release:
python setup.py sdist
Upload the release:
twine upload dist/qipipe-<version>.tar.gz
Tag the release:
git tag v<n.n.n>
Update the remote master branch:
git push git push --tags