Menu

Linux Installation

Michael Hansen Thomas Sangild Sørensen Souheil Inati

Linux is the preferred operating system to get started using the Gadgetron. All of the required dependencies are included in most major Linux distributions and can be installed easily and without having to compile anything. In the following sections we walk you through the required steps to set up a full Gadgetron installation. We assume that you are starting with a freshly installed Ubuntu 12.04 available from the Ubuntu website (http://www.ubuntu.com). If you don't have a machine available for installing Ubuntu, you can always try it out in a virtual machine using virtualization software such as VirtualBox (https://www.virtualbox.org).

If you would like to use the GPU components included in the Gadgetron and you have an Nvidia GPU available on your system, please complete the CUDA/CULA installations as described in [Linux CUDA Setup].

If you would like to use a RedHat6 or CentOS 6 or equivalent system, please refer to the [Linux RHEL Installation].

First install all dependencies for Gadgetron. The following will install everything you need:

 sudo apt-get install libhdf5-serial-dev cmake libxerces-c-dev xsdcxx doxygen git-core libboost-all-dev build-essential libfftw3-dev h5utils hdf5-tools libqt4-dev libglew1.6-dev docbook5-xml docbook-xsl-doc-pdf docbook-xsl-doc-html docbook-xsl-ns xsltproc fop python-dev python-numpy freeglut3-dev libxi-dev liblapack-dev libxml2-dev libxslt-dev libarmadillo-dev libace-dev python-h5py python-matplotlib python-libxml2 gcc-multilib python-psutil libgtest-dev

If you would like to use MKL (Intel Math Kernel Library), please download your installation file from Intel and do the installation. Here is what we did with MKL version 11.0.5.192:

tar -xzvf l_mkl_11.0.5.192_intel64.tgz 
cd l_mkl_11.0.5.192_intel64/
sudo ./install.sh

Follow the instructions and add the following paths to your ~/.bashrc::

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/intel/mkl/lib/intel64

You will also need to install Armadillo from source, skip the libarmadillo-dev package above. Download latest armadillo from http://arma.sourceforge.net and unpack, build and install. If you have MKL installed, this will pick it up and build the armadillo libs against it.
cd armadillo-3.900.6/
cmake
make; sudo make install

Next download, compile, and install ISMRMRD (there are more detailed instructions on the http://ismrmrd.sourceforge.net website):

  git clone git://git.code.sf.net/p/ismrmrd/code ismrmrd-code
  cd ismrmrd-code/
  mkdir build
  cd build
  cmake ../
  make
  sudo make install

Last command will install the library in /usr/local/ismrmrd.

Next download the Gadgetron source code. Either obtain a release zip file or use git:

  git clone git://git.code.sf.net/p/gadgetron/gadgetron

Git users might want be "up to date" on the development branch

  git checkout development

Configure and build the Gadgetron:

  cd gadgetron/
  mkdir build
  cd build
  cmake ../
  make

Install (default location is /usr/local/gadgetron):

sudo make install

The final step is to add/modify a few environment variables in your
~/.bashrc file:

export GADGETRON_HOME=/usr/local/gadgetron
export ISMRMRD_HOME=/usr/local/ismrmrd
export PATH=$PATH:$GADGETRON_HOME/bin:$ISMRMRD_HOME/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GADGETRON_HOME/lib:$ISMRMRD_HOME/lib

Rename the example configuration file
GADGETRON_HOME/config/gadgetron.xml.example to
GADGETRON_HOME/config/gadgetron.xml

You are now set up to run a simple example reconstruction as outlined in [Gadgetron Hello World].


Related

Wiki: Gadgetron Clients
Wiki: Gadgetron Hello World
Wiki: Gadgetron Streaming Architecture
Wiki: Gadgetron Toolboxes
Wiki: Linux CUDA Setup
Wiki: Linux RHEL Installation
Wiki: List of Dependencies
Wiki: Manual
Wiki: Windows Installation

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.