-
Notifications
You must be signed in to change notification settings - Fork 29
SIRF SuperBuild Ubuntu 16.04
This manual explains how to install the SIRF-SuperBuild and its dependencies on a clean Ubuntu 16.04 system and run a simple MR and PET image reconstruction using Python.
Note that these instructions should also work for most recent Ubuntu versions. We have tried Lubuntu 15.10 and Ubuntu 17.04. In principle, this might work for other Debian-based systems as well but we have not tested this.
The installation is done in a new folder devel in ~/Documents
cd ~/Documents
mkdir devel
cd devel
sudo apt-get install build-essential git g++
You probably want Python support
sudo apt-get install python-matplotlib python-dev python-docopt
One of the PET Python demos (steepest_ascent.py) requires scipy. If you want to run it, you need to install python-scipy
sudo apt-get install python-scipy
Please check also our pages with specific instructions for SIRF and MATLAB, and SIRF and Python.
sudo apt-get install \
h5utils \
liblapack-dev \
libace-dev
With the SIRF SuperBuild also the siemens_to_ismrmrd package can be installed. This package allows for the transformation of Siemens MR raw data to the ISMRMRD raw data format, which is the format used by SIRF for MR raw and image data. Siemens_to_ismrmrd requires the following dependencies:
libxml2-dev \
libxslt-dev
Installing the following will add extra functionality to Gadgetron which you might want (but are currently not used by SIRF).
python-h5py \
python-libxml2 \
python-psutil \
libplplot-dev
Optionally install CUDA suport if you have a NVidia GPU
sudo apt-get install nvidia-cuda-toolkit
Optionally install MKL, see our separate page including some info on harmless warnings you will get if you don't install MKL.
Follow README.md to install the SIRF-SuperBuild.
Note that if you want to use MATLAB, you need to use (and specify) a compiler supported by MATLAB and might have to tell CMake where MATLAB is located. Please check our SIRF and MATLAB page.
As opposed to running CMake with default options, you could run cmake-gui
or ccmake
to select some
options. You could for instance decide to use Ubuntu packages for some of the dependencies after installing
sudo apt-get install libfftw3-dev libboost-all-dev libhdf5-serial-dev \
libarmadillo-dev libgtest-dev swig
More detail on this is out-of-scope for this page can be found here.
git clone https://github.com/ismrmrd/ismrmrd-python-tools.git
cd ismrmrd-python-tools/
python setup.py install --user
(or use python3
of course if that's your version)
If you didn't add the PATH statement to your .bashrc, you will have to repeat them in this terminal first
gadgetron
Run this in your original terminal
cd ~/Documents/devel/SIRF-SuperBuild/SIRF/examples/Python/MR
python fully_sampled_recon.py
cd ~/Documents/devel/SIRF-SuperBuild/SIRF/examples/Python/PET
python osem_reconstruction.py