Gallery#
Runnable Python examples, each with its code, what it prints and the images it
makes. Each example is one script that runs on its own and is explained by its
comments. The examples on synthetic data need nothing else; those on a brain use the
simulated data of the ISMRM 2015 Tractography Challenge, which larmor.data
downloads once (see Example data).
Preprocessing#
Denoising diffusion-weighted images and removing Gibbs ringing.
Models#
Fitting the diffusion tensor (DTI) and diffusion kurtosis (DKI) models, and reading the maps they give.
Spherical deconvolution and peaks#
Estimating fibre orientation distributions (FODs) by spherical deconvolution, and finding their peaks.
FODs, peaks and asymmetric FODs of a simulated brain
Tractography#
Tracking streamlines, writing tractograms, selecting bundles, track density images, structural connectomes and tract profiles.
Files#
Reading and writing images, gradient tables and tractograms, and converting between file formats.
Viewer#
Driving BrainViewer from Python. These examples draw off screen, with no window, and
save screenshots of the views; they need the [viewer] extra and a GPU or a
software renderer, but no display.