From c047377a8d42836e2d45207b9af9479468d0ef43 Mon Sep 17 00:00:00 2001 From: Bill Wallace Date: Mon, 13 Nov 2023 08:50:58 -0500 Subject: [PATCH] fix(overlay): Overlays aren't shown on undefined origin (#3781) --- .../src/tools/ImageOverlayViewerTool.tsx | 6 ++ modes/basic-test-mode/src/initToolGroups.ts | 1 + platform/app/public/config/e2e.js | 58 +++++++++++++------ 3 files changed, 46 insertions(+), 19 deletions(-) diff --git a/extensions/cornerstone/src/tools/ImageOverlayViewerTool.tsx b/extensions/cornerstone/src/tools/ImageOverlayViewerTool.tsx index 20cb8b9aeef..1815d52402a 100644 --- a/extensions/cornerstone/src/tools/ImageOverlayViewerTool.tsx +++ b/extensions/cornerstone/src/tools/ImageOverlayViewerTool.tsx @@ -73,6 +73,12 @@ class ImageOverlayViewerTool extends AnnotationDisplayTool { return; } + // Fix the x, y positions + overlays.forEach(overlay => { + overlay.x ||= 0; + overlay.y ||= 0; + }); + this._cachedOverlayMetadata.set(imageId, overlays); this._getCachedStat(imageId, overlays, this.configuration.fillColor).then(cachedStat => { diff --git a/modes/basic-test-mode/src/initToolGroups.ts b/modes/basic-test-mode/src/initToolGroups.ts index 3110f24f885..3187e12e369 100644 --- a/modes/basic-test-mode/src/initToolGroups.ts +++ b/modes/basic-test-mode/src/initToolGroups.ts @@ -51,6 +51,7 @@ function initDefaultToolGroup(extensionManager, toolGroupService, commandsManage { toolName: toolNames.SegmentationDisplay }, ], // enabled + enabled: [{ toolName: toolNames.ImageOverlayViewer }], // disabled disabled: [{ toolName: toolNames.ReferenceLines }], }; diff --git a/platform/app/public/config/e2e.js b/platform/app/public/config/e2e.js index bf095af71d1..5ffdab32af0 100644 --- a/platform/app/public/config/e2e.js +++ b/platform/app/public/config/e2e.js @@ -30,6 +30,10 @@ window.config = { supportsWildcard: true, singlepart: 'video,thumbnail,pdf', omitQuotationForMultipartRequest: true, + bulkDataURI: { + enabled: true, + relativeResolution: 'studies', + }, }, }, { @@ -50,6 +54,10 @@ window.config = { supportsWildcard: true, staticWado: true, singlepart: 'bulkdata,video,pdf', + bulkDataURI: { + enabled: true, + relativeResolution: 'studies', + }, }, }, { @@ -70,6 +78,10 @@ window.config = { supportsWildcard: true, staticWado: true, singlepart: 'bulkdata,video,pdf', + bulkDataURI: { + enabled: true, + relativeResolution: 'studies', + }, }, }, { @@ -89,27 +101,35 @@ window.config = { supportsWildcard: true, staticWado: true, singlepart: 'bulkdata,video,pdf', + bulkDataURI: { + enabled: true, + relativeResolution: 'studies', + }, + }, + }, + { + friendlyName: 'StaticWado default data', + namespace: '@ohif/extension-default.dataSourcesModule.dicomweb', + sourceName: 'dicomweb', + configuration: { + name: 'DCM4CHEE', + wadoUriRoot: '/dicomweb', + qidoRoot: '/dicomweb', + wadoRoot: '/dicomweb', + qidoSupportsIncludeField: false, + supportsReject: false, + imageRendering: 'wadors', + thumbnailRendering: 'wadors', + enableStudyLazyLoad: true, + supportsFuzzyMatching: false, + supportsWildcard: true, + staticWado: true, + bulkDataURI: { + enabled: true, + relativeResolution: 'studies', + }, }, }, - // { - // friendlyName: 'StaticWado default data', - // namespace: '@ohif/extension-default.dataSourcesModule.dicomweb', - // sourceName: 'dicomweb', - // configuration: { - // name: 'DCM4CHEE', - // wadoUriRoot: '/dicomweb', - // qidoRoot: '/dicomweb', - // wadoRoot: '/dicomweb', - // qidoSupportsIncludeField: false, - // supportsReject: false, - // imageRendering: 'wadors', - // thumbnailRendering: 'wadors', - // enableStudyLazyLoad: true, - // supportsFuzzyMatching: false, - // supportsWildcard: true, - // staticWado: true, - // }, - // }, { namespace: '@ohif/extension-default.dataSourcesModule.dicomjson', sourceName: 'dicomjson',