dwi2trx

dwi2trx

A browser-only diffusion-MRI pipeline: load a DWI, fit the diffusion tensor, track streamlines, and save a TRX tractogram. Everything runs client-side — no data leaves your machine.

It is built on NiiVue (visualization), dcm2niix (image conversion), niimath (image processing), brainchop's mindgrab (masking), and GPUStreamlines to extract tracts from diffusion data.

Show vectors plots the diffusion gradient scheme (bvec/bval) in 3D — each direction as a ball at its b-vector, sized by how many samples repeat it and coloured by b-value. Inspecting it reveals the sampling distribution: whole- vs half-sphere coverage and single- vs multi-shell acquisitions. For why this matters, see the FSL eddy documentation and Winkler's Uniform directions for multi-shell diffusion MRI.

Dataset too large for the browser

dwi2trx runs entirely in your browser. JavaScript and WebAssembly require contiguous in-memory arrays and currently cannot process an input this large, even when the computer has substantially more physical RAM.

For this exceptional dataset, use a native diffusion-MRI pipeline or split/crop the acquisition before loading it. No data was uploaded or processed.

Gradient sampling scheme

Reading gradients…

Generate diffusion vectors
Shells (directions × b-value)

Set shell counts and b-values to generate a scheme.