Skip to content

Commit

Permalink
fix(WindowLevelTool): Do not reset the auto/preset selection
Browse files Browse the repository at this point in the history
  • Loading branch information
bnmajor committed Nov 5, 2023
1 parent 171c494 commit 2d5976d
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/components/tools/windowing/WindowLevelTool.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
});
}
}
Expand All @@ -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,
});
}
}
Expand Down

0 comments on commit 2d5976d

Please sign in to comment.