Skip to content

Commit

Permalink
fix: Overlays aren't shown on undefined origin
Browse files Browse the repository at this point in the history
  • Loading branch information
wayfarer3130 committed Nov 10, 2023
1 parent 5b513fd commit 7779d32
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 19 deletions.
6 changes: 6 additions & 0 deletions extensions/cornerstone/src/tools/ImageOverlayViewerTool.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down
1 change: 1 addition & 0 deletions modes/basic-test-mode/src/initToolGroups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ function initDefaultToolGroup(extensionManager, toolGroupService, commandsManage
{ toolName: toolNames.SegmentationDisplay },
],
// enabled
enabled: [{ toolName: toolNames.ImageOverlayViewer }],
// disabled
disabled: [{ toolName: toolNames.ReferenceLines }],
};
Expand Down
58 changes: 39 additions & 19 deletions platform/app/public/config/e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ window.config = {
supportsWildcard: true,
singlepart: 'video,thumbnail,pdf',
omitQuotationForMultipartRequest: true,
bulkDataURI: {
enabled: true,
relativeResolution: 'studies',
},
},
},
{
Expand All @@ -50,6 +54,10 @@ window.config = {
supportsWildcard: true,
staticWado: true,
singlepart: 'bulkdata,video,pdf',
bulkDataURI: {
enabled: true,
relativeResolution: 'studies',
},
},
},
{
Expand All @@ -70,6 +78,10 @@ window.config = {
supportsWildcard: true,
staticWado: true,
singlepart: 'bulkdata,video,pdf',
bulkDataURI: {
enabled: true,
relativeResolution: 'studies',
},
},
},
{
Expand All @@ -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',
Expand Down

0 comments on commit 7779d32

Please sign in to comment.