Regression in the DICOM data base

Loading the following data set in Slicer nightly 8-15 on Mac OS 14.6.1 fails. The same data set works without problem in the stable release 5.6.2


The data is from IDC and loads into slicer with the IDC viewer.
SeriesInstanceUID to download: 1.3.6.1.4.1.14519.5.2.1.2932.1975.255072988367557196694880426160

There is the strange value of Spacing Between Slices (0x0018, 0x0088) -1. BTW, there seems to be a bug (or “behavior change”) in recent GDCM IO that may be related, s. ITK issue 4794. But I am not sure, just FYI. cc @dzenanz

dciodvfy:
Error - Illegal negative value - SpacingBetweenSlices = -1

I can confirm that Spacing Between Slices -1 causes the problem. I have changed it to 1 (don’t know what the value should be, but AFAIK it should be taken from IPP/IOP) and the series loads (latest preview, Linux)

The same data set loads properly in the stable release. Something must have broken as the nightly build has a different version of the dicom module.

Yes Slicer Stable (5.6.x) uses ITK 5.3.0 while Slicer Preview (5.7) is using ITK 5.4.0.

For convenience, to download the series mentioned by @rkikinis, you can do this:

$ pip install --upgrade idc-index
$ idc download 1.3.6.1.4.1.14519.5.2.1.2932.1975.255072988367557196694880426160

Also for convenience, the BigQuery query below will select all series in Imaging Data Commons that have negative SpacingBetweenSlices.

WITH
  temp_table AS (
  SELECT
    SeriesInstanceUID,
    Manufacturer,
    collection_id,
    Modality,
    SpacingBetweenSlices
  FROM
    `bigquery-public-data.idc_current.dicom_all`
  WHERE
    SAFE_CAST(SpacingBetweenSlices AS INT64)<0)
SELECT
  SeriesInstanceUID, any_value(Manufacturer) as Manufacturer, any_value(collection_id) as collection_id, any_value(Modality) as Modality, any_value(SpacingBetweenSlices) as SpacingBetweenSlices
FROM
  temp_table
  group by SeriesInstanceUID
order by Modality

For the sake of convenience, the result of running the query is below. You can plug in SeriesInstanceUID into the instructions above to download any of those series.

Row SeriesInstanceUID Manufacturer collection_id Modality SpacingBetweenSlices
1 1.3.6.1.4.1.32722.99.99.25384965558792938714037113526608989475 Philips nsclc_radiomics_genomics CT -4
2 1.3.6.1.4.1.32722.99.99.100358904385730998553678259325908346054 Philips nsclc_radiomics_genomics CT -4
3 1.3.6.1.4.1.32722.99.99.149205799948107127590297091243342465514 Philips nsclc_radiomics_genomics CT -4
4 1.3.6.1.4.1.32722.99.99.28029226020345235950699297480918949957 Philips nsclc_radiomics_genomics CT -4
5 1.3.6.1.4.1.32722.99.99.227649070570497400491575590741039272857 Philips nsclc_radiomics_genomics CT -4
6 1.3.6.1.4.1.14519.5.2.1.7009.2401.242751552100019522164450359161 Philips Medical Systems acrin_flt_breast CT -4
7 1.3.6.1.4.1.32722.99.99.87555546360421578566793618960733881338 Philips nsclc_radiomics_genomics CT -4
8 1.3.6.1.4.1.14519.5.2.1.7009.2401.133294077881051013352649869844 Philips Medical Systems acrin_flt_breast CT -4
9 1.3.6.1.4.1.32722.99.99.202497385511333427836173062690695671593 Philips nsclc_radiomics_genomics CT -4
10 1.3.6.1.4.1.32722.99.99.234042609125631064514013492837366678413 Philips nsclc_radiomics_genomics CT -4
11 1.3.6.1.4.1.14519.5.2.1.7009.2401.257448054826249901110797391087 Philips Medical Systems acrin_flt_breast CT -4
12 1.3.6.1.4.1.14519.5.2.1.7009.2401.874419016376926649794615836826 Philips Medical Systems acrin_flt_breast CT -4
13 1.3.6.1.4.1.14519.5.2.1.2857.3159.256409392788539989062455102657 Philips cptac_cm CT -3
14 1.3.6.1.4.1.32722.99.99.316599411906020923226736902474087731150 Philips nsclc_radiomics_genomics CT -4
15 1.3.6.1.4.1.32722.99.99.225570660272964280948169301188944152335 Philips nsclc_radiomics_genomics CT -4
16 1.3.6.1.4.1.14519.5.2.1.7009.2401.158401284359401547777840263080 Philips Medical Systems acrin_flt_breast CT -4
17 1.3.6.1.4.1.32722.99.99.315391434416455128958547012718014023683 Philips nsclc_radiomics_genomics CT -4
18 1.3.6.1.4.1.14519.5.2.1.7009.2401.128272705827469658312679193419 Philips Medical Systems acrin_flt_breast CT -4
19 1.3.6.1.4.1.32722.99.99.154854822987323366648376936102077390994 Philips nsclc_radiomics_genomics CT -4
20 1.3.6.1.4.1.32722.99.99.53827318715475830435474154358410860035 Philips nsclc_radiomics_genomics CT -4

There is also a recent related issue in OHIF about this: [Bug] Multiframe DICOM negatiive Spacing Between Slices not handled · Issue #4352 · OHIF/Viewers · GitHub

If you would like to see any of the series in the IDC-hosted OHIF v3 instance, you can get series-specific URL using the code below (after installing idc-index as discussed earlier):

from idc_index import IDCClient

series_uid ="1.3.6.1.4.1.14519.5.2.1.2932.1975.255072988367557196694880426160"

c = IDCClient()

c.get_viewer_URL(seriesInstanceUID=series_uid, viewer_selector="ohif_v3")

https://viewer.imaging.datacommons.cancer.gov/v3/viewer/?StudyInstanceUIDs=1.3.6.1.4.1.14519.5.2.1.2932.1975.277486652714623414151775226101&SeriesInstanceUIDs=1.3.6.1.4.1.14519.5.2.1.2932.1975.255072988367557196694880426160