DANTsR provides diffusion imaging extensions to ANTsR.
“Tensors? Richard had no idea what a tensor was, but he had noticed that when math geeks started throwing the word around, it meant that they were headed in the general direction of actually getting something done.”
- Neal Stephenson, Reamde (2011).
You can install the development version from GitHub with:
# install.packages("devtools")
devtools::install_github("jeffduda/DANTsR")
library(DANTsR)
img = antsImageRead("yourfile.nii.gz")
fa = dtiAnisotrpyImage(img, "FractionalAnisotropy")
ra = dtiAnisotropyImage(img, "RelativeAnisotropy")
eig = dtiEigenSystem(img)
dec = dtiColorMap(img)
seeds = labelsToPoints( fa > 0.1 )