Skip to content

Commit 902412d

Browse files
authored
Merge pull request Kitware#483 from bnmajor/wl-auto-fix
fix(WindowLevelTool): Do not reset the auto/preset selection
2 parents 0a7900f + f0f830d commit 902412d

1 file changed

Lines changed: 0 additions & 11 deletions

File tree

src/components/tools/windowing/WindowLevelTool.vue

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import useWindowingStore, {
1616
import { useCurrentImage } from '@/src/composables/useCurrentImage';
1717
import vtkMouseRangeManipulator from '@kitware/vtk.js/Interaction/Manipulators/MouseRangeManipulator';
1818
import { useViewStore } from '@/src/store/views';
19-
import { WL_AUTO_DEFAULT } from '@/src/constants';
2019
2120
function computeStep(min: number, max: number) {
2221
return Math.min(max - min, 1) / 256;
@@ -44,12 +43,6 @@ const WindowLevelToolComponent = defineComponent({
4443
const wlConfig = computed(() =>
4544
windowingStore.getConfig(viewID.value, currentImageID.value)
4645
);
47-
const wlDefaults = computed(() => {
48-
return {
49-
width: windowConfigDefaults.width,
50-
level: windowConfigDefaults.level,
51-
};
52-
});
5346
5447
const wwRange = computed(() => ({
5548
min: 1e-12, // ensure we don't hit zero and jump to white
@@ -126,8 +119,6 @@ const WindowLevelToolComponent = defineComponent({
126119
if (currentImageID.value != null) {
127120
windowingStore.updateConfig(viewID.value, currentImageID.value, {
128121
width: v,
129-
auto: WL_AUTO_DEFAULT,
130-
preset: wlDefaults.value,
131122
});
132123
}
133124
}
@@ -142,8 +133,6 @@ const WindowLevelToolComponent = defineComponent({
142133
if (currentImageID.value != null) {
143134
windowingStore.updateConfig(viewID.value, currentImageID.value, {
144135
level: v,
145-
auto: WL_AUTO_DEFAULT,
146-
preset: wlDefaults.value,
147136
});
148137
}
149138
}

0 commit comments

Comments
 (0)