Closed NiceSpark closed 3 months ago
You can find that information out two ways.
qa-segmentation-dcm/
files are in the CorrectedSegmentation column and the ai-segmentation-dcm/ files are under the AISegmentation
column. Then look at the StudyInstanceUID
and SeriesInstanceUID
, these refer back to the TCGA-LIHC collection CT series from they were generated from.
import pydicom
ds = pydicom.dcmread('qa-results/qa-segmentations-dcm/rad1_TCGA-DD-A4NS_20001011_2.seg.dcm')
print(ds.StudyInstanceUID)
print(ds.ReferencedSeriesSequence[0].SeriesInstanceUID)
Thank you for your quick response @vanossj !
It does look like it works, as I was able to link ai_TCGA-DD-A1EH_20010629_1.seg.dcm
with it's right series TCGA-DD-A1EH/06-29-2001-Thorax020ChestRoutine Adult-64710/10-3 min delay live 3.0 B40f-68434
and the segmentation and series were in sync.
However in my previous example I still have a problem. The Series UID from qa-results/qa-results.csv links ai_TCGA-DD-A4NS_20001011_2.seg.dcm
, ne1_TCGA-DD-A4NS_20001011_2.seg.dcm
and rad1_TCGA-DD-A4NS_20001011_2.seg
to TCGA-DD-A4NS/10-11-2000-Thorax130ChestBiphaseLiver Adult-43952/9-Arterial 3.0 SPO sag-27346/
But opening this with 3D slicer I get the following:
It might be a volume scaling problem (at least it seems so when I only look at the coronal or sagittal view, but I'm not sure this explain the axial view), did you do any kind of preprocessing on the volumes before ?
Edit: I double check the series UID directly using slicer, it is the expected one (1.3.6.1.4.1.14519.5.2.1.3344.4008.283574261555925310865604827346):
Good find.
Looks like there was a difference in the dicom -> nifti conversion. This is the nifti file that was used for AI prediction and for the QA corrections.
On slicer, the segmentations overlay the nifti file correctly.
When you compare the nifti file and the slicer loaded dicom files, you can see that then nifti file looks stretched. The nifti file was probably not converted correctly. It should be possible to transform the segmentations to match the spacing of the slicer loaded dicom.
Thanks for your help, I will look into that.
Hello,
Thank you for your work ! I was wondering if you could point me on how to link a segmentation from liver-ct (qa & ai) with the correct LIHC series ? The study ID as well as the study date and time are specified, but either I'm missing something obvious, or this is not enough.
For example if I take "rad1_TCGA-DD-A4NS_20001011_2.seg" from
qa-segmentations-dcm/
, I know it must be one of the 11 series insideTCGA-DD-A4NS/10-11-2000-Thorax130ChestBiphaseLiver Adult-43952/
, but I cannot know which one it is.