fix(segmentation): failing to render SEG because it was on default tool group (#3222)

* fix: Segmentation service fixes for secondary volumes

* Remove toolgroupID in promptSeg
This commit is contained in:
Bill Wallace authored and GitHub committed 2023-03-10 13:57:23 -05:00
1 parent 3f20b41c17
commit b7fff77e17
18 files changed
+97 -117

No files matched your search

@@ -1,7 +1,6 @@
async function _hydrateSEGDisplaySet({
segDisplaySet,
viewportIndex,
toolGroupId,
servicesManager,
}) {
const {
@@ -55,8 +54,6 @@ async function _hydrateSEGDisplaySet({
viewportIndex: index,
displaySetInstanceUIDs: viewport.displaySetInstanceUIDs,
viewportOptions: {
viewportType: 'volume',
toolGroupId,
initialImageOptions: {
preset: 'middle',
},
@@ -10,13 +10,12 @@ function promptHydrateSEG({
servicesManager,
segDisplaySet,
viewportIndex,
toolGroupId = 'default',
}) {
const { UIViewportDialogService } = servicesManager.services;
const { uiViewportDialogService } = servicesManager.services;
return new Promise(async function(resolve, reject) {
const promptResult = await _askHydrate(
UIViewportDialogService,
uiViewportDialogService,
viewportIndex
);
@@ -24,7 +23,6 @@ function promptHydrateSEG({
const isHydrated = await hydrateSEGDisplaySet({
segDisplaySet,
viewportIndex,
toolGroupId,
servicesManager,
});
@@ -33,7 +31,7 @@ function promptHydrateSEG({
});
}
function _askHydrate(UIViewportDialogService, viewportIndex) {
function _askHydrate(uiViewportDialogService, viewportIndex) {
return new Promise(function(resolve, reject) {
const message = 'Do you want to open this Segmentation?';
const actions = [
@@ -49,18 +47,18 @@ function _askHydrate(UIViewportDialogService, viewportIndex) {
},
];
const onSubmit = result => {
UIViewportDialogService.hide();
uiViewportDialogService.hide();
resolve(result);
};
UIViewportDialogService.show({
uiViewportDialogService.show({
viewportIndex,
type: 'info',
message,
actions,
onSubmit,
onOutsideClick: () => {
UIViewportDialogService.hide();
uiViewportDialogService.hide();
resolve(RESPONSE.CANCEL);
},
});