From b4afdefcb3dc0b69f6ad779c132232fe67f3aeba Mon Sep 17 00:00:00 2001 From: Erik Ziegler Date: Mon, 23 Mar 2020 14:01:05 +0100 Subject: [PATCH] fix: Unset voiLUT when using WWWC or WWWCRegion tool (#1198) --- src/tools/WwwcRegionTool.js | 3 +++ src/tools/WwwcTool.js | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/tools/WwwcRegionTool.js b/src/tools/WwwcRegionTool.js index fdb9a8a0b..2250eea1c 100644 --- a/src/tools/WwwcRegionTool.js +++ b/src/tools/WwwcRegionTool.js @@ -220,6 +220,9 @@ const _applyWWWCRegion = function(evt, config) { ); viewport.voi.windowCenter = minMaxMean.mean; + // Unset any existing VOI LUT + viewport.voiLUT = undefined; + external.cornerstone.setViewport(element, viewport); external.cornerstone.updateImage(element); }; diff --git a/src/tools/WwwcTool.js b/src/tools/WwwcTool.js index 2819aab65..8af6010e9 100644 --- a/src/tools/WwwcTool.js +++ b/src/tools/WwwcTool.js @@ -71,4 +71,7 @@ function basicLevelingStrategy(evt) { eventData.viewport.voi.windowWidth += deltaY; eventData.viewport.voi.windowCenter += deltaX; } + + // Unset any existing VOI LUT + eventData.viewport.voiLUT = undefined; }