From c949c13867258bc33b555a89f26162ae463de203 Mon Sep 17 00:00:00 2001 From: Sandeep Nayathil Date: Thu, 6 May 2021 18:17:48 +0530 Subject: [PATCH 1/2] Updates in Windowing interactor to avoid rounding in mouse delta calculation to properly update windowing values on mouse move in small pixel range images like PET --- src/VTKViewport/vtkInteractorStyleMPRWindowLevel.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/VTKViewport/vtkInteractorStyleMPRWindowLevel.js b/src/VTKViewport/vtkInteractorStyleMPRWindowLevel.js index 64801df6..46ea7edb 100644 --- a/src/VTKViewport/vtkInteractorStyleMPRWindowLevel.js +++ b/src/VTKViewport/vtkInteractorStyleMPRWindowLevel.js @@ -42,8 +42,7 @@ function vtkInteractorStyleMPRWindowLevel(publicAPI, model) { .getScalars() .getRange(); const imageDynamicRange = range[1] - range[0]; - const multiplier = - Math.round(imageDynamicRange / 1024) * publicAPI.getLevelScale(); + const multiplier = (imageDynamicRange / 1024) * publicAPI.getLevelScale(); const dx = Math.round((pos[0] - model.wlStartPos[0]) * multiplier); const dy = Math.round((pos[1] - model.wlStartPos[1]) * multiplier); From 0a777688457495a0d080cf9ee23d01ce69a3472f Mon Sep 17 00:00:00 2001 From: Sandeep Nayathil Date: Thu, 6 May 2021 18:17:48 +0530 Subject: [PATCH 2/2] Updates in Windowing interactor to avoid rounding in mouse delta calculation to properly update windowing values on mouse move in small pixel range images like PET --- src/VTKViewport/vtkInteractorStyleMPRWindowLevel.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/VTKViewport/vtkInteractorStyleMPRWindowLevel.js b/src/VTKViewport/vtkInteractorStyleMPRWindowLevel.js index 64801df6..46ea7edb 100644 --- a/src/VTKViewport/vtkInteractorStyleMPRWindowLevel.js +++ b/src/VTKViewport/vtkInteractorStyleMPRWindowLevel.js @@ -42,8 +42,7 @@ function vtkInteractorStyleMPRWindowLevel(publicAPI, model) { .getScalars() .getRange(); const imageDynamicRange = range[1] - range[0]; - const multiplier = - Math.round(imageDynamicRange / 1024) * publicAPI.getLevelScale(); + const multiplier = (imageDynamicRange / 1024) * publicAPI.getLevelScale(); const dx = Math.round((pos[0] - model.wlStartPos[0]) * multiplier); const dy = Math.round((pos[1] - model.wlStartPos[1]) * multiplier);