dcmqi-guide
Search…
Quick Start
To start using dcmqi, you can download the binary package with the command line converters for Windows, Linux and macOS from this page (both the latest release and pre-release corresponding to the current version of the source code): https://github.com/QIICR/dcmqi/releases.
If you prefer using Docker, download the dcmqi image from DockerHub with docker pull qiicr/dcmqi.
If you want to build dcmqi yourself, or modify the source code - get it on GitHub.

Encoding analysis results in DICOM

Many research studies such as imaging clinical trials or retrospective analysis of clinical data use a collection of databases, spreadsheets, and research data file formats such as NRRD, NIfTI, etc. As an example, a common practice to share segmentations is to provide NIfTI files along with a CSV file mapping label numbers to anatomical names.
As an alternative, you can use the itkimage2segimage command and related tools in dcmqi along with a JSON parameter file so that the segmentation output is described in terms of standardized vocabularies such as SNOMED, and segmentation can be saved in DICOM format side by side and cross-referenced with the source image data. This can help remove ambiguity about the meaning of the results
Example command line:
1
itkimage2segimage --inputImageList brain-label.nrrd \
2
--inputDICOMDirectory Brain-DICOMs \
3
--outputDICOM brain.SEG.dcm \
4
--inputMetadata brain-label-mapping.json
Copied!
Note for the Windows users
We recommend you use Windows PowerShell which is integrated in Windows 10 and further versions. The command line format on Windows will be different from that on Mac or Linux. Here is an example of the command line format on Windows (applied to using dcmqi from Docker):
1
docker run -v C:\Users\joe\myWorkDirectory:/tmp/myWorkDirectory qiicr/dcmqi \
2
itkimage2segimage --inputImageList /tmp/myWorkDirectory/brain-label.nrrd \
3
--inputDICOMDirectory /tmp/myWorkDirectory/Brain-DICOMs \
4
--outputDICOM /tmp/myWorkDirectory/brain.SEG.dcm \
5
--inputMetadata /tmp/myWorkDirectory/brain-label-mapping.json
Copied!

Using DICOM data with research applications

If you get quantitative imaging data in DICOM format but want to use it in MATLAB or ITK, you can use segimage2itkimage to extract conventional NIfTI files of the segmentations or tid1500reader to convert structured reports into JSON.
Example command line:
1
tid1500reader --inputDICOM pet-measurements.SR-1500.dcm \
2
--outputMetadata pet-measurements.json
Copied!

Integrating DICOM into your analysis workflow

If you are designing a new analysis workflow from scratch, you can consider using DICOM as the format to store intermediate results. If you look at the Quantitative Reporting extension to 3D Slicer, you can see how to create analysis results in native DICOM format that use standard terminologies and units, while retaining their linkage to the original input data. You could consider using dcmqi utilities to convert to and from research formats.