fix(bugs): enhancements and bugs in several areas (#4086)

This commit is contained in:
Ibrahim authored and GitHub committed 2024-05-06 14:55:32 -04:00
1 parent 01fe7fab3d
commit 730f434910
19 files changed
+146 -43

No files matched your search

@@ -258,9 +258,12 @@ const commandsModule = ({
labelmapObj.metadata = [];
const segmentationInOHIF = segmentationService.getSegmentation(segmentationId);
labelmapObj.segmentsOnLabelmap.forEach(segmentIndex => {
segmentationInOHIF.segments.forEach(segment => {
// segmentation service already has a color for each segment
const segment = segmentationInOHIF?.segments[segmentIndex];
if (!segment) {
return;
}
const segmentIndex = segment.segmentIndex;
const { label, color } = segment;
const RecommendedDisplayCIELabValue = dcmjs.data.Colors.rgb2DICOMLAB(
@@ -14,21 +14,27 @@ function promptHydrateSEG({
hydrateSEGDisplaySet,
}) {
const { uiViewportDialogService } = servicesManager.services;
const extensionManager = servicesManager._extensionManager;
const appConfig = extensionManager._appConfig;
return new Promise(async function (resolve, reject) {
const promptResult = await _askHydrate(uiViewportDialogService, viewportId);
const promptResult = appConfig?.disableConfirmationPrompts
? RESPONSE.HYDRATE_SEG
: await _askHydrate(uiViewportDialogService, viewportId);
if (promptResult === RESPONSE.HYDRATE_SEG) {
preHydrateCallbacks?.forEach(callback => {
callback();
});
const isHydrated = await hydrateSEGDisplaySet({
segDisplaySet,
viewportId,
});
window.setTimeout(async () => {
const isHydrated = await hydrateSEGDisplaySet({
segDisplaySet,
viewportId,
});
resolve(isHydrated);
resolve(isHydrated);
}, 0);
}
});
}