DICOM-to-NIfTI Conversion

[This article was first published on Rigorous Analytics, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Now that the two packages oro.dicom and oro.nifti have been released, we can put them together and perform the much sought after conversion from DICOM format to NIfTI format (entirely in R).  Why?  Because DICOM is the international “standard” for medical imaging data coming off the scanners, but it’s not the easiest thing to manipulate on a day-to-day basis.  NIfTI was developed several years ago in order to provide a more user-friendly format for medical imaging data. 

Let’s use the ADNI data that served our purposes before. Here is a sagittal MPRAGE acquisition, the data are read in using dicomSeparate() that takes in an entire directory of DICOM files.

The DICOM object is converted into a three-dimensional array using create3D(). Voxel dimensions are obtained from two different DICOM header fields (PixelSpacing and SliceThickness) so this information may be provided to the final DICOM-to-NIfTI conversion into an S4 class. Note, two-byte integers were specified in order to cover the dynamic range of signal intensities of the original MR acquisition.

The first figure provides a “lightbox”perspective of the MPRAGE acquisition, showing all 166 sagittal slices.  There are numerous options for the oro.nifti::image() S4 Method.  What is shown here uses all the default settings.

The second figure provides an “orthographic” representation of the MPRAGE acquisition, showing the mid-axial, mid-coronal and mid-sagittal slices with crosshairs providing a spatial position in each view. 

To leave a comment for the author, please follow the link and comment on their blog: Rigorous Analytics.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.