# Unable to find all referenced series in DICOM Browser

**URL:** <https://discourse.slicer.org/t/unable-to-find-all-referenced-series-in-dicom-browser/43022>\
**Category:** Support\
**Tags:** dicom\
**Created:** [May 21, 2025, 3:10pm UTC](https://discourse.slicer.org/t/unable-to-find-all-referenced-series-in-dicom-browser/43022 "2025-05-21T15:10:11Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![DeepaKrishnaswamy](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/deepakrishnaswamy/32/8913_2.png) [@DeepaKrishnaswamy](https://discourse.slicer.org/u/DeepaKrishnaswamy)\
**Post date:** [May 21, 2025, 3:10pm UTC](https://discourse.slicer.org/t/unable-to-find-all-referenced-series-in-dicom-browser/43022/1 "2025-05-21T15:10:11Z")

</div>

Hi,

I am working on improving the loading of DICOM Structured Reports into Slicer using the QuantitativeReporting plugin. Some SRs could have multiple series that are referenced. However, when I choose to load the SR in the DICOM Browser, as an example, only 2 out of the 3 valid series are actually listed to be selected in the pop-up window. Additionally, sometimes they are listed as a scalar volume or as an image sequence. The series that are displayed in this pop-up window, and if they are a scalar volume or image sequence, change every time I open Slicer.

I know that these series could be a scalar volume or an image sequence, especially if they’re old, from [this post](https://discourse.slicer.org/t/loading-dicom-seg-imports-referenced-scalar-volume-and-first-slice-of-referenced-series/22692).

Additionally, from my understanding, as seen in the [DICOMBrowser loadCheckedLoadables function](https://github.com/Slicer/Slicer/blob/main/Modules/Scripted/DICOMLib/DICOMBrowser.py), I need to have a list of `loadable.referencedInstanceUIDs`. In my changes to QuantitativeReporting, I have also confirmed that the `loadable.referencedInstanceUIDs` contains all of the referenced SOPInstanceUIDs from the valid referenced series.

Therefore, I think that in an ideal case, the pop-up window should have the 3 series listed as scalar volumes, and then additionally listed as image sequences, for a total of 6 check boxes.

Am I missing something when creating the `loadable.referencedInstanceUIDs` list?

Thank you!

Deepa

---

<div class="post-metadata">

**Author:** ![fedorov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fedorov/32/14_2.png) [@fedorov](https://discourse.slicer.org/u/fedorov)\
**Post date:** [May 21, 2025, 6:46pm UTC](https://discourse.slicer.org/t/unable-to-find-all-referenced-series-in-dicom-browser/43022/2 "2025-05-21T18:46:18Z")

</div>

Deepa, it might be helpful if you provided a script and instructions to reproduce the problem.

---

<div class="post-metadata">

**Author:** ![DeepaKrishnaswamy](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/deepakrishnaswamy/32/8913_2.png) [@DeepaKrishnaswamy](https://discourse.slicer.org/u/DeepaKrishnaswamy)\
**Post date:** [May 21, 2025, 7:26pm UTC](https://discourse.slicer.org/t/unable-to-find-all-referenced-series-in-dicom-browser/43022/3 "2025-05-21T19:26:30Z")

</div>

Absolutely. To reproduce, please:

1. Clone the master branch from this fork: [GitHub - deepakri201/QuantitativeReporting: Segmentation-based measurements with DICOM import and export of the results.](https://github.com/deepakri201/QuantitativeReporting)
2. Add this github repo to the additional modules paths.
3. Import DICOM files [from here](https://www.dropbox.com/scl/fi/nas9ylf6ygnop6qu6t2sd/Slicer_discourse_SR_loading_references_05_21_25.zip?rlkey=hqv9743zlnt984ilypxo2r3re&st=aklbrx89&dl=0) into the DICOM database. This contains the SR, and 3 referenced series.
4. Select the Structured Report, and click Examine, and then click Load. The popup box with only some of the referenced series should appear.

 ![Screenshot 2025-05-21 at 3.25.32 PM](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/3/9/39bbc2c4415ab99b0a7c9eb6a5862339dbf5c4c5.png)

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [May 23, 2025, 9:01pm UTC](https://discourse.slicer.org/t/unable-to-find-all-referenced-series-in-dicom-browser/43022/4 "2025-05-23T21:01:41Z")

</div>

Hi @DeepaKrishnaswamy - did you try adding some prints to debug this code?

> <https://github.com/Slicer/Slicer/blob/756d101a60889c68ae299741d8c0b6726d1da8b9/Modules/Scripted/DICOMLib/DICOMBrowser.py#L698-L709>

---

<div class="post-metadata">

**Author:** ![DeepaKrishnaswamy](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/deepakrishnaswamy/32/8913_2.png) [@DeepaKrishnaswamy](https://discourse.slicer.org/u/DeepaKrishnaswamy)\
**Post date:** [May 27, 2025, 9:55pm UTC](https://discourse.slicer.org/t/unable-to-find-all-referenced-series-in-dicom-browser/43022/5 "2025-05-27T21:55:58Z")

</div>

Hi @pieper,

Yes, I did try to put some print statements in DICOMBrowser.py. In the `loadCheckedLoadables` I added statements to print the 1) `referencedFileLists`, and the 2) `self.referencedLoadables` from `self.getLoadablesFromFileLists(referencedFileLists)`.

Here was my thought process:

1. From the `referencedFileLists`, I first checked that it contained the three unique SeriesInstanceUIDs, which it does.
2. I then checked that the number of SOPInstanceUIDs for each of the SeriesInstanceUIDs matches what I see in Slicer, which it does. (file\_counts: [19, 19, 15])
3. I then checked the `self.referencedLoadables` to make sure the right plugins were being used for each loadable. This is where I can see a potential issue. The DICOMImageSequencePlugin has a list of 1 loadables, and DICOMScalarVolumePlugin has a list of 7 loadables. Shouldn’t `self.referencedLoadables` only contain 3 loadables?

 ![Screenshot 2025-05-27 at 5.43.51 PM](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/e/1/e156a4a1164a4d47fbdd704101a0d797b906c8a4.png)

Thanks!

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [May 27, 2025, 10:08pm UTC](https://discourse.slicer.org/t/unable-to-find-all-referenced-series-in-dicom-browser/43022/6 "2025-05-27T22:08:43Z")

</div>

A series can map to multiple loadables. You can confirm this by selecting just the series and clicking Examine to see what is detected and what is checked by default.

I’m thinking that in the loop referenced above at line 702 some of the loadables are not selected.

---

<div class="post-metadata">

**Author:** ![DeepaKrishnaswamy](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/deepakrishnaswamy/32/8913_2.png) [@DeepaKrishnaswamy](https://discourse.slicer.org/u/DeepaKrishnaswamy)\
**Post date:** [May 27, 2025, 10:56pm UTC](https://discourse.slicer.org/t/unable-to-find-all-referenced-series-in-dicom-browser/43022/7 "2025-05-27T22:56:35Z")

</div>

Yes you’re right, that some of the loadables are not selected. From the original list of 7 for DICOMScalarVolumePlugin, only 1 has `loadable.selected=True`.

---

<div class="post-metadata">

**Author:** ![fedorov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fedorov/32/14_2.png) [@fedorov](https://discourse.slicer.org/u/fedorov)\
**Post date:** [May 27, 2025, 11:00pm UTC](https://discourse.slicer.org/t/unable-to-find-all-referenced-series-in-dicom-browser/43022/8 "2025-05-27T23:00:44Z")

</div>

@DeepaKrishnaswamy, first, I think we do not want all of the loadables to show up checked in that popup - only high confidence. Second, since this depends on your updates to QuantitativeReporting, I am not sure your updates correctly initialize the list of referenced instances - there may be duplicates, and I do not know how this is handled downstream, see comment here: [Added code to import and display points, lines and bounding boxes by deepakri201 · Pull Request #287 · QIICR/QuantitativeReporting · GitHub](https://github.com/QIICR/QuantitativeReporting/pull/287#discussion_r2107236883). I think it makes sense to first make sure your implementation is correct. If you suspect Slicer has a bug, I recommend creating an example where you have a standalone script that can reproduce the issue outside that large PR above.

---

<div class="post-metadata">

**Author:** ![DeepaKrishnaswamy](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/deepakrishnaswamy/32/8913_2.png) [@DeepaKrishnaswamy](https://discourse.slicer.org/u/DeepaKrishnaswamy)\
**Post date:** [July 29, 2025, 6:33pm UTC](https://discourse.slicer.org/t/unable-to-find-all-referenced-series-in-dicom-browser/43022/9 "2025-07-29T18:33:17Z")

</div>

As an update to this issue, I have recently submitted a PR to DICOMBrowser.py: [BUG: Show all referenced series as checkboxes in DICOM popup by deepakri201 · Pull Request #8605 · Slicer/Slicer · GitHub](https://github.com/Slicer/Slicer/pull/8605)
