Converting .dcm to .nii Image Format in R

## This code reads a dicom image, converts it to a nifit and then writes the nifit file.
##  Requires the packages oro.dicom and oro.nifti.
##
## Elizabeth Sweeney
## August 26th 2013

library(oro.dicom)
library(oro.nifti)

dicom <- readDICOM(‘~/folder’, flipud = FALSE)
nifti <- dicom2nifti(dicom)
writeNIfTI(nifti, filename = “nifti”, verbose = TRUE, gzipped = TRUE)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s