BART commands as functions#
bartorch.tools exposes BART’s command-line applications that have no
operator or pipeline counterpart here, one function per command, run in this
process. Array arguments and results are C-order tensors in BART’s dimension
order reversed (Data layout and conventions), and axis arguments are
axis indices rather than BART bitmasks;
the results of a BART command are not recorded by autograd. Functions marked wrapped have a
hand-written signature; the others are generated from BART’s declaration of the
command and take its options under their long names. Reconstructions are
bartorch.apps, or an encoding from bartorch.linop under a solver
from bartorch.optim; Interfaces and execution compares the
two routes. The last two sections, corrections and rigid motion, hold
functions and classes with no BART command behind them.
Simulation#
Sampling and trajectories#
Object |
Description |
|---|---|
Cartesian, radial and golden-angle trajectories in grid units (wrapped) |
|
Sampling grid coordinates in image space or k-space |
|
Sampling pattern of a k-space array |
|
Poisson-disc sampling pattern |
|
Regular undersampling pattern with a fully sampled centre |
|
Indices of a RAGA (rational approximation of the golden angle) radial ordering |
|
Radial data gridded onto a Cartesian grid by GROG |
|
Point spread function of a trajectory |
|
Wave-CAIPI point spread function in hybrid space |
|
Image dimensions implied by a non-Cartesian trajectory |
|
Gradient-delay estimation from radial data |
|
Gradient-delay correction of a trajectory |
|
Removal of an angle-dependent frequency from radial data |
|
Binning of data by labels, including respiratory and cardiac quadrature binning |
|
Singular spectrum analysis (SSA-FARY) of a time series |
Coil calibration and compression#
Object |
Description |
|---|---|
Sensitivities by ESPIRiT (wrapped) |
|
Sensitivities directly from the low-resolution k-space centre (wrapped) |
|
Calibration matrix of the k-space centre |
|
Second stage of ESPIRiT calibration |
|
Walsh coil combination, for use with |
|
Image and sensitivities jointly by nonlinear inversion (wrapped) |
|
Sensitivities from non-Cartesian data by nonlinear inversion (ENLIVE) |
|
Coil compression matrix (SVD, geometric or ESPIRiT) |
|
Application of a coil compression matrix |
|
Coil compression by region-optimized virtual coils (ROVir) |
|
Noise prewhitening from a noise measurement, optionally returning the whitening matrix and the noise covariance (wrapped) |
|
Noise variance of white Gaussian noise |
|
Detection of phase poles in sensitivities |
Preprocessing, registration and metrics#
Object |
Description |
|---|---|
Field-of-view shift of k-space by a linear phase (wrapped) |
|
Homodyne partial-Fourier reconstruction of asymmetrically sampled k-space |
|
Resampling on an affinely mapped grid (wrapped) |
|
Resampling through a displacement field (wrapped) |
|
Affine registration by mutual information (wrapped) |
|
Non-rigid registration by greedy SyN or TV-L1 optical flow (wrapped) |
|
Sub-voxel translation from the phase of the cross-spectrum (wrapped) |
|
Normalized root-mean-square error, optionally after least-squares scaling (wrapped) |
|
Mean squared error (wrapped) |
|
Peak signal-to-noise ratio of the magnitudes (wrapped) |
|
Structural similarity of the magnitudes (wrapped) |
|
Statistic over a region of interest (wrapped) |
Low-rank completion#
Corrections#
Corrections applied to data or images outside the reconstruction. Bias field
and gradient nonlinearity correction resample with SimpleITK
(pip install 'bartorch[correct]'), and spiral deblurring uses Triton on a
CUDA device when it is installed. Susceptibility correction runs PyHySCO,
which is GPL-3.0-only, is not distributed with bartorch and is imported only
when correct_susceptibility is called
(pip install 'bartorch[pyhysco]').
Object |
Description |
|---|---|
Band-limited resampling of a ramp-sampled EPI readout onto a uniform grid |
|
Odd/even phase of an EPI readout, fitted to a three-line navigator |
|
Reversal of EPI lines into forward readout order, with the odd/even phase removed |
|
Receive-field (bias) correction by N4 |
|
Spherical-harmonic coefficient table of a gradient coil |
|
Protocol for a coefficient table that is not a file |
|
Gradient nonlinearity correction of images from a coefficient table |
|
Off-resonance field map from the phase of single-echo coil images |
|
Readout time of a spiral arm as a function of k-space radius |
|
Low-rank factorization of the off-resonance transfer of a spiral readout |
|
Fit of a |
|
Off-resonance deblurring of a spiral image |
|
Susceptibility distortion correction from a reversed phase-encoding pair, by PyHySCO |
|
Corrected pair and displacement field from |