different built version slicer cannot get dicom.instanceUIDs attribute

Hi,

When use a self-build verison slicer (the latest slicer code and source code version: Slicer-88f0c40fa19d00616ba984abd0512e540a974525), I found I cannot get the DICOM.instanceUIDs vtkMRMLScalarVolumeNode as follows.

But, in my previous self-build slicer (4.11.0), there is a DICOM.instanceUIDs attribute in vtkMRMLScalarVolumeNode as follows.

why this happens? what should I do to solve this problem?

The volume node will only have the dicom.instanceUIDs attribute if it was loaded through the DICOM module. Check that you loaded the data the same way in both your Slicer versions.

Yes, I use the same way to load dicom data, it is shown as follows.

                with DICOMUtils.TemporaryDICOMDatabase(sql_folder_path) as db:
                    DICOMUtils.importDicom(dicomDataDir, db)
                    patientUIDs = db.patients()
                    for patientUID in patientUIDs:
                        loadedNodeIDs.extend(DICOMUtils.loadPatientByUID(patientUID))
                        loadedNodeIDs.extend(DICOMUtils.loadPatientByUID(patientUID))

Are the dicom.instanceUIDs there if you use the latest Slicer Preview Release?

I use the same code in the latest Slicer Preview Release to get DICOM.instancesUIDs,

redCompsiteNode=slicer.app.layoutManager().sliceWidget("Green").sliceLogic().GetSliceCompositeNode()
volumeID=redCompsiteNode.GetBackgroundVolumeID()
key='0010,0010'
volumeNode = slicer.util.getNode(volumeID)
value = slicer.dicomDatabase.instanceValue(volumeNode.GetAttribute('DICOM.instanceUIDs'), key)

but it occurs an error in redCompsiteNode.GetBackgroundVolumeID() . But this code does not report error in my sekf-build slicer with latest source code.

What is the error message?

There is an error as the value of volumeID is None.

redCompsiteNode = slicer.app.layoutManager().sliceWidget("Green").sliceLogic().GetSliceCompositeNode()
volumeID=redCompsiteNode.GetBackgroundVolumeID()

Moreover, When I use load two dicom data, there is only one dicom data is shown in windows, but my self-build version will display both two dicom data in all windows as shown in follows.

Additionally, due to this error, the I cannot run my code in these versions Slicer, so I want to build a Slicer use former source code ,but I cannot download former soruce code as follows.



Could you please tell me how to get foremer Slcier source code?

All Slicer versions are available at https://github.com/Slicer/Slicer/commits/master.

It looks like you are loading a GE Invenia ABUS image. A reader plugin for such images was added to Slicer Preview Release a couple of months ago.

To load the images correctly (i.e., reconstructing the curved geometry), make sure that the DICOMGeAbusPlugin plugin is enabled in DICOM module / DICOM Plugins section. DICOM.instanceUIDs is only set if loaded by DICOMScalarVolumePlugin. For all other DICOM data objects, such as the ABUS image, you can get the series instance UID from the subject hierarchy, as shown here.

I have check the node type and it is MRMLCore.vtkMRMLScalarVolumeNode, so I think maybe it is loaded by DICOMScalarVolumePlugin, is it correct?, If not, how can I use DICOMScalarVolumePlugin to load dicom data? Moreover, I also try to get the series instance UID from the subject hierarchy, but I cannot use series UID to get instance UID, the return of following code is empty.

redCompsiteNode = slicer.app.layoutManager().sliceWidget("Green").sliceLogic().GetSliceCompositeNode()
volumeID=redCompsiteNode.GetBackgroundVolumeID()
volumeNode = slicer.util.getNode(volumeID)

# Get series instance UID from subject hierarchy
shNode = slicer.vtkMRMLSubjectHierarchyNode.GetSubjectHierarchyNode(slicer.mrmlScene)
volumeItemId = shNode.GetItemByDataNode(volumeNode)
seriesInstanceUID = shNode.GetItemUID(volumeItemId, 'DICOM')

instUids = slicer.dicomDatabase.instancesForSeries(seriesInstanceUID)

There are a number of DICOM reader plugins that create a scalar volume node. DICOMScalarVolumePlugin is just the generic 3D volume reader.

Does seriesInstanceUID look valid? Does it match the series instance UID in the DICOM metadata in the DICOM browser?