Skip to main content
Ctrl+K

Larmor

  • Install
  • Gallery
  • User guide
  • Viewer
  • Background
  • Reference
  • Agents
  • About
  • Install
  • Gallery
  • User guide
  • Viewer
  • Background
  • Reference
  • Agents
  • About

Section Navigation

  • Preprocessing
    • Denoising a DWI with MP-PCA
    • Denoising, then removing Gibbs ringing
  • Models
    • Fitting DKI to a real brain
    • Fitting DKI to a synthetic signal
    • DTI of a simulated brain
    • Fitting DTI to a synthetic tensor
  • Spherical deconvolution and peaks
    • Fitting FODs to a synthetic signal
    • FODs, peaks and asymmetric FODs of a simulated brain
    • Finding the peaks of FODs
  • Tractography
    • Structural connectomes
    • Bringing an atlas region into diffusion space
    • Track density images
    • Whole-brain tractography of a simulated brain
    • Tracking streamlines through crossing bundles
    • Tract profiles: FA along a bundle
    • Writing a tractogram batch by batch
  • Files
    • Reading and writing files
    • Reading MRIToolkit results from MATLAB files
  • Viewer
    • Moving around the 2D views
    • The 3D view
    • 4D images in the viewer
    • DTI colours in the viewer
    • FOD glyphs in the viewer
    • A parcellation in the viewer
    • Peaks in the viewer
    • A brain in the viewer
    • Separate views and rotation videos
    • Saving and reopening a viewer session
    • Surfaces in the viewer
    • Tractograms in the viewer
    • Streamlines as tubes
    • Volumes and overlays in the viewer
  • Gallery

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.

Denoising a DWI with MP-PCA

Denoising a DWI with MP-PCA

Denoising, then removing Gibbs ringing

Denoising, then removing Gibbs ringing

Models#

Fitting the diffusion tensor (DTI) and diffusion kurtosis (DKI) models, and reading the maps they give.

Fitting DKI to a real brain

Fitting DKI to a real brain

Fitting DKI to a synthetic signal

Fitting DKI to a synthetic signal

DTI of a simulated brain

DTI of a simulated brain

Fitting DTI to a synthetic tensor

Fitting DTI to a synthetic tensor

Spherical deconvolution and peaks#

Estimating fibre orientation distributions (FODs) by spherical deconvolution, and finding their peaks.

Fitting FODs to a synthetic signal

Fitting FODs to a synthetic signal

FODs, peaks and asymmetric FODs of a simulated brain

FODs, peaks and asymmetric FODs of a simulated brain

Finding the peaks of FODs

Finding the peaks of FODs

Tractography#

Tracking streamlines, writing tractograms, selecting bundles, track density images, structural connectomes and tract profiles.

Structural connectomes

Structural connectomes

Bringing an atlas region into diffusion space

Bringing an atlas region into diffusion space

Track density images

Track density images

Whole-brain tractography of a simulated brain

Whole-brain tractography of a simulated brain

Tracking streamlines through crossing bundles

Tracking streamlines through crossing bundles

Tract profiles: FA along a bundle

Tract profiles: FA along a bundle

Writing a tractogram batch by batch

Writing a tractogram batch by batch

Files#

Reading and writing images, gradient tables and tractograms, and converting between file formats.

Reading and writing files

Reading and writing files

Reading MRIToolkit results from MATLAB files

Reading MRIToolkit results from MATLAB files

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.

Moving around the 2D views

Moving around the 2D views

The 3D view

The 3D view

4D images in the viewer

4D images in the viewer

DTI colours in the viewer

DTI colours in the viewer

FOD glyphs in the viewer

FOD glyphs in the viewer

A parcellation in the viewer

A parcellation in the viewer

Peaks in the viewer

Peaks in the viewer

A brain in the viewer

A brain in the viewer

Separate views and rotation videos

Separate views and rotation videos

Saving and reopening a viewer session

Saving and reopening a viewer session

Surfaces in the viewer

Surfaces in the viewer

Tractograms in the viewer

Tractograms in the viewer

Streamlines as tubes

Streamlines as tubes

Volumes and overlays in the viewer

Volumes and overlays in the viewer
On this page
  • Preprocessing
  • Models
  • Spherical deconvolution and peaks
  • Tractography
  • Files
  • Viewer