Blog Archives

A better interactive neuroimage plotter in R

August 21, 2015
By
A better interactive neuroimage plotter in R

In a previous post, I described how you can interactively explore a 3D nifti object in R. I used the manipulate package, but the overall results were sluggish and not really usable. I was introduced to a a good neuroimaging viewer called Mango, by a friend or two and use it somewhat inconsistently. One major

Read more »

Rendering LaTeX Math Equations in GitHub Markdown

July 31, 2015
By
Rendering LaTeX Math Equations in GitHub Markdown

The Problem: GitHub README.md won't render LaTeX I have many times wondered about getting LaTeX math to render in a README file on GitHub. Apparently, many others ( 1, 2, 3 ), have asked the same question. The common answers are: It cannot (and in some cases, shouldn't) be done. GitHub parsing is done by

Read more »

#rstats Make arrays into vectors before running table

July 29, 2015
By
#rstats Make arrays into vectors before running table

Setup of Problem While working with nifti objects from the oro.nifti, I tried to table the values of the image. The table took a long time to compute. I thought this was due to the added information about a medical image, but I found that the same sluggishness happened when coercing the nifti object to

Read more »

Line plots of longitudinal summary data in R using ggplot2

July 9, 2015
By
Line plots of longitudinal summary data in R using ggplot2

I recently had an email for a colleague asking me to make a figure like this in ggplot2 or trellis in R: As I know more about how to do things in ggplot2, I chose to use that package (if it wasn't obvious from the plot or other posts). Starting Point Cookbook R/) has a

Read more »

A small neuroimage interactive plotter

April 9, 2015
By
A small neuroimage interactive plotter

Manipulate Package The manipulate from RStudio allows you to create simple Tcl/Tk operators for interactive visualization. I will use it for a simple slider to view different slices of an image. fslr package I'm calling the fslr package because I know that if you have it installed, you will likely have FSL and have a

Read more »

matlabr: a Package to Calling MATLAB from R with system

April 8, 2015
By
matlabr: a Package to Calling MATLAB from R with system

In my research, I primarily use R, but I try to use existing code if available. In neuroimaging and other areas, that means calling MATLAB code. There are some existing solutions for the problem of R to MATLAB: namely the R.matlab package and the RMatlab package (which can call R from MATLAB as well). I

Read more »

White Matter Segmentation in R

April 7, 2015
By
White Matter Segmentation in R

Goals and Overall Approach We will use multiple packages and pieces of software for white matter (and gray matter/cerebro spinal fluid (CSF)) segmentation. The overall approach will be, with the required packages in parentheses: N4 Inhomogeneity Bias-Field Correction (extrantsr and ANTsR) Brain extraction using BET and additional tools (extrantsr and fslr) FAST for tissue-class segmentation.

Read more »

The Unofficial ENAR 2015 Itinerary Maker

March 10, 2015
By
The Unofficial ENAR 2015 Itinerary Maker

It’s almost ENAR 2015! The final program is out with all the sessions. The last conference I went to, the International Stroke Conference, had a program planner hosted by abstracts online. Although there are parts of this system I would like to change, I believe it is helpful for looking up sessions, presenters, and especially

Read more »

Using Tables for Statistics on Large Vectors

March 1, 2015
By
Using Tables for Statistics on Large Vectors

This is the first post I’ve written in a while. I have been somewhat radio silent on social media, but I’m jumping back in. Now, I work with brain images, which can have millions of elements (referred to as voxels). Many of these elements are zero (for background). We want to calculate basic statistics on

Read more »

The average Stripe employee! Congrats to Alyssa!

January 2, 2015
By
The average Stripe employee! Congrats to Alyssa!

Recently, my colleague and fellow blogger Alyssa Frazee accepted a job at Stripe. All of us at JHU Biostat are happy for her, yet sad to see her go. While perusing Stripe’s website, I found the About page, where each employee has a photo of themselves. I’ve been playing around with some PCA and decompositions,

Read more »