From 8d2b7c0119f6b8bba72f462031f8c4f86bb32889 Mon Sep 17 00:00:00 2001 From: Forrest Date: Tue, 6 Aug 2024 14:49:51 -0400 Subject: [PATCH] fix(dicom): handle missing w/l tags --- src/store/datasets-dicom.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/store/datasets-dicom.ts b/src/store/datasets-dicom.ts index 176c2848..41da3478 100644 --- a/src/store/datasets-dicom.ts +++ b/src/store/datasets-dicom.ts @@ -118,7 +118,13 @@ export const getDisplayName = (info: VolumeInfo) => { export const getWindowLevels = (info: VolumeInfo) => { const { WindowWidth, WindowLevel } = info; - if (WindowWidth === '') return []; // missing tag + if ( + WindowWidth == null || + WindowLevel == null || + WindowWidth === '' || + WindowLevel === '' + ) + return []; // missing tag const widths = WindowWidth.split('\\').map(parseFloat); const levels = WindowLevel.split('\\').map(parseFloat); if (