Skip to content

Commit

Permalink
fix (voi): check if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
IbrahimCSAE authored Dec 20, 2024
1 parent df90c42 commit bf76c52
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +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.voiLUTFunction = voiLutModule.voiLUTFunction;
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 bf76c52

Please sign in to comment.