Perelman School of Medicine at the University of Pennsylvania

Section for Biomedical Image Analysis (SBIA)

participating with CBICA

Generative-Discriminative Basis Learning (GONDOLA)

This software implements Generative-Discriminative Basis Learning (GONDOLA), which is explained in detail in [TMI2012] and extended later on in [MICCAI2011]. Theoretical ideas are explained in these papers, but as a brief explanation, GONDOLA provides a generative method to reduce the dimensionality of medical images while using class labels. It produces basis vectors that are useful for classification and also clinically interpretable.

When provided with two sets of labeled images as input, the software outputs features saved in the Weka Attribute-Relation File Format (ARFF) and a MATLAB data file. The program can also save basis vectors as NIfTI-1 images. Scripts are provided to find and build an optimal classifier using Weka. The software can also be used for semi-supervised cases in which a number of subjects do not have class labels (for an example, please see [TMI2012]).


Please cite [TMI2012] if any results where produced with the help of GONDOLA.


Software License

The GONDOLA software is freely available under a BSD-style open source license that is compatible with the Open Source Definition by The Open Source Initiative and contains no restrictions on use of the software.

The full license text is included with the distribution package and available online.

Software Manual

The software manual is available for download and print as PDF.

System Requirements

Operating System: Linux, OS X, or Microsoft Windows


To download please visit our GONDOLA NITRC page



An exhaustive list of minimum build dependencies, including the build tools along detailed step-by-step build, test, and installation instructions can be found in the [BASIS_REF].

Please refer to this guide first if you are uncertain about the steps summarized here or if you have problems to build, test, or install the software on your system. If this guide does not help you to resolve the issue, please contact us at sbia-software at


See the Required Packages and Optional Packages tables for a summary of the software packages required by this software and those which are optionally made use of if available.

For instructions on how to build or install these prerequisites, please refer to the documentation of the respective software package and the linked how-to guides.


This software is based on BASIS, a meta-project developed at SBIA to ease and standardize the software development, build, testing, and packaging. In particular, CMake, a cross-platform, open-source build system, is used for the configuration of the software build. For detailed instructions on how to build a software based on CMake, please refer to the [BASIS_REF].

In summary, the steps to configure the so-called build tree are:

  1. Extract source files:

    tar -xzf gondola-1.0.0-source.tar.gz
  2. Create build directory:

    mkdir gondola-1.0.0-build
  3. Change to build directory:

    cd gondola-1.0.0-build
  4. Run CMake to configure the build tree:

    ccmake -DBASIS_DIR:PATH=/path/to/basis ../gondola-1.0.0-source
    • Press c to configure the build system and e to ignore warnings.
    • Set CMAKE_INSTALL_PREFIX and other CMake variables and options.
    • Continue pressing c until the option g is available.
    • Then press g to generate the configuration files for the selected build tool.

See the [BASIS_REF] on software installation for a documentation of the provided by BASIS. The CMake options which are in particular of interest for the build of GONDOLA are documented.


After the configuration of the build tree, GONDOLA can be build using GNU Make:


After the build of the software, optionally run the tests using the command:

make test

In case of failing tests, re-run the tests, but this time by executing CTest directly with the -V option to enable verbose output and redirect the output to a text file:

ctest -V >& gondola-test.log

And send the file gondola-test.log as attachment of the issue report to sbia-software at


The final installation copies the built files and additional data and documentation files to the installation directory specified using the CMAKE_INSTALL_PREFIX option during the configuration of the build tree:

make install

After the successful installation, the build directory can be removed again.



Software Development
  • Kayhan N. Batmanghelich
  • Andreas Schuh
  • Aristeidis Sotiras:
Algorithm Development
  • Kayhan N. Batmanghelich
  • Christos Davatzikos




K. N. Batmanghelich, B. Taskar, and C. Davatzikos; Generative-Discriminative Basis Learning for Medical Imaging; IEEE Trans Med Imaging. 2012 Jan, 31(1):51-69.

[MICCAI2011] K. N. Batmanghelich, B. Taskar, D. Ye, and C. Davatzikos; Regularized Tensor Factorization for Multi-modality Medical Image Classification; MICCAI 2011, LNCS 6893, p17.