Visualizing Brain Imaging in Interactive 3D

John Muschelli

R programs used for this presentation

3D Graphics?

Lot of code

Lot of code

I'm not referring to 3D histograms

plot of chunk piechart

Overall Message

Neuroimaging Data

What kind of data do we have? * Structural MRIs * Functional MRIs * CT * DTI * EEG * PET * etc.

Visualization and presentation of these data can be improved with the use of 3D tools.

3D rendering tools out there

Current methods of visualizing/EDA

Using image.nifti from oro.nifti [Whitcher, Schmid, and Thornton (2011)] package:

plot of chunk lightbox

plot of chunk lightbox

Current methods of visualizing/EDA

plot of chunk lightbox2

Current methods of visualizing/EDA

Overall, most methods keep temporal or 2D spatial components fixed and vary the other. Using orthographic from oro.nifti package:

plot of chunk ortho

plot of chunk ortho

Why are we still 2D?

What (I think) makes a good interactive neuroimaging figure

(Note - current figures do not have all these qualities )

3D Slicer

Slicer Example - CT Data

From https://github.com/xtk/SlicerWebGLExport/blob/master/README.md

Example of web rendering

Slicer Example - CT Data

Motivating Example:

Thumbnails of clearance from Natalie

Slicer Example - CT Data

Pros of Using Slicer

Why use R?

Example of 3D in R

Error: Embedded data could not be displayed.

How do I do this in R?

How do I do this in R? - Example

tmp <- readNIfTI(file.path(datadir, "MNI152_T1_2mm_brain.nii"), reorient=FALSE)

contour3d(template, x=1:dim(temp)[1], y=1:dim(temp)[2], z=1:dim(temp)[3], level = 3500, alpha = 0.15)

writeWebGL_split(dir=file.path(outdir, "webGL"), width=700, height=500, template= file.path(outdir, "my_template.html"))

Where's my 4D?

DTI Example

Error: Embedded data could not be displayed.

Why use this for Exploratory Data Analysis (EDA)/ Quality Checking (QC)

Things Hiding in 2D

RGL Caveats

So RGL rendering is perfect, right?

Lot of code

RGL Caveats

Markdown - Use R!

Conclusion

Thanks

Biblio

WHhat

Here are the steps. Need a structure 4D - over time or multiple ROIs

Slide 1

Functional brain imaging (e.g. fMRI, PET, EEG) data is a 4-dimensional time series representing changes in brain activity over time.

Structrual imaging (e.g. MPRAGE, DTI, CT) also has been increasingly more common to have a longitudinal component, where participants/subjects are scanned multiple times.

Visualization and presentation of these data can be improved with the use of 3D tools.

NEEDED: pictures of brains - a lot - DTI ex, MRI