A package providing ANTs features in R as well as imaging-specific data representations, spatially regularized dimensionality reduction and segmentation tools. See also the Neuroconductor site.
License: Apache License 2.0
Maintainer: Brian B. Avants
URL: homepage
BugReports: github issues
NeedsCompilation: yes
Travis checks: ANTsR results
Documentation: https://antsx.github.io/ANTsR/.
Try the binder link above.
Note: as of this writing, memory is very limited on this cloud preview so some examples may not run successfully.
Reference manual: ANTsR
Wiki: Notes and work in progress examples
Package source: from github
Binaries: here
Windows installation option here
Suggested packages https://github.com/stnava/ANTsRDocker/blob/master/install.R
Install the binary, after downloading, via command line:
R CMD INSTALL ANTsR_*.tgz
Inter-modality inference yet to be added RIPMMARC
Eigenanatomy for multiple modality population studies function sparseDecom
Tumor segmentation function mrvnrfs
(not exactly the same but close)
Multiple modality pediatric template and population study employs several aspects of ANTsR
Structural networks from subject-level data function makeGraph
plus yet to be added RIPMMARC
SCCAN relating neuroimaging and cognitive batteries function sparseDecom2
Sparse regression with manifold smoothness constraints function sparseRegression
Prior-based eigenanatomy function sparseDecom
Corrective learning for segmentation functions segmentationRefinement.train
and segmentationRefinement.predict
.
LINDA: automated segmentation of stroke lesions function mrvnrfs
.
LESYMAP: lesion to symptom mapping function sparseDecom2
.
Please read this entire section before choosing which method you prefer.
In general, these assume you have git installed / accessible in your environment, as well as a compiler, preferably clang
. you may also need cmake if you do/can not install cmaker
.
Windows users should see Rtools and maybe, also, installr for assistance in setting up their environment for building (must have a compiler too). To my knowledge, there are no recorded instances of ANTsR being installed on Windows. If someone does so, we would like to know.
You will need to install R packages that ANTsR requires. Minimally: Install ITKR and ANTsRCore here and here then do:
mydeps <- c( "Rcpp", "RcppEigen", "magrittr", "rsvd", "magic", "psych" )
install.packages( pkgs = mydeps, dependencies = TRUE )
You can gain additional functionality by installing packages that are listed in the DESCRIPTION
file under Suggests
. A complete list of recommended ancillary packages here.
Method 1: with devtools in R
library( devtools )
# install_github("stnava/cmaker") # if you do not have cmake
install_github("stnava/ANTsR")
Method 2: from command line (most traditional method)
Assumes git, cmake and compilers are available in your environment (as above).
First, clone the repository:
$ git clone https://github.com/stnava/ITKR.git
$ git clone https://github.com/ANTsX/ANTsRCore.git
$ git clone https://github.com/ANTsX/ANTsR.git
Install the package as follows:
The travis.yml
file also shows a way to install from Linux command line.
Method 3: from binaries
Note that version numbers will change over time.
wget https://github.com/stnava/ITKR/releases/download/latest/ITKR_0.4.12_R_x86_64-pc-linux-gnu.tar.gz
R CMD INSTALL ITKR_0.4.12_R_x86_64-pc-linux-gnu.tar.gz
wget https://github.com/ANTsX/ANTsRCore/releases/download/v0.4.2.1/ANTsRCore_0.4.2.1_R_x86_64-pc-linux-gnu.tar.gz
R CMD INSTALL ANTsRCore_0.4.2.1_R_x86_64-pc-linux-gnu.tar.gz
wget https://github.com/ANTsX/ANTsR/releases/download/latest/ANTsR_0.6_R_x86_64-pc-linux-gnu.tar.gz
R CMD INSTALL ANTsR_0.6_R_x86_64-pc-linux-gnu.tar.gz
Method 4: platform independent via docker and kitematic
This is a beta operation that is in flux but may be convenient for some users.
based on this approach
create a docker username
download and install kitematic
login to kitematic with your docker username
search for antsr
in the kitematic repository search bar
create a new container from the stnava
version of antsr
start the container
type the “access url” address into a browser to run rstudio with antsr. it should be something like http://192.168.99.100:32989/
you can also add your home folders to the container instance by adjusting the “volumes” option under the settings tab. then you can access local data.
Load the package:
library(ANTsR)
List the available functions in the namespace ANTsR:
ANTsR::<double-tab>
Call help on a function via ?functionName or see function arguments via args(functionName)
git tag -d beta
git push origin :refs/tags/beta
git tag beta
git push --tags origin
More like development highlights, as opposed to release notes. See git log
for the complete history. We try to follow these versioning recommendations for R packages. Under these guidelines, only major.minor
is an official release.
ENH: added domainImg option to plot.antsImage which can standardize plot.
COMP: test for DVCL define requirement to improve clang and gcc compilations
WIP: transform objects can be created on the fly and manipulated thanks to jeff duda
ENH: automation for eigenanatomy
ENH: reworked SCCAN and eanat
ENH: mrvnrfs
ENH: resting state Vignette
DOC: clarify/extend antsApplyTransforms
ENH: multidimensional images
STYLE: iMath not ImageMath in ANTsR
WIP: iMath improvements
WIP: ASL pipeline fuctionality
BUG: Fixed image indexing bug
BUG: plot.antsImage improvements
ENH: more antsRegistration options
ENH: geoSeg
ENH: JointLabelFusion and JointIntensityFusion
ENH: Enable negating images
ENH: weingarten curvature
ENH: antsApplyTransformsToPoints with example
ENH: renormalizeProbabilityImages
ENH: Suppress output from imageWrite.