Documentation

Programs

Every program and module LARMORX ports, grouped by the software it comes from. Open a group to see what each program does, which ports it has and how far each port is validated.

Each program has two pages. Its reference says what it does, its command line, its Python call, its options and examples. Its evidence shows how its ports compare with the original, in figures: how the cases of its records agree with the original, how the differences that remain compare with the original’s own variability, what it does on real data, and its speed where a benchmark report exists. The main repository’s code draws every figure from a committed record (docs/figures.md), and its provenance is linked beneath it. So far bet, bet2 and betsurf have their reference page; the others link their API page in the repository until theirs is written.

A port is a replica, translated from the original’s source to give its results bit for bit, or a clean room, written without that source and built for speed; some programs have both (what the words mean). Each port’s status is the one its record states:

  • experimental: the tests of its part pass, but the extensive tests of the final validation phase (the data panel, long random-testing runs, the full comparison) are still to come; or a case of its record still fails;
  • validated: every case of its record passes, and those extensive tests have been run;
  • stable: validated, and its Python and command-line interface no longer change.

From now on a port’s part leaves it experimental, even where every case of its record agrees, and the final validation phase makes it validated. The ports marked validated before this definition (2026-11-12) keep their status, since every case of their record passed: ANTs’ programs, which have their data panel since 2026-10-27, and others, among them most of AFNI’s, sdcflows’ and the replicas of mcflirt and bet (the full list). The final validation phase gives them the rest of the evidence. Most ports since 2026-10-28 were left experimental even where every case agrees. In full: what each status means.

ANTs and ITK

13 programs and 1 modulecompared with ANTs 2.6.5 on ITK 5.4.5replica larmorx Apache-2.0
  • antsRegistration registers one image to another, stage by stage.

    larmorx ants antsRegistration lx.ants.registration

    • replica validated
  • N4BiasFieldCorrection removes a smooth intensity bias field from an image.

    larmorx ants N4BiasFieldCorrection lx.ants.n4_bias_field_correction

    • replica validated
  • DenoiseImage denoises an image by adaptive non-local means.

    larmorx ants DenoiseImage lx.ants.denoise_image

    • replica validated
  • antsApplyTransforms resamples an image onto the grid of a reference image through a chain of ITK transforms (linear transforms, displacement fields, B-spline transforms and composites of them), or writes the chain itself as one transform.

    larmorx ants antsApplyTransforms lx.ants.apply_transforms

    • replica validated
  • ImageMathprogram

    ImageMath applies one operation to an image (and to a second image or numbers): arithmetic, intensity clipping and scaling, Gaussian filters, binary and grayscale morphology, hole filling, padding, connected components and distance maps.

    larmorx ants ImageMath lx.ants.image_math

    • replica validated
  • ThresholdImage sets the voxels between two bounds to one value and the others to another, or labels an image’s classes by Otsu’s thresholds.

    larmorx ants ThresholdImage lx.ants.threshold_image

    • replica validated
  • MultiplyImages multiplies an image by another image or by a number.

    larmorx ants MultiplyImages lx.ants.multiply_images

    • replica validated
  • SmoothImage smooths an image with a Gaussian of a given sigma, in voxels or in millimetres, or filters it with a median over a box of a given radius.

    larmorx ants SmoothImage lx.ants.smooth_image

    • replica validated
  • ResampleImage resamples an image onto a grid with a new spacing or a new size, keeping its origin and direction, by linear, nearest-neighbour, Gaussian, windowed-sinc or B-spline interpolation, and writes it in one of ANTs’ eight pixel types.

    larmorx ants ResampleImage lx.ants.resample_image

    • replica validated
  • ResampleImageBySpacing resamples an image onto a grid with a new spacing, keeping its origin and direction, after smoothing it with a Gaussian where the spacing grows, by linear or nearest-neighbour interpolation.

    larmorx ants ResampleImageBySpacing lx.ants.resample_image_by_spacing

    • replica validated
  • antsAIprogram

    antsAI finds the linear transform that best aligns two images.

    larmorx ants antsAI lx.ants.ai

    • replica validated
  • antsAffineInitializer finds an affine transform that aligns two images.

    larmorx ants antsAffineInitializer lx.ants.affine_initializer

    • replica validated
  • Atroposprogram

    Atropos segments an image into tissue classes by a finite mixture model with a Markov random field prior.

    larmorx ants Atropos lx.ants.atropos

    • replica validated
  • transforms-hdf5module

    ITK’s transform files, text, MATLAB and HDF5 (.h5), read and written in pure Rust.

    lx.transforms.read

    compared with ITK 5.4.5 on HDF5 1.12.1

    • replica validated

AFNI

4 programscompared with AFNI 26.3.05replica larmorx Apache-2.0, with AFNI's CC BY 4.0 creditclean room larmorx Apache-2.0
  • 3dTshiftprogram

    3dTshift corrects slice timing: it aligns every slice of a 4D series to one time origin.

    larmorx afni 3dTshift lx.afni.tshift

    • replica validated
    • clean room validated
  • 3dAutomaskprogram

    3dAutomask makes a brain mask from an EPI series or a skull-stripped anatomical image.

    larmorx afni 3dAutomask lx.afni.automask

    • replica validated
    • clean room validated
  • 3dUnifizeprogram

    3dUnifize makes the white-matter intensity of a T1-weighted volume uniform across space and scales it to about 1000 (or, with -T2, of a T2-weighted one; with -EPI, of an EPI series).

    larmorx afni 3dUnifize lx.afni.unifize

    • replica validated
    • clean room validated
  • 3dvolregprogram

    3dvolreg registers every volume of a series to a base volume with a rigid-body (6-parameter) transform.

    larmorx afni 3dvolreg lx.afni.volreg

    • replica validated
    • clean room experimental

FSL

26 programscompared with FSL 6.0.7.23replica larmorx-nc FSL Licence: non-commercial use onlyclean room larmorx Apache-2.0
  • mcflirtprogram

    mcflirt corrects head motion in a 4D series.

    larmorx fsl mcflirt larmorx mri hmc lx.mri.hmc

    • replica validated
    • clean room experimental
  • betprogram

    bet finds the brain in a head image.

    larmorx fsl bet lx.fsl.bet

    • replica validated
    • clean room experimental
  • bet2program

    bet2 is FSL’s brain extraction itself, which the bet script runs.

    larmorx fsl bet2 lx.fsl.bet2

    • replica validated
    • clean room experimental
  • betsurfprogram

    betsurf finds the inner skull, the outer skull and the scalp of a head, from bet2’s brain surface (-e), the T1 image (and a T2) and the T1’s registration to MNI152.

    larmorx fsl betsurf lx.fsl.betsurf

    • replica validated
    • clean room experimental
  • flirtprogram

    flirt registers one image to another with an affine transform, with every cost function and boundary-based registration (BBR).

    larmorx fsl flirt lx.fsl.flirt

    • replica experimental
    • clean room experimental
  • convert_xfm is FLIRT’s matrix tool: it inverts a 4 × 4 matrix (-inverse), composes two (-concat) and gives a matrix another’s scales and skews (-fixscaleskew).

    larmorx fsl convert_xfm lx.fsl.convert_xfm

    • replica experimental
    • clean room experimental
  • avscaleprogram

    avscale takes a FLIRT matrix apart: its rotation and translation, angles, scales, skews, determinant and half transforms.

    larmorx fsl avscale lx.fsl.avscale

    • replica experimental
    • clean room experimental
  • img2imgcoord maps coordinates from one image to another through a FLIRT matrix: voxels by default, millimetres with -mm.

    larmorx fsl img2imgcoord lx.fsl.img2imgcoord

    • replica experimental
    • clean room experimental
  • std2imgcoord maps coordinates from a standard image to an image through the inverse of a FLIRT matrix: millimetres by default, the image’s voxels with -vox.

    larmorx fsl std2imgcoord lx.fsl.std2imgcoord

    • replica experimental
    • clean room experimental
  • img2stdcoord maps coordinates from an image to a standard image through a FLIRT matrix: input voxels by default, output in the standard image’s millimetres.

    larmorx fsl img2stdcoord lx.fsl.img2stdcoord

    • replica experimental
    • clean room experimental
  • rmsdiffprogram

    rmsdiff measures how far apart two FLIRT matrices are: the RMS deviation in millimetres over 80 mm about the reference’s centre of gravity or, with a mask, the largest and the RMS displacement over the mask’s voxels.

    larmorx fsl rmsdiff lx.fsl.rmsdiff

    • replica experimental
    • clean room experimental
  • makerotprogram

    makerot writes the 4 × 4 matrix of a rotation by theta degrees about an axis through a centre (or through the centre of an image).

    larmorx fsl makerot lx.fsl.makerot

    • replica experimental
    • clean room experimental
  • midtransprogram

    midtrans finds the transform from a template space to the “middle” of several transforms into that space.

    larmorx fsl midtrans lx.fsl.midtrans

    • replica experimental
    • clean room experimental
  • pointflirtprogram

    pointflirt finds the affine matrix that maps one set of points onto another, in the least-squares sense.

    larmorx fsl pointflirt lx.fsl.pointflirt

    • replica experimental
    • clean room experimental
  • applyxfm4Dprogram

    applyxfm4D resamples each volume of a series onto a reference’s grid, through one matrix or one per volume.

    larmorx fsl applyxfm4D lx.fsl.applyxfm4d

    • replica experimental
    • clean room experimental
  • pairregprogram

    pairreg is a script that registers one brain to another and refines the result with the two heads’ skulls.

    larmorx fsl pairreg lx.fsl.pairreg

    • replica experimental
    • clean room experimental
  • extracttxtprogram

    extracttxt is a script that prints the lines of a text file from the first line that matches a word.

    larmorx fsl extracttxt lx.fsl.extracttxt

    • replica experimental
    • clean room experimental
  • aff2rigidprogram

    aff2rigid is a script that turns FLIRT’s 12-parameter matrix from an image to standard space into a 6-parameter (rigid) one.

    larmorx fsl aff2rigid lx.fsl.aff2rigid

    • replica experimental
    • clean room experimental
  • fastprogram

    fast segments a skull-stripped brain image into tissue classes (by default CSF, grey matter and white matter) with a hidden Markov random field fitted by expectation-maximisation.

    larmorx fsl fast lx.fsl.fast

    • replica experimental
    • clean room experimental
  • topupprogram

    topup estimates the off-resonance field (Hz) that displaces echo-planar images along their phase encoding, from two or more images acquired with different phase encodings (typically “blip up” and “blip down”), with each image’s rigid-body movement if asked.

    larmorx fsl topup lx.fsl.topup

    • replica experimental
    • clean room experimental
  • applytopupprogram

    applytopup corrects images with topup’s result, by Jacobian modulation of each image or by the least-squares restoration of pairs with opposite phase encodings.

    larmorx fsl applytopup lx.fsl.applytopup

    • replica experimental
    • clean room experimental
  • fslmathsprogram

    fslmaths reads one image, applies a chain of operations to it from left to right and writes the result.

    larmorx fsl fslmaths lx.fsl.fslmaths

    • replica experimental
    • clean room experimental
  • fslstatsprogram

    fslstats prints statistics of an image, per volume, per label or as JSON.

    larmorx fsl fslstats lx.fsl.fslstats

    • replica experimental
    • clean room experimental
  • fslroiprogram

    fslroi takes a box of an image (xmin xsize ymin ysize zmin zsize), a range of its volumes (tmin tsize) or both.

    larmorx fsl fslroi lx.fsl.fslroi

    • replica validated
    • clean room experimental
  • standard_space_roi is a script that masks an image or cuts it down with a region of a standard space.

    larmorx fsl standard_space_roi lx.fsl.standard_space_roi

    • replica validated
    • clean room experimental
  • preludeprogram

    prelude unwraps a phase image (radians) inside a mask.

    larmorx fsl prelude lx.fsl.prelude

    • replica experimental
    • clean room experimental

tedana

1 programcompared with tedana 26.0.3replica larmorx-gpl GPL-3.0clean room larmorx Apache-2.0 from the next release
  • t2smapprogram

    t2smap estimates the T2* and S0 of multi-echo fMRI voxel by voxel and combines the echoes into one series.

    larmorx tedana t2smap lx.tedana.t2smap

    • replica experimental
    • clean room experimental from the next release

sdcflows

1 program and 3 modulescompared with sdcflows 2.17.1, with niworkflows 1.15.4 and pybids 0.22.0replica larmorx Apache-2.0
  • sdcflowsprogram

    sdcflows finds the field-map estimators of a BIDS dataset (PEPOLAR, direct and fieldmap-less), runs their workflows and writes their derivatives:

    larmorx sdcflows sdcflows lx.sdcflows.run_app

    • replica validated
  • fieldmapmodule

    sdcflows’ B-spline field fit, the field evaluated and applied, and the phase-difference preparation.

    lx.sdcflows

    • replica validated
  • niworkflows-helpersmodule

    The interfaces of niworkflows that sdcflows’ and fMRIPrep’s field-map steps run.

    lx.niworkflows

    compared with niworkflows 1.15.4

    • replica validated
  • bidsmodule

    A BIDS dataset’s index, as pybids’ BIDSLayout gives it, in memory, without its database.

    lx.bids

    compared with pybids 0.22.0

    • replica validated

fMRIPrep

1 program and 5 modulescompared with fMRIPrep's own steps, and the libraries they callreplica larmorx Apache-2.0
  • resample-seriesmodule

    fMRIPrep’s one-shot resampler: head motion, susceptibility distortion and the transforms to a target space applied to a BOLD series in one cubic interpolation.

    lx.transforms.resample_series

    compared with fMRIPrep’s ResampleSeries, nitransforms 25.1.0, SciPy 1.18.1

    • replica validated
  • fieldmap-stepsmodule

    fMRIPrep’s steps between sdcflows’ field-map estimators and the one-shot resampler: the field map evaluated on a reference’s grid, and the distortion parameters.

    lx.transforms.reconstruct_fieldmap

    compared with fMRIPrep 25.2.7

    • replica experimental
  • confoundsmodule

    fMRIPrep’s confound estimation, ported step by step: CompCor, DVARS, framewise displacement, the motion parameters and the rest of fMRIPrep’s confounds file.

    lx.confounds

    compared with nipype 1.12.0, niworkflows 1.15.4 and fMRIPrep 25.2.7

    • replica experimental from the next release
  • nipypecli run lists a module’s interfaces, prints an interface’s help, and runs one interface from the shell, in the current folder.

    larmorx nipype run lx.nipype.run

    compared with nipype 1.12.0

    • replica experimental from the next release
  • ndimage-filtersmodule

    SciPy’s ndimage filters, morphology, labelling and watershed, under sdcflows’ and fMRIPrep’s steps.

    lx.ndimage

    compared with SciPy 1.18.1

    • replica validated
  • skimagemodule

    scikit-image’s ball, Otsu threshold, random walker and histogram matching, under sdcflows’ brain mask.

    lx.skimage

    compared with scikit-image 0.26.0

    • replica validated

LARMORX's own

1 moduleLARMORX's own larmorx Apache-2.0
  • iomodule

    NIfTI-1 and NIfTI-2 images read and written (lx.load, lx.save, lx.Image), compared with nibabel.

    lx.load

    • LARMORX's own validated

FreeSurfer

PlannedFreeSurfer 8.2.0

Every program complete, a replica in its own package, larmorx-freesurfer, and a clean room built for speed. FreeSurfer's roadmap

Workbench

PlannedConnectome Workbench and MSM

Surface tools compatible with Connectome Workbench and MSM. Roadmap

larmorx mri hmc is the clean room of FSL’s mcflirt under a name of its own. larmorx fsl mcflirt runs the replica when larmorx-nc is installed, else the clean room, and larmorx --implementation clean-room fsl mcflirt chooses the clean room (from the next release; in 0.1.0rc1, LARMORX_IMPLEMENTATION=original). tedana’s t2smap has its clean room from the next release; 0.1.0rc1 has only its replica, in larmorx-gpl. fMRIPrep’s confound estimation (lx.confounds) is ported (roadmap); its reference and evidence pages come next. How the ports are compared with their originals, and what each verdict means: Validation.