Skip to content

ANTsXNet cortical thickness

Nick Tustison edited this page Oct 29, 2020 · 2 revisions
library( ANTsR )
library( ANTsRNet )

# ANTsR/ANTsRNet processing for subject IXI002-Guys-0828-T1

t1File <- "IXI002-Guys-0828-T1.nii.gz" 
t1 <- antsImageRead( t1File )

# Atropos six-tissue segmentation

atropos <- deepAtropos( t1, doPreprocessing = TRUE, verbose = TRUE )

# Kelly Kapowski cortical thickness

kkSegmentation <- atropos$segmentationImage
kkSegmentation[kkSegmentation == 4] <- 3
grayMatter <- atropos$probabilityImages[[3]] 
whiteMatter <- atropos$probabilityImages[[4]] + atropos$probabilityImages[[5]]
kk <- kellyKapowski( s = kkSegmentation, g = grayMatter, w = whiteMatter, 
                     its = 45, r = 0.025, m = 1.5, x = 0, verbose = TRUE )

# Desikan-Killiany-Tourville labeling

dkt <- desikanKillianyTourvilleLabeling( t1, doPreprocessing = TRUE, verbose = TRUE )

# DKT label propagation throughout the cortex

dktCorticalMask <- thresholdImage( dkt, 1000, 3000, 1, 0 ) 
dkt <- dktCorticalMask * dkt 
kkMask <- thresholdImage( kk, 0, 0, 0, 1 ) 
dktPropagated <- iMath( kkMask, "PropagateLabelsThroughMask", kkMask * dkt )

# Get average regional thickness values

kkRegionalStats <- labelStats( kk, dktPropagated ) 
Clone this wiki locally