Skip to main content

The bonndit package contains the latest diffusion imaging tools developed at the University of Bonn.

Project description

bonndit Documentation Status

The bonndit package contains the latest diffusion imaging tools developed at the University of Bonn. This early release focuses on our framework for single and multi tissue deconvolution using constrained higher-order tensor fODFs. In addition, it includes code for fitting the Diffusional Kurtosis (DKI) model. More will follow as time permits.


To install bonndit, run the following command

$ pip install bonndit


  • stdeconv: Script to calculate white matter response function and fiber orientation distribution functions (fODFs) from a single shell diffusion signal.
  • mtdeconv: Script to calculate multi tissue response functions and fiber orientation distribution functions (fODFs) from multi shell or DSI signals.
  • kurtosis: Script to fit a kurtosis model using quadratic cone programming to guarantee a minimum diffusivity. It also calculates kurtosis measures based on the fitted model.
  • All functionality implemented in an object oriented manner.
  • Multiprocessing support implemented in the underlying infrastructure for faster computations
  • Logs written to your output directory

Getting Started

For calculating the multi-tissue response functions and the fODFs for given data run the following command:

$ mtdeconv -i /path/to/your/data --verbose True

The specified folder should contain the following files:

  • bvecs: b-vectors
  • bvals: b-values
  • data.nii.gz: The diffusion weighted data
  • dti_FA.nii.gz: Diffusion tensor Fractional Anisotropy map
  • fast_pve_0.nii.gz: CSF mask
  • fast_pve_1.nii.gz: GM mask
  • fast_pve_2.nii.gz: WM mask
  • dti_V1.nii.gz: The first eigenvector of the diffusion tensor

The dti_* files can be generated using FSL’s dtifit. The fast_* files can be generated from coregistered T1 weighted images using FSL’s fast.

Optional, but recommended to greatly speed up computation:

  • mask.nii.gz: Binary mask, specifying brain voxels in which to estimate the model

If you want to see a list of parameters type the following:

$ mtdeconv -h


If you use our software as part of a scientific project, please cite the corresponding publications. The method implemented in stdeconv and mtdeconv was first introduced in

  • Michael Ankele, Lek-Heng Lim, Samuel Groeschel, Thomas Schultz: Fast and Accurate Multi-Tissue Deconvolution Using SHORE and H-psd Tensors. In: Proc. Medical Image Analysis and Computer-Aided Intervention (MICCAI) Part III, pp. 502-510, vol. 9902 of LNCS, Springer, 2016

It was refined and extended in

  • Michael Ankele, Lek-Heng Lim, Samuel Groeschel, Thomas Schultz: Versatile, Robust, and Efficient Tractography With Constrained Higher-Order Tensor fODFs. In: Int’l J. of Computer Assisted Radiology and Surgery, 12(8):1257-1270, 2017

The use of quadratic cone programming to make the kurtosis fit more stable which is implemented in kurtosis has been explained in the methods section of

  • Samuel Groeschel, G. E. Hagberg, T. Schultz, D. Z. Balla, U. Klose, T.-K. Hauser, T. Nägele, O. Bieri, T. Prasloski, A. MacKay, I. Krägeloh-Mann, K. Scheffler: Assessing white matter microstructure in brain regions with different myelin architecture using MRI. In: PLOS ONE 11(11):e0167274, 2016

PDFs can be obtained from the respective publisher, or the academic homepage of Thomas Schultz:



This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.


0.1.2 (2019-02-06)

  • ‘mtdeconv’: If response is available, files needed for the computation of the response are not loaded.

0.1.1 (2019-02-06)

  • First release on PyPI.

0.1.0 (2019-02-06)

  • Making repository public on Github

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bonndit-0.1.2.tar.gz (155.1 kB view hashes)

Uploaded source

Built Distribution

bonndit-0.1.2-py3-none-any.whl (64.1 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page