Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sedghi committed Dec 19, 2024
1 parent 261663d commit 9b3836d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9b3836d

Please sign in to comment.