Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Quick reading in of an Image
have_package = function(x) {
x %in% installed.packages()
}
if (!have_package("neurobase")) {
install.packages("neurobase")
}
library(neurobase)
fname = "training01_01_mprage.nii.gz"
if (!file.exists(fname)) {
fname = file.choose()
}
img = readnii(fname)
ortho2(img)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment