24 March 2010

oro.nifti 0.1.4

The latest release of oro.nifti (0.1.4) has been released on CRAN.  New features include:
  • Added text capability in the (unused) fourth pane in orthographic()
  • A vignette is now included (taken from dcemriS4)

oro.dicom 0.2.5

The latest version of oro.dicom (0.2.5) has been released on CRAN.  New features include:
  • Added "mosaic" capability when creating 3D arrays from DICOM
  • dicomTable() now accepts single DICOM file
  • Better handling of SequenceItem tags when reading in DICOM files
Work is ongoing to provide 4D array creation for both single-file and mosaic acquisitions.

21 March 2010

Converting Siemens MOSAIC

Siemens multi-slice EPI data may be collected as a "mosiac" image; i.e., all slices acquired in a single TR (repitition time) of a functional MRI run are stored in a single DICOM file.  The images are stored in an MxN array of images.  The function create3D() will try to guess the number of images embedded within the single DICOM file using the AcquisitionMatrix field.  If this doesn't work, one may enter the (M,N) doublet explicitly. 



The first image is taken from the raw DICOM file, in mosaic format, and displayed with the default margins [(5,4,4,2)+0.1].



The second image is displayed after re-organizing the original DICOM file into a 3D array and then converting it to NIfTI format. Additional information, using the valid NIfTI header fields descrip and aux_file, have been defined for these data.

Remember, all other Siemens DICOM data are stored as a seperate file for each image (as is the case with the other major MR scanner manufacturers).

16 March 2010

DICOM-to-NIfTI Conversion

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. 

05 March 2010

oro.nifti 0.1.3

The R package oro.nifti has been released.  Medical imaging data, in NIfTI or Analyze formats, may be input, created from scratch, converted from DICOM (using oro.dicom) and output to a file.