fix(overlay): Overlays aren't shown on undefined origin (#3781)

This commit is contained in:
Bill Wallace 2023-11-13 08:50:58 -05:00 committed by GitHub
parent 14793493a4
commit fd1251f751
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 46 additions and 19 deletions

View File

@ -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 => {

View File

@ -51,6 +51,7 @@ function initDefaultToolGroup(extensionManager, toolGroupService, commandsManage
{ toolName: toolNames.SegmentationDisplay },
],
// enabled
enabled: [{ toolName: toolNames.ImageOverlayViewer }],
// disabled
disabled: [{ toolName: toolNames.ReferenceLines }],
};

View File

@ -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',