OHIF / Viewers

OHIF zero-footprint DICOM viewer and oncology specific Lesion Tracker, plus shared extension packages
https://docs.ohif.org/
MIT License
3.36k stars 3.38k forks source link

[Bug] Instances of one series are splitted #4416

Open narbek-abd opened 1 month ago

narbek-abd commented 1 month ago

Describe the Bug

028bd0c0-4e389405-e7476fe9-1c31fff6-1306d902.zip Here is anonymized study.

image They are in the same series, but splitted

Steps to Reproduce

tried open on last version and on 3.7

The current behavior

splitted

The expected behavior

Expected instances to be in the same series so i could scroll in single viewer

OS

all

Node version

all

Browser

all

narbek-abd commented 1 month ago

Screencast from 11.10.2024 15:11:57.webm Removing MG from isSingleImageModality function resolved the issue. But i guess it will broke somewhere else? pls help

narbek-abd commented 1 month ago

Here is complete code. Worked for all different kind of mammo studies. But i'm not sure

function getDisplaySetsFromSeries(instances) {
  // If the series has no instances, stop here
  if (!instances || !instances.length) {
    throw new Error('No instances were provided');
  }
  const hasMultiSourceImageSequenceInstance = instances.some(
    i => (i.SourceImageSequence || []).length > 1
  );
...
}

const isSingleImageModality = (modality, hasMultiSourceImageSequenceInstance) => {
  return (
    modality === 'CR' ||
    (modality === 'MG' && !hasMultiSourceImageSequenceInstance) ||
    modality === 'DX'
  );
};
arturojain commented 1 month ago

Had the same issue but this seems to be the reason.