From 2d5976dd232e8359dffb56b5891852e52ccdc8cd Mon Sep 17 00:00:00 2001 From: Brianna Major Date: Sun, 5 Nov 2023 16:16:57 -0500 Subject: [PATCH] fix(WindowLevelTool): Do not reset the auto/preset selection --- src/components/tools/windowing/WindowLevelTool.vue | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/components/tools/windowing/WindowLevelTool.vue b/src/components/tools/windowing/WindowLevelTool.vue index 651dd11f4..8326e068e 100644 --- a/src/components/tools/windowing/WindowLevelTool.vue +++ b/src/components/tools/windowing/WindowLevelTool.vue @@ -16,7 +16,6 @@ import useWindowingStore, { import { useCurrentImage } from '@/src/composables/useCurrentImage'; import vtkMouseRangeManipulator from '@kitware/vtk.js/Interaction/Manipulators/MouseRangeManipulator'; import { useViewStore } from '@/src/store/views'; -import { WL_AUTO_DEFAULT } from '@/src/constants'; function computeStep(min: number, max: number) { return Math.min(max - min, 1) / 256; @@ -44,12 +43,6 @@ const WindowLevelToolComponent = defineComponent({ const wlConfig = computed(() => windowingStore.getConfig(viewID.value, currentImageID.value) ); - const wlDefaults = computed(() => { - return { - width: windowConfigDefaults.width, - level: windowConfigDefaults.level, - }; - }); const wwRange = computed(() => ({ min: 1e-12, // ensure we don't hit zero and jump to white @@ -126,8 +119,6 @@ const WindowLevelToolComponent = defineComponent({ if (currentImageID.value != null) { windowingStore.updateConfig(viewID.value, currentImageID.value, { width: v, - auto: WL_AUTO_DEFAULT, - preset: wlDefaults.value, }); } } @@ -142,8 +133,6 @@ const WindowLevelToolComponent = defineComponent({ if (currentImageID.value != null) { windowingStore.updateConfig(viewID.value, currentImageID.value, { level: v, - auto: WL_AUTO_DEFAULT, - preset: wlDefaults.value, }); } }