FastWarp#
FastWarp registers 3-D images on the GPU. It runs the rigid, affine and SyN registration of ANTs on a graphics card and writes the same transform files as ANTs, so the rest of an ANTs-based pipeline can stay as it is.
FastWarp is a Python package with a compiled Rust engine. It is meant for people who build or run neuroimaging pipelines, for example to normalize brain MRI onto a template, and who use ANTs for that today.
A 7 T scan of one subject of the public SNSX dataset registered onto the MNI 2009c template with the default settings (how the figure is made).
A full normalization in one call: centre of mass, Rigid, Affine, then SyN.
Rigid or affine fits of one image pair, several in a row on images prepared once.
Resampling and field composition like ANTs’
antsApplyTransforms, on the CPU.A command line,
fastwarp, for the same steps on NIfTI files.
import ants
import fastwarp
fixed = ants.image_read(ants.get_ants_data("mni"))
moving = ants.image_read(ants.get_ants_data("ch2"))
info = fastwarp.register_syn(fixed, moving, "out/ch2_to_mni_")
warped = ants.apply_transforms(fixed, moving, ["out/ch2_to_mni_Composite.h5"])
Where to go next#
Install the wheel from PyPI, check that FastWarp finds your GPU, or build from source.
Register one brain image onto a template with public sample data.
How it works, images, output files, recipes, linear fits, resampling and GPU memory.
Every public function, class, constant and exception, with its parameters.
How speed and accuracy are measured against ANTs, and what the tests check today.
No GPU found, too little GPU memory, and why results differ slightly from ANTs.
FastWarp is research software, licensed under the Apache License 2.0 and maintained by Richard Köhler and Jan Philipp Payonk. If you use it in your work, please cite it.