
  Section of Biomedical Image Analysis
  Department of Radiology
  University of Pennsylvania
  3600 Market Street, Suite 380
  Philadelphia, PA 19104

  Web:   http://www.rad.upenn.edu/sbia/
  Email: sbia-software at uphs.upenn.edu

  Copyright (c) 2012 University of Pennsylvania.



INTRODUCTION
============

  This document contains the build and installation instructions.

  For general build and installation instructions which apply to any software
  developed on top of the SBIA Build system And Software Implementation Standard
  (BASIS) [1], please refer to the INSTALL-basis document which can be either found
  in the doc/ directory of your BASIS installation or online at [2].



OBTAINING A COPY OF THE SOFTWARE
================================

  Please see corresponding section in the INSTALL-basis document [2].



INSTALLING A BINARY DISTRIBUTION PACKAGE
========================================

  Please see corresponding section in the INSTALL-basis document [2].



RUNTIME REQUIREMENTS
====================

  This software requires the following langauge interpreters:

  - Bash

    Web Site: http://www.gnu.org/software/bash/
    Download: n/a

  - Perl

    Web Site: http://www.perl.org/
    Download: http://www.perl.org/get.html

  - Python

    Web Site: http://www.python.org/
    Download: http://www.python.org/download/

  Additionally, the following modules have to be installed for these languages:

  - NumPy

    Web:      http://numpy.scipy.org/
    Download: http://sourceforge.net/projects/numpy/files/NumPy/
    Ubuntu:   python-numpy

  - PyNIfTI
  
    Web:      http://niftilib.sourceforge.net/pynifti/
    Download: http://sourceforge.net/projects/niftilib/files/pynifti/
    Ubuntu:   python-nifti



BUILDING THE SOFTWARE FROM SOURCES
==================================

  In the following, only the additional build dependencies and CMake settings
  available to configure this software package are summarized. For a list of
  general build dependencies and step-by-step instructions on how to use CMake
  and GNU Make to build and install the software, please refer to the
  corresponding section in the INSTALL-basis document [2].


  Bundle Build
  ------------

  For the convenient build of this software together with its prerequisites,
  a CMake configuration file which uses CMake's ExternalProject command in
  order to download, configure, build, and install the prerequisites, and then
  this software can be found in the build/ directory of the source distribution
  package.
  
  Of all prerequisites, the bundle build only includes the following. All other
  prerequisites yet need to be installed separately.

  - BASIS 2.0.0
  - GSL 1.15

  Note: This bundle build may require an internet connection if not all required
        packages are included in the build/ directory to be able to download the
        source packages of the prerequisites.

  The steps for building the entire bundle of this software package are:

  1. Change into the build/ directory of the source package:

     $ cd dtidroid-1.0.0-source/build

  2. Run CMake to configure the build:

     $ ccmake .

     In particular, configure the CMAKE_INSTALL_PREFIX where the software and
     its prerequisites should be installed.

  3. Build and install the software and its prerequisite libraries:

     $ make

     Note that if the CMAKE_INSTALL_PREFIX is only writable by the super user,
     you need to run GNU Make either as root user or with sudo.

  4. Remove all temporary source and build files from build/ directory (optional):

     $ make clean


  Build Dependencies
  ------------------

  Attention: The Bash, Perl, Python, and the NumPy and PyNifti modules have to
             be installed prior to the build of this software. See the runtime
             requirements for more details on these dependencies.

  - BASIS 2.0 or greater

    Web Site: http://www.rad.upenn.edu/sbia/software/basis/
    Download: http://www.rad.upenn.edu/sbia/software/distributions/basis-2.0.0-source.tar.gz

    This project is based on BASIS, a meta-project developed at SBIA to
    standardize and simplify the software development.

  - GNU Scientific Library (GSL) 1.13 or greater

    Web Site: http://www.gnu.org/software/gsl/
    Download: http://gnu.mirrorcatalogs.com/gsl/gsl-1.13.tar.gz
    Ubuntu:   libgsl0-dev


  CMake Options
  -------------

  GSL_CONFIG          Path of gsl-config executable, e.g., /usr/bin/gsl-config.
  PythonModules_DIR   Paths to NumPy and PyNifti packages, separated by ';' if
                      these are installed in different locations.


  Advanced CMake Options
  ----------------------

  BASH_EXECUTABLE            The installed Bash executable (i.e., usually /bin/bash).
  GSL_INCLUDE_DIR            Directory of include files of GSL.
  PERL_EXECUTABLE            The installed Perl interpreter executable.
  PYTHON_EXECUTABLE          The installed Python interpreter executable.
  PythonModules_numpy_PATH   Path to installed NumPy package (containing numpy/ subdirectory).
  PythonModules_nifti_PATH   Path to installed PyNifti package (containing nifti/ subdirectory).



REFERENCES
==========

  [1] http://www.rad.upenn.edu/sbia/software/basis/

  [2] Visit http://www.rad.upenn.edu/sbia/software/installation.html or see
      the INSTALL-basis document in the doc/ directory of the BASIS installation.
