Nicholas J. Tustison (UVA)

This talk is online at http://stnava.github.io/ANTsTalk/ with colored links meant to be clicked for more information

Francis Galton: Can we see criminality in the face?

(maybe he should have used ANTs?)

\(+\) neurodebian, slicer, brainsfit, nipype, itk and more …

170,000+ lines of C++, 6\(+\) years of work, 15+ collaborators.

Generic mathematical methods that are tunable for application specific domains: no-free lunch

Deep testing on multiple platforms … osx, linux, windows.

Several “wins” in public knock-abouts ( Klein 2009, Murphy 2011, SATA 2012 and 2013, BRATS 2013, others )

```
An algorithm must use prior knowledge about a problem
to do well on that problem
```

We need statistical image analysis

at several scales in modern neuroscience

Macro:

*in vivo*structural and functional MRIMicro: high-resolution post-mortem MRI links with in vivo MRI

Nano: neuron reconstruction …

Solutions that are consistent across these scales have the potential to build multi-scale feature sets or templates and provide new insights into brain structure and function

E.g. Parcellation constraints based on histology, tractography, function …

Statistical definitions of anatomy/pathology?

Reinvention of these solutions within each lab … can we mitigate this?

Reduce, reuse, recycle …

References: Horn and Schunck (1981), Gee, Reivich, and Bajcsy (1993), Grenander (1993), Thompson et al. (2001), Miller, Trouve, and Younes (2002), Shen and Davatzikos (2002), Arnold (2014), Thirion (1998), Rueckert et al. (1999), Fischl (2012), Ashburner (2012)

plausible physical modeling of large, invertible deformations

“differentiable map with differentiable inverse”

Atropos segmentation, N4 inhomogeneity correction, Eigenanatomy, SCCAN, Prior-constrained PCA, and atlas-based label fusion and MALF (powerful expert systems for segmentation)

Registration \(=\) estimate an “optimal” geometric mapping between image pairs or image sets (e.g. Affine)

Similarity \(=\) a function relating one image to another, given a transformation (e.g. mutual information)

Diffeomorphisms \(=\) differentiable map with differentiable inverse (e.g. “silly putty”, viscous fluid)

Segmentation \(=\) labeling tissue or anatomy in images, usually automated (e.g. K-means)

Multivariate \(=\) using many voxels or measurements at once (e.g. PCA, \(p >> n\) ridge regression)

Multiple modality \(=\) using many modalities at once (e.g. DTI and T1 and BOLD)

MALF: multi-atlas label fusion - using anatomical dictionaries to label new data

Solutions to challenging statistical image processing problems usually need elements from each of the above

Fundamental tool for

morphometry, segmentation,

motion estimation and

data cleaning

apples and oranges …

initialization

RGB affine

RGB deformable registration - i.e. registration on color

… and most of it multivariate.

Find mapping \[ \color{red}{ \phi(x,p) \in \mathcal{T} }\] such that

\[ \color{red}{ M(I,J,\phi(x,p)) } \] is minimized

Must select both metric \(\color{red}{M}\) and transformation \(\color{red}{\mathcal{T}}\)

… in addition to optimizer and the problem’s resolution

Discussed in more detail in this frontiers paper

\[ \| I - J \| ~~~~~~~~~~~~~~~~~~~ \frac{< I, J >}{\|I\|\|J\|} ~~~~~~~~~~~~~~~ p(I,J) log \frac{p(I,J)}{p(I)p(J)}\]

**all metrics** may be computed from **sparse** or **dense** samples and used with low or high-dimensional transformations

Images deform symmetrically along the shape manifold. This eliminates bias in the measurement of image differences.

Initialize the mapping ( more on this later )

Start with a

*rigid transformation*: \(I(x) \approx J(R(x))\) s.t. negative \(MI\) is minimizedFollow by an

*affine transformation*: \(I(x) \approx J(R(A(x)))\) s.t. negative \(MI\) is minimized with fixed \(R\)Finally, a

*diffeomorphism*: \(I(x) \approx J(R(A(\phi(x))))\) s.t. \(k\)-neighborhood correlation \(CC_k\) is minimized with fixed \(R, A\)Output the

*composite transform*\(A \circ R\) as a matrix transformation and \(\phi\) and \(\phi^{-1}\) as deformation fields.

standard in recommended `antsRegistration`

application scripts

\(\mathcal{T}_{total} = \mathcal{T}_1 \circ \mathcal{T}_2 \circ \mathcal{T}_3 \circ \mathcal{T}_4\)

To avoid compounding interpolation error with the concatenation of transformations, *ANTs* never uses more than a single interpolation.

We ported many of these ideas into the Insight ToolKit

as part of its V4 reboot!

sampling for

*both*the metric and the transformationimpacts scalability, memory, optimization accuracy, speed, robustness …

- could be done optimally
*with massive improvements in performance*- but needs investment in order to achieve “dream” registration scenario

important for new schemes that

*elect*solutions from**anatomical or transformation**dictionariesoverall, relatively little translational work on this important problem in biomedical imaging

Theoretical guarantee of global optimum: improves local optimizers.

Default in `antsCorticalThickness`

pipeline and `FSL`

.

Initial configuration of data

Automatic feature selection

Resampling allows comparison & slide alignment and

validates the feature selection

Dramatic reduction in computation time / memory requirements

- we exploit these strategies to:
- accelerate
- focus
- validate

differentiable inverse

\(+\)

from miykael

Bias correction (with optional priors)

Prior-based tissue segmentation

Prior-based anatomical labeling

Iteration through above steps (optional)

failed to locate well-implemented open-source resources for general purpose prior-based segmentation and inhomogeneity correction …

Similar to our experience with N3, we tried to incorporate FAST (from the FMRIB at Oxford) into an

*ANTs*processing pipeline.We failed to successfully incorporate priors into FAST.

Related, BA went to a segmentation-related worksop at MICCAI and aired disappointment that so much of what had been developed in the community over the last 20+ years has not been made publicly available. “What’s wrong with you people!”

3-tissue algorithm in ImageMath \(\rightarrow\) multivariate, n-class Atropos

Several years of development by SR Das, BA, NT (KK fan)

N3 (developed at the Montreal Neurological Institute) has been the gold standard for bias correction—used in important projects such as ADNI

N3 is a set of perl scripts that works natively with the MINC file format which we tried to incorporate into an

*ANTs*processing pipeline.We had so much trouble converting back and forth between ITK-compatible Nifti format and MINC that BA suggested we try to implement N3 in ITK.

NT had some experience with B-splines and added some other tweaks giving birth to N4.

Sled et al., “A nonparametric method for automatic correction of intensity nonuniformity in MRI Data,” *IEEE-TMI*, 17(1), 1998.

Boyes et al., “Intensity non-uniformity correction using N3 on 3-T scanners with multichannel phased array coils,” *NeuroImage*, 39(4), 2008.

In a comparison of several correction techniques N3 performed well (Arnold et al., 2001). Also, the algorithm and software are in the public domain (http://www.bic.mni.mcgill.ca/software/N3/) and is probably the most widely used non-uniformity correction technique in neurological imaging.

Zheng et al., “Improvement of brain segmentation accuracy by optimizing non-uniformity correction using N3,” *NeuroImage*, 48(1), 2009.

Among existing approaches, the nonparametric non-uniformity intensity normalization method N3 (Sled et al., 1998) is one of the most frequently used… High performance and robustness have practically turned N3 into an industry standard.

Vovk et al., “A Review of Methods for Correction of Intensity Inhomogeneity in MRI,” *IEEE-TMI*, 26(3), 2007.

A well-known intensity inhomogeneity correction method, known as the N3 (nonparametric nonuniformity normalization), was proposed in [15]… Interestingly, no improvements have been suggested for this highly popular and successful method… The nonparametric nonuniformity normalization (N3) method [15] has obviously become the standard method against which other methods are compared.

```
COMMAND:
N4BiasFieldCorrection
OPTIONS:
-d, --image-dimensionality 2/3/4
-i, --input-image inputImageFilename
-x, --mask-image maskImageFilename
-w, --weight-image weightImageFilename
-s, --shrink-factor 1/2/3/4/...
-c, --convergence [<numberOfIterations=50x50x50x50>,<convergenceThreshold=0.0>]
-b, --bspline-fitting [splineDistance,<splineOrder=3>]
[initialMeshResolution,<splineOrder=3>]
-t, --histogram-sharpening [<FWHM=0.15>,<wienerNoise=0.01>,<numberOfHistogramBins=200>]
-o, --output correctedImage
[correctedImage,<biasField>]
-h
--help
```

Talk is cheap, show me the code.

FIXME

Use dictionaries to labels

we provided the *standard* registration results for \(>\) 20,000 image pairs at SATA 2013

to our knowledge, ANTs is the only freely available system that can solve this problem in a fully multivariate manner.

Hongzhi Wang won the “walk in the park” award for this work …

Quantifying

TOT, NKI, IXI, Oasis, ADNI … several thousand images

Quantifying

Freesurfer is the historical standard for measuring cortical thickness

instead of using surfaces to measure cortical thickness, we use the image space

*DiReCTly*and this “big data” paper: Large-scale evaluation of ANTs and FreeSurfer cortical thickness measurements

comparison of prediction from automated cortical thickness measurement from 4 public datasets

\(>\) 1200 subjects, age 7 to over 90 years old

*hint*: ANTs thickness measurements have higher prediction accuracy relative to Freesurfer ( implying we extract more information from the data )ANTs methods consistently improve statistical power eigenanatomy, syn, itkv4 … also, see Schwarz CG, et al. re: TBSS and related work in fMRI Miller, PNAS, Azab, et al in Hippocampus.

*Large-scale evaluation of *ANTs* and FreeSurfer cortical thickness measurements*, NeuroImage 2014.*

All software components are open source and part of the Advanced Normalization Tools (ANTs) repository.

- template building (offline)
- brain extraction
- cortical thickness estimation
- cortical parcellation

*Tailor data to your specific cohort*

- Templates representing the average mean shape and intensity are built directly from the cohort to be analyzed, e.g. pediatric vs. middle-aged brains.
- Acquisition and anonymization (e.g. defacing) protocols are often different.

Each template is processed to produce auxiliary images which are used for brain extraction and brain segmentation.

Comparison with de facto standard FreeSurfer package. Note the difference in separation of the gray matter from the surrounding CSF. (0 failures out of 1205 scans)

Randomly selected healthy individuals. Atropos gets good performance across ages.

In contrast to FreeSurfer which warps coupled surface meshes to segment the gray matter, *ANTs* diffeomorphically registers the white matter to the combined gray/white matters while simultaneously estimating thickness.

Frontiers and innovation

*Many opportunities for statistical advancements*

…

This is an executable *ANTsR* code block - *N*-dimensional statistics to go with our *N*-dimensional image processing software!

```
library(ANTsR)
dim<-2
filename<-getANTsRData('r16')
img<-antsImageRead( filename , dim )
filename<-getANTsRData('r64')
img2<-antsImageRead( filename , dim )
mask<-getMask(img,50,max(img),T)
mask2<-getMask(img,150,max(img),T)
nvox<-sum( mask == 1 )
nvox2<-sum( mask2 == 1 )
```

The brain has 17395 voxels …

Simulate a population morphometry study - a “VBM” …

```
simnum<-10
imglist<-list()
imglist2<-list()
for ( i in 1:simnum ) {
img1sim<-antsImageClone(img)
img1sim[ mask==1 ]<-rnorm(nvox,mean=0.5)
img1sim[ mask2==1 ]<-rnorm(nvox2,mean=2.0)
img2sim<-antsImageClone(img2)
img2sim[ mask==1 ]<-rnorm(nvox,mean=0.20)
imglist<-lappend(imglist,img1sim)
imglist2<-lappend(imglist2,img2sim)
}
imglist<-lappend( imglist, imglist2 )
mat<-imageListToMatrix( imglist, mask )
DX<-factor( c( rep(0,simnum), rep(1,simnum) ) )
mylmresults<-bigLMStats( lm( mat ~ DX ) )
qvals<-p.adjust( mylmresults$pval.model )
```

The minimum q-value is 2.5212 × 10^{-6} …

```
whichvox<-qvals < 1.e-2
voxdf<-data.frame( volume=c( as.numeric( mat[,whichvox] ) ), DX=DX )
ggplot(voxdf, aes(volume, fill = DX)) + geom_density(alpha = 0.2)
```

```
plotANTsImage(img,functional=list(betas),threshold=thresh,
outname=ofn)
```

see `?plotBasicNetwork`

… used in “Sparse canonical correlation analysis relates network-level atrophy to multivariate cognitive measures in a neurodegenerative population” and several upcoming …

Powerful, general-purpose, well-evaluated registration and segmentation.

Differentiable maps with differentiable inverse \(+\) statistics in these spaces

Evaluated in multiple problem domains via internal studies & open competition

Borg philosophy: “best of” from I/O, to processing to statistical methods

Open source, testing, many examples, consistent style, multiple platforms, active community support …

Integration with

*R*\(+\) novel tools for prediction, decoding, high-to-low dimensional statistics.Collaborations with neurodebian, slicer, brainsfit, nipype, itk and more …

- Scalability
**need to fuse feature selection methods with transformation optimization****need to leverage existing ITK streaming infrastructure in application level tool**

- Domain expertise: Customizable for specific problems but sometimes not specific enough
- “Plausible physical modeling …” - this should vary per problem … but doesn’t.
- a fabulous project would be to resolve this issue at a large-scale e.g. for reconstructing neurons, measuring white matter elaboration …
- our prior FEM work is one potential solution

- Rapid development: colleagues still need familiarity with compilation for latest ANTs features
- Latest theoretical advances in registration not yet wrapped for users
- Need more Documentation & testing …

Core developers:

*B. Avants, N. Tustison, H. J. Johnson, J. T. Duda*Many contributors, including users …

Multi-platform, multi-threaded C++ stnava.github.io/ANTs

Developed in conjunction with http://www.itk.org/

R wrapping and extension stnava.github.io/ANTsR

rapid development, regular testing \(+\) many eyes \(\rightarrow\) bugs are shallow

published opinions

image registration