Skip to content

Commit

Permalink
fix(voi): convert voi to an object before setting a property (#1723)
Browse files Browse the repository at this point in the history
set voi to an object before attempting to set properties
  • Loading branch information
IbrahimCSAE authored Dec 20, 2024
1 parent 7dcbc1d commit 7eaea78
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7eaea78

Please sign in to comment.