Match vtkMRMLScalarVolumeNode to vtkMRMLLabelMapVolumeNode retrieved from vtkMRMLSegmentationNode

Hi, I have 23 scan images (vtkMRMLScalarVolumeNode ) and matching to some of them 13 vtkMRMLLabelMapVolumeNode retrieved from vtkMRMLSegmentationNode. They are not in order, i.e. 1st vtkMRMLScalarVolumeNode matches 7th vtkMRMLLabelMapVolumeNode. I can see which of them match in Slicer front end but I do not know which class field created from reading *.dcm files contain this information.
Can someone point me in the right direction? Thanks!

It all depends how you organized your data in your scene. For example, you can associate nodes using MRML node references, subject hierarchy folders, or DICOM UIDs. Can you post a screenshot of the tree in the Data module?

Hi Andras, thanks for your answer! I attach the screenshot from the Scene if that is what you meant… However, I do not create or load the scene when I read the files, so preferably I would like to match the data in two folders (“Ax T2 FSE” and “Ax T2 FSE Giloma Segmentation Corrected” on the screenshot) without referencing the scene. Would DICOM UID be the right approach? I can literally see the references in the dcm files but parsing them manually sounds like reinventing the wheel…
Thanks a lot!

DICOM Segmentation Object refers to a DICOM image file at many levels (see ReferencedSOPInstanceUID and SeriesInstanceUID tags by right-clicking on the segmentation object and choosing “View DICOM metadata”).

I had a quick look and it seemed that Slicer’s DICOM Segmentation Object importer uses the SeriesInstanceUID in the first ReferencedSeriesSequence.

1 Like

Thanks Andras, the links you gave helped! Finally, it turned out that reading the segmentation file using pydicom gives the correct sequence.