DICOM: Difference between revisions
No edit summary |
|||
| Line 1: | Line 1: | ||
Files ending in <tt>'''.ima'''</tt> | Files ending in <tt>'''.ima'''</tt> or <tt>'''.dcm'''</tt> are in the [http://medical.nema.org/ DICOM] [[Diffusion MRI|medical image]] format. It is a widely used format that enjoyed great popularity but, in the [[diffusion MRI]] community at least, has been mostly superseded by [[NIfTI]]. | ||
== Matlab == | == Matlab == | ||
Revision as of 13:46, 13 March 2009
Files ending in .ima or .dcm are in the DICOM medical image format. It is a widely used format that enjoyed great popularity but, in the diffusion MRI community at least, has been mostly superseded by NIfTI.
Matlab
Matlab has extensive built-in support for DICOM header and image data I/O with the dicominfo, dicomread, and dicomwrite functions. This is nice for quickly creating DICOM processing scripts to be run manually, but Matlab is relatively slow and difficult to call from non-interactive scripts. Therefore it's encouraged to port Matlab code into another language (preferably C++ or Python) for inclusion in the diffusion processing pipeline.
Mosaic
One unusual storage strategy for DICOM-formatted medical images is the so-called "mosaic" scheme, in which a three-dimensional voxel volume is represented as a two-dimensional flat image. The volume is divided up into X-Y slices which are then arranged in 2D like a tile floor, with Z increasing left to right, top to bottom.
Code
The following scripts to handle DICOM mosaic files can be found in /map/gfx0/common0/diffusion/Interface/bin/data/:
- processMosaics.m --- split all mosaic files matching a given pattern into DICOM and MRIimage files
- splitMosaic.m --- split a single mosaic file into a Matlab data array
- writeMosaicSlices.m --- write a collection of Matlab data volumes to DICOM and MRIimage files
All of these can be launched non-interactively with matlabLauncher.py.