From 9b3836d2dbf4221913bda424490ca60ab4923fee Mon Sep 17 00:00:00 2001 From: sedghi Date: Thu, 19 Dec 2024 16:14:05 -0500 Subject: [PATCH] fix tests --- .../core/src/RenderingEngine/helpers/setDefaultVolumeVOI.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/RenderingEngine/helpers/setDefaultVolumeVOI.ts b/packages/core/src/RenderingEngine/helpers/setDefaultVolumeVOI.ts index b4c376868..d3aa9572b 100644 --- a/packages/core/src/RenderingEngine/helpers/setDefaultVolumeVOI.ts +++ b/packages/core/src/RenderingEngine/helpers/setDefaultVolumeVOI.ts @@ -85,8 +85,8 @@ function getVOIFromMetadata(imageVolume: IImageVolume): VOIRange | undefined { const imageIdIndex = Math.floor(imageIds.length / 2); const imageId = imageIds[imageIdIndex]; const voiLutModule = metaData.get('voiLutModule', imageId); - voi.voiLUTFunction = voiLutModule.voiLUTFunction; - if (voiLutModule?.windowWidth && voiLutModule.windowCenter) { + if (voiLutModule && voiLutModule.windowWidth && voiLutModule.windowCenter) { + voi.voiLUTFunction = voiLutModule.voiLUTFunction; const { windowWidth, windowCenter } = voiLutModule; const width = Array.isArray(windowWidth) ? windowWidth[0] : windowWidth; const center = Array.isArray(windowCenter)