Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/composables/useWindowingConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ export function useWindowingConfig(
});

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