Skip to content

Commit e6b1f0b

Browse files
committed
fix(windowing): default to black images
1 parent 31e7dcc commit e6b1f0b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/composables/useWindowingConfig.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ export function useWindowingConfig(
1919
});
2020

2121
const generateComputed = (prop: 'width' | 'level') => {
22+
// show all-black image with W/L of (1, 2^32-1) until slices load in and we get a valid window/level
23+
const defaultValue = prop === 'width' ? 1 : 2 ** 32 - 1;
2224
return computed({
2325
get: () => {
24-
return config.value?.[prop] ?? 0;
26+
return config.value?.[prop] ?? defaultValue;
2527
},
2628
set: (val) => {
2729
const imageIdVal = unref(imageID);

0 commit comments

Comments
 (0)