feat(SR): SCOORD3D point annotations support for stack viewports (#4315)
This commit is contained in:
1 parent
e0fca8c88c
commit
ac1cad25af
51 files changed
+978
-607
No files matched your search
@@ -188,6 +188,12 @@ class CornerstoneCacheService {
|
||||
|
||||
const displaySet = nonOverlayDisplaySets[0];
|
||||
|
||||
if (displaySet.load && displaySet.load instanceof Function) {
|
||||
const { userAuthenticationService } = this.servicesManager.services;
|
||||
const headers = userAuthenticationService.getAuthorizationHeader();
|
||||
await displaySet.load({ headers });
|
||||
}
|
||||
|
||||
let stackImageIds = this.stackImageIds.get(displaySet.displaySetInstanceUID);
|
||||
|
||||
if (!stackImageIds) {
|
||||
|
||||
@@ -404,6 +404,14 @@ class CornerstoneViewportService extends PubSubService implements IViewportServi
|
||||
): void {
|
||||
const renderingEngine = this.getRenderingEngine();
|
||||
|
||||
// if not valid viewportData then return early
|
||||
if (viewportData.viewportType === csEnums.ViewportType.STACK) {
|
||||
// check if imageIds is valid
|
||||
if (!viewportData.data[0].imageIds?.length) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// This is the old viewportInfo, which may have old options but we might be
|
||||
// using its viewport (same viewportId as the new viewportInfo)
|
||||
const viewportInfo = this.viewportsById.get(viewportId);
|
||||
@@ -641,6 +649,10 @@ class CornerstoneViewportService extends PubSubService implements IViewportServi
|
||||
|
||||
this._handleOverlays(viewport);
|
||||
|
||||
if (!imageIds?.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
return viewport.setStack(imageIds, initialImageIndexToUse).then(() => {
|
||||
viewport.setProperties({ ...properties });
|
||||
this.setPresentations(viewport.id, presentations, viewportInfo);
|
||||
|
||||
Reference in new issue
Block a user