From 7eaea78d8755165bec50a5df7f64ed2f610a642b Mon Sep 17 00:00:00 2001 From: Ibrahim <93064150+IbrahimCSAE@users.noreply.github.com> Date: Fri, 20 Dec 2024 11:56:38 -0500 Subject: [PATCH] fix(voi): convert voi to an object before setting a property (#1723) set voi to an object before attempting to set properties --- packages/core/src/RenderingEngine/helpers/setDefaultVolumeVOI.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/core/src/RenderingEngine/helpers/setDefaultVolumeVOI.ts b/packages/core/src/RenderingEngine/helpers/setDefaultVolumeVOI.ts index d8914209f..a097fca91 100644 --- a/packages/core/src/RenderingEngine/helpers/setDefaultVolumeVOI.ts +++ b/packages/core/src/RenderingEngine/helpers/setDefaultVolumeVOI.ts @@ -86,6 +86,7 @@ function getVOIFromMetadata(imageVolume: IImageVolume): VOIRange | undefined { const imageId = imageIds[imageIdIndex]; const voiLutModule = metaData.get('voiLutModule', imageId); if (voiLutModule && voiLutModule.windowWidth && voiLutModule.windowCenter) { + voi = {}; voi.voiLUTFunction = voiLutModule?.voiLUTFunction; const { windowWidth, windowCenter } = voiLutModule; const width = Array.isArray(windowWidth) ? windowWidth[0] : windowWidth;