changeset 455:e3a6e3bf5c7c

changed the windowing tracker sensitivity. It was not usable with 16bits full range
author Alain Mazy <alain@mazy.be>
date Mon, 21 Jan 2019 22:41:24 +0100
parents 50229f6eb4cd
children b70fcc134ba4
files Framework/Radiography/RadiographyWindowingTracker.cpp
diffstat 1 files changed, 1 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/Radiography/RadiographyWindowingTracker.cpp	Fri Jan 18 11:52:10 2019 +0100
+++ b/Framework/Radiography/RadiographyWindowingTracker.cpp	Mon Jan 21 22:41:24 2019 +0100
@@ -137,21 +137,9 @@
 
     assert(minValue <= maxValue);
 
-    float tmp;
-      
     float delta = (maxValue - minValue);
-    if (delta <= 1)
-    {
-      tmp = 0;
-    }
-    else
-    {
-      // NB: Visual Studio 2008 does not provide "log2f()", so we
-      // implement it by ourselves
-      tmp = logf(delta) / logf(2.0f);
-    }
+    strength_ = delta / 1000.0f; // 1px move will change the ww/wc by 0.1%
 
-    strength_ = tmp - 7;
     if (strength_ < 1)
     {
       strength_ = 1;