QIICR / dcmqi

dcmqi (DICOM for Quantitative Imaging) is a free, open source C++ library for conversion between imaging research formats and the standard DICOM representation for image analysis results
https://qiicr.gitbook.io/dcmqi-guide/
BSD 3-Clause "New" or "Revised" License
232 stars 62 forks source link

Missing DICOM tags in seg image result #439

Closed fordanic closed 3 years ago

fordanic commented 3 years ago

Using itkimage2segimage to convert a segmentation mask to a DICOM SEG object, using the release 1.2.4 binaries for Linux on WSL. The conversion works but afterwards the resulting DICOM SEG object is missing a lot of the usual references to the original images. For example, the DICOM tag ReferencedSeriesSequence. For older releases, these tags used to be included.

fordanic commented 3 years ago

Tested with 1.2.2 but with the same results.

fordanic commented 3 years ago

Tested with another dataset and this time it worked as expected. Will close this but a bit strange that it was an issue.

fedorov commented 3 years ago

Daniel, dcmqi is using a crude heuristic to identify which of the instances passed to the converter have geometry that is matching the geometry of segmentation slices, and only those instances will be referenced both in the per-frame FGs DerivationImage sequence and in the ReferencedImageSequence. As an example, if your segmentation has orientation different from that of the image series, then the image instances will not be referenced. I suspect this is the reason why the references were not populated as you expected.