January 19, 2017

The MISTIE Stroke Trial

  • Minimally Invasive Surgery plus r-tPA for Intracerebral Hemorrhage Evacuation (MISTIE)
    • Multi-center, multi-national Phase II clinical trial
    • Alteplase (donated by Genentech)

MISTIE LOGO

PI: Dr. Dan Hanley Hanley

timeline

Intracranial/Intracerebral Hemorrhage (ICH)

Larger Hemorrhage Volume ⇒ Worse Outcome

Goal:
Automatic Hemorrhage Volume Estimation

X-ray Computed Tomography (CT) Scans

Image Representation: voxels (3D pixels)

Typical CT has \(512 \times 512 \times 30 ≈ 7.8\) million voxels

Muschelli, John, Elizabeth Sweeney, and Ciprian Crainiceanu. "brainR: Interactive 3 and 4D Images of High Resolution Neuroimage Data." R JOURNAL 6.1 (2014): 42-48.

How do we measure volume (currently)?

Manual Segmentation

MISTIE LOGO
MISTIE LOGO

Workflow for the Analysis

flow

Workflow for the Analysis

flow

Problem: CT Scans Capture Everything

Also has negative values

The room

Brain Segmentation of CT Scans (uses BET)

  • Muschelli, John, et al. "Validated automatic brain extraction of head CT images." NeuroImage 114 (2015): 379-385. http://bit.ly/CTBET_RCODE

MISTIE LOGO
MISTIE LOGO

Workflow for the Analysis

flow

Hemorrhage Segmentation

Subject Data used: 111 scans (1 Per Patient)

  Overall
Age in Years: Mean (SD) 60.8 (11.2)
Male: N (%) 76 (68.5%)
Reader-Based Clot Location (%)
   Putamen 68 (61.3)
   Lobar 33 (29.7)
   Globus Pallidus 6 ( 5.4)
   Thalamus 4 ( 3.6)
ICH Volume in mL: Mean (SD) 37.4 (20.1)
  • Adults (inclusion criteria 18-80 years old)
  • Mostly males
  • Different sites, scanners, and locations in the brain

Workflow for the Analysis

flow

Predictors of ICH

  • Local "neighborhood" moments (mean, sd, skew, kurtosis)

Local Mean: \(\bar{x}(v) = \frac{1}{27} \sum\limits_{k}^{27} x_k(v)\)

  • Threshold intensity
  • Gaussian Smoother (big neighborhood)
Preds

Data Structure for One Patient

  • Each subject has matrix \(X_{i}\)
  • \(V_{i}\) - voxels per person
  • \(P\) - number of predictors
  • \(y_i\) - manual segmentation
MISTIE LOGO

Aggregate Data

Training Data Structure

  • Stack together 10 randomly selected patients
  • Train model/classifier on this design matrix
MISTIE LOGO

Fit Models / Classifier

Again, \(y_{i}(v)\) is the presence / absence of ICH for voxel \(v\) from person \(i\).

General model form: \[ P\{y_{i}(v) = 1\} \propto f\{X_{i}(v)\} \]

All models fit in R.

Models Fit on the Training Data

  • Logistic Regression: \(f(X_{i}(v)) = \text{expit} \left\{ \beta_0 + \sum_{k= 1}^{p} x_{i, k}(v)\beta_{k}\right\} \) (glm function)
  • Generalized Additive Model (Hastie, et al., 1990)
    • fit using penalized thin plate splines (mgcv package)
  • LASSO (Tibshirani, 1996; Friedman, et al., 2010) (glmnet package): \[ \mathcal{L}\left[\left.Y_{i}(v) \right|\, f\{X_i(v)\}\right] \propto \beta_0 + \sum_{k= 1}^{p} x_{i, k}(v) \beta_{k} + \lambda \sum_{k= 1}^{p} \left|\beta_{k}\right| \]
  • Random Forests (Liaw, et al., 2002; Breiman, 2001) (randomForest package)

    \(f(X_{i}(v)) \propto\) random forest

All results are on the 101 scans/patients
not in the training data

  • Get prediction for each voxel: \(\hat{p}_{i}(v) = \hat{P}(y_i(v) = 1)\)
  • Threshold to get a binary value: \(\hat{y}_{i} = \hat{p}_{i}(v) > 0.5\)

\[ \text{Estimated Volume}_{i} = \text{cc per voxel} \times \sum_{v}^{V_i} \hat{y}_{i}(v) \]

\[ \text{Volume}_{i} = \text{cc per voxel} \times \sum_{v}^{V_i} y_{i}(v) \]

  • cc = cubic centimeters
  • one milliliter (mL) = 1 cc
flow

Predicted Volume Estimates True Volume Well Reseg

All models predicted volume pretty well Reseg

Two Segmentations with the Same Volume

MISTIE LOGO
MISTIE LOGO

Dice Similarity Index/Overlap by Scanner


Patient with Median Overlap/Dice

MISTIE LOGO

Why'd that one fail?

Conclusions of Stroke Analyses

Workflow for the Analysis

Multiple pieces of software used

  • all different syntax
flow

flow Neuroconductor:
A Framework for Reproducible Neuroimaging Analysis
in R

Neuroconductor Goal:

Lower the bar to entry

  • all R code
    • pipeline tool
    • native R code

Complete pipeline

  • pipeline sensitivity analyses
flow

It's typical to have lots of software choices

flow

From Carp, Joshua. "The secret lives of experiments: methods reporting in the fMRI literature." Neuroimage 63.1 (2012): 289-300.

Current Progress (my R packages)

Number of downloads as of January 18, 2017 (cranlogs package):

carp_box

Neuroconductor Goal:

Provide package checks / rules / stability

  • check against other imaging software (e.g. FSL)

flow

flow

flow

Benefits of Neuroconductor:

Allow neuroimaging to use all R has to offer:

  • Statistics and Machine Learning
  • Versioning and testing
  • Reproducibile reports and analyses
  • Shiny (web applications)

flow Neuroconductor Downsides

  1. More control over the workflow = more work
  2. Users need external software (versions/installation)
  3. No control over external software
    • if maintainer changes something, not much recourse
  4. Need the content (buy-in from the community)

Training we are providing

Thanks

Dan Hanley Hanley

Ciprian Crainiceanu neurohacking

Brian Caffo neurohacking

Jean-Philippe Fortin neurohacking

Adi Gherman neurohacking

Elizabeth Sweeney neurohacking

Questions

Assessing Performance

For each manual and automated segmentation, we can calculate the following 2-by-2 table, where the cells represent number of voxels and a corresponding Venn diagram:

Manual
0 1
PitCH 0 TN FN
1 FP TP

Dice Similarity

We calculate the Dice Similarity Index (DSI): \[ \definecolor{red}{RGB}{255,0,0} \definecolor{blue}{RGB}{0,0,255} \definecolor{purple}{RGB}{128,0,128} \definecolor{blac,}{RGB}{0,0,0} \frac{ \color{purple} 2 \times \# \text{TP} }{ \color{purple} 2 \times \#\text{TP} \color{black} + \color{red} \text{FN} \color{black} + \color{blue} \text{FP}} \]

  • 0 indicates no overlap
  • 1 means perfect agreement

DICE

DICE

DICE

DICE

Under Development R Packages

  1. nitrc - download data from the NITRC repository
  2. MNITemplate\(^*\) - data of a population-level "template" image
  3. EveTemplate\(^*\) - data of a different template image
  4. kirby21 - data package with 2 subjects, 2 visits with multimodal imaging
  5. rcamino - interface to analyze DTI data
  6. msseg - MS lesion segmentation
  7. extrantsr - pipelines for structural imaging analysis

Not started yet

  1. neurohcp - interface with Human Connectome Project
  2. afnir - R port of AFNI software (No. 2 on the chart)

\(^*\) - working with Jean-Philippe Fortin on these

The knitcitations, knitr, pander, plyr, RefManageR, rmarkdown, and tableone packages were used to create this presentation in RStudio.

 setting  value                       
 version  R version 3.3.3 (2017-03-06)
 system   x86_64, darwin13.4.0        
 ui       X11                         
 language (EN)                        
 collate  en_US.UTF-8                 
 tz       America/New_York            
 date     2017-05-29                  

 package       * version    date      
 backports       1.1.0      2017-05-22
 base          * 3.3.3      2017-03-07
 bibtex          0.4.0      2014-12-31
 bitops          1.0-6      2013-08-17
 class           7.3-14     2015-08-30
 colorout      * 1.1-0      2015-04-20
 datasets      * 3.3.3      2017-03-07
 devtools        1.13.1     2017-05-13
 digest          0.6.12     2017-01-27
 DT              0.2        2016-08-09
 e1071           1.6-8      2017-02-02
 evaluate        0.10       2016-10-11
 graphics      * 3.3.3      2017-03-07
 grDevices     * 3.3.3      2017-03-07
 grid            3.3.3      2017-03-07
 htmltools       0.3.6      2016-12-08
 htmlwidgets     0.8        2016-11-09
 httr            1.2.1.9000 2017-03-09
 jsonlite        1.4        2017-04-08
 knitcitations * 1.0.7.1    2016-02-01
 knitr         * 1.16       2017-05-18
 lattice         0.20-35    2017-03-25
 lubridate       1.6.0      2016-09-13
 magrittr        1.5        2014-11-22
 Matrix          1.2-10     2017-04-28
 memoise         1.1.0      2017-04-21
 methods       * 3.3.3      2017-03-07
 pander        * 0.6.0      2016-06-17
 plyr          * 1.8.4      2016-06-08
 R6              2.2.1      2017-05-10
 Rcpp            0.12.11    2017-05-22
 RCurl           1.95-4.8   2016-03-01
 RefManageR    * 0.13.1     2016-11-13
 RJSONIO         1.3-0      2014-07-28
 rmarkdown       1.5        2017-04-26
 rprojroot       1.2        2017-01-16
 splines         3.3.3      2017-03-07
 stats         * 3.3.3      2017-03-07
 stringi         1.1.5      2017-04-07
 stringr         1.2.0      2017-02-18
 survey          3.31-5     2016-12-01
 survival        2.41-3     2017-04-04
 tableone      * 0.7.3      2015-11-11
 tools           3.3.3      2017-03-07
 utils         * 3.3.3      2017-03-07
 withr           1.0.2      2016-06-20
 XML             3.98-1.7   2017-05-03
 yaml            2.1.14     2016-11-12
 zoo             1.8-0      2017-04-12
 source                                 
 CRAN (R 3.3.2)                         
 local                                  
 CRAN (R 3.2.0)                         
 CRAN (R 3.2.0)                         
 CRAN (R 3.3.3)                         
 Github (jalvesaq/colorout@1539f1f)     
 local                                  
 CRAN (R 3.3.2)                         
 cran (@0.6.12)                         
 CRAN (R 3.3.0)                         
 CRAN (R 3.3.2)                         
 CRAN (R 3.3.0)                         
 local                                  
 local                                  
 local                                  
 Github (rstudio/htmltools@4fbf990)     
 CRAN (R 3.3.2)                         
 Github (gaborcsardi/httr@30001d4)      
 CRAN (R 3.3.2)                         
 Github (cboettig/knitcitations@afffa3e)
 CRAN (R 3.3.2)                         
 CRAN (R 3.3.2)                         
 CRAN (R 3.3.0)                         
 CRAN (R 3.2.0)                         
 CRAN (R 3.3.2)                         
 cran (@1.1.0)                          
 local                                  
 Github (Rapporter/pander@48fa9ed)      
 CRAN (R 3.3.0)                         
 CRAN (R 3.3.2)                         
 cran (@0.12.11)                        
 CRAN (R 3.2.4)                         
 CRAN (R 3.3.2)                         
 CRAN (R 3.2.0)                         
 CRAN (R 3.3.2)                         
 cran (@1.2)                            
 local                                  
 local                                  
 cran (@1.1.5)                          
 cran (@1.2.0)                          
 CRAN (R 3.3.2)                         
 CRAN (R 3.3.2)                         
 CRAN (R 3.2.2)                         
 local                                  
 local                                  
 CRAN (R 3.3.0)                         
 CRAN (R 3.3.2)                         
 CRAN (R 3.3.2)                         
 CRAN (R 3.3.2)                         

Ischemic Stroke

Not Ischemic Stroke