fix(SR): When loading DICOM SR, only one measurement is shown with no way to show others (#3228)

* fix: Make the cornerstone sR viewport show all measurements

* PR fixes

* PR fixes

* Add a DICOM SR hanging protocol

* Duplicate the hanging protocol for seg as well

* PR requested change

* PR requested changes

* PR fixes plus merge update fixes

* PR fixes and integration test fix

* PR - documentation
This commit is contained in:
Bill Wallace authored and GitHub committed 2023-04-25 17:25:10 -04:00
1 parent dc61d87238
commit 69d8e6a191
24 files changed
+457 -172

No files matched your search

@@ -1,6 +1,6 @@
import { metaData, utilities } from '@cornerstonejs/core';
import OHIF from '@ohif/core';
import OHIF, { DicomMetadataStore } from '@ohif/core';
import dcmjs from 'dcmjs';
import { adaptersSR } from '@cornerstonejs/adapters';
@@ -41,7 +41,6 @@ const _generateReport = (
if (typeof dataset.SpecificCharacterSet === 'undefined') {
dataset.SpecificCharacterSet = 'ISO_IR 192';
}
return dataset;
};
@@ -104,7 +103,18 @@ const commandsModule = ({}) => {
additionalFindingTypes,
options
);
const { StudyInstanceUID } = naturalizedReport;
const { StudyInstanceUID, ContentSequence } = naturalizedReport;
// The content sequence has 5 or more elements, of which
// the `[4]` element contains the annotation data, so this is
// checking that there is some annotation data present.
if (!ContentSequence?.[4].ContentSequence?.length) {
console.log(
'naturalizedReport missing imaging content',
naturalizedReport
);
throw new Error('Invalid report, no content');
}
await dataSource.store.dicom(naturalizedReport);
@@ -112,6 +122,11 @@ const commandsModule = ({}) => {
dataSource.deleteStudyMetadataPromise(StudyInstanceUID);
}
// The "Mode" route listens for DicomMetadataStore changes
// When a new instance is added, it listens and
// automatically calls makeDisplaySets
DicomMetadataStore.addInstances([naturalizedReport], true);
return naturalizedReport;
} catch (error) {
console.warn(error);