DICOM Enhanced Multi frame for data exchange - QIICR/ProjectIssuesAndWiki GitHub Wiki
Objective
Explore the use of DICOM enhanced storage objects for exchange of multi-dimensional datasets used by QIN projects.
Support the following workflow: multi-slice DICOM (3d or 4d) -conversion-tool-> multiframe DICOM -read-> Slicer -write-> multiframe DICOM
Specific tasks
- Evaluate support provided for DICOM enhanced storage by various libraries (GDCM, dicom3tools, DCMTK, Slicer, ITK, Matlab)
- Identify sample datasets
- Create enhanced storage objects from relevant QIN datasets (3d and 4d datasets, BWH DBP)
- Test and debug ITK IO pipeline support of enhanced storage DICOM objects (MRI only for now)
Status
Available tools for single-frame to multi-frame conversion and v.v.
- MultiFrameImageFactory from pixelmed
- Usage example:
java -cp pixelmed.jar -Xms512m -Xmx512m -Djava.awt.headless=true com.pixelmed.dicom.MultiFrameImageFactory ${inputPath} ${outputPath}
- SetOfFrameSets
- Usage example:
java -cp pixelmed.jar -Xms512m -Xmx512m -Djava.awt.headless=true com.pixelmed.dicom.SetOfFrameSets ${inputPaths}
- Usage example:
- Usage example:
- dcmulti from dicom3tools software (code: [dcmulti.cc] (https://github.com/mehrtash/dcmdump/blob/master/dcmulti.cc)) WARNING: the use of this tool is strongly discouraged by its author David Clunie. Quoting from private communication with David:
I have an ancient "dcmulti" tool that does a similar job, but it is pretty horrible, and I extensively hacked it to produce the NEMA multiframe test CT and MR objects many years ago ... I have not updated it to clean up its output or to add specific support for the new Sup 157 SOP Classes. It might be a source of interest in terms of how NOT to write a tool to do this :)
I see from the Wiki page that someone has already made the mistake of trying to use my horrible dcmulti tool :)
- Usage example:
dcmulti path/to/files/[0-n]* -v -sortby ImagePositionPatient > output.dcm
- gdcmtar from GDCM library (code: gdcmtar.cxx)
- emf2sf from dcm4che (code: Emf2sf.java )
Multi-frame Instances for BWH QIN sample data
Conversion using dcmulti
-
Replicate ImageOrientationPatient to be consistent for all frames (deviations on the order of numerical precision will result in frames not treated as corresponding to a single multi-frame object) (helper script)
-
conversion of prostate DCE sequence:
dcmulti -derivedurationfromtiming -makestack -temporalposition
-dimension StackID FrameContentSequence
-dimension InStackPositionNumber FrameContentSequence
-dimension TemporalPositionIndex FrameContentSequence
-sortby ImagePositionPatient
-of /tmp/PkModeling_verification_Case1_DCE_series_mf_
dcmulti.dcm PkModeling_verification/Case1/DCE_series/*.dcm -
conversion of prostate T2w sequence:
dcmulti -sortby -makestack ImagePositionPatient
-dimension StackID FrameContentSequence
-dimension InStackPositionNumber FrameContentSequence
-of t2_dcmulti.dcm 5-T2_AX/*dcm
Issues:
- UIDs are not initialized, since no valid root UID is available - fixed by using 2.25.* (fixup tool below). Is this a proper way to address it?
- SOP Class is EnhancedMR, not Legacy converted - Legacy converted is not recognized by David's tools - added IOD to Pixelmed (TODO look in more detail)
- Additional issues identified during validation by Pixelmed/DicomImageViewer and dciavdfy - need to fix / check if those can be taken care of by using legacy converted
- DCMTK reader fails to read multiframe, since pixel spacing is encoded in per-frame functional group, and the DCMTK IO does not handle this case. GDCM can read, but only if the frames are ordered by ImageOrientationPatient. Z spacing is derived from IPP, but if frames are not in IPP order, no re-ordering is done (source code). 4d multiframe is not read by either DCMTK or GDCM readers.
- Both GDCM and DCMTK fail to read LegacyConvertedEnhancedMRImageStorage SOP class
- Post-conversion fixups and ITK IO tests: https://github.com/fedorov/MultiFrameTests
- Pixelmed legacy converted enhanced MR storage IOD added here
Converted BWH-QIN sample datasets: http://slicer.kitware.com/midas3/folder/1999 (no errors on validation with pixelmed validator).
Sample Datasets
Multiframe
- NEMA DICOM Multiframe sample data (features spreadsheet)
- Vendor-supplied samples
- Toshiba CT brain perfusion (not 100% DICOM compliant, but pretty close, has each time slice in separate instance/file i.e., set of 3D objects rather than 1 4D object)
- Vegetables - Philips
General Purpose
References
- Supplement 49: Enhanced MR Image Storage SOP Class
- Supplement 58: Enhanced CT Image Storage SOP Class
- [Clunie D., Erickson B.J. The New Enhanced Multiframe CT and MR DICOM Objects] (http://www.dclunie.com/papers/SS3DICOMObjectsSyllabus.pdf)
- Supplement 157: Multi-frame Converted Legacy Images
- Dec 16, 2013 hangout discussion minutes
- IHE Diffusion Profile
- IHE Perfusion Profile
- Proposed changes to IHE Perfusion Profile (affects organization 3D/4D, currently out for ballot, will be adopted)