Skip to content

Commit

Permalink
fix(dicom): handle missing w/l tags
Browse files Browse the repository at this point in the history
  • Loading branch information
floryst committed Aug 6, 2024
1 parent 4dbb960 commit 8d2b7c0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/store/datasets-dicom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit 8d2b7c0

Please sign in to comment.