changeset 1046:513a4053c54a

merge
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 09 Oct 2019 17:18:29 +0200
parents 6a9300ecfa13 (current diff) b26fb3a99f01 (diff)
children efc5b62b9539
files
diffstat 2 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/Radiography/RadiographyWindowingTracker.cpp	Wed Oct 09 17:17:56 2019 +0200
+++ b/Framework/Radiography/RadiographyWindowingTracker.cpp	Wed Oct 09 17:18:29 2019 +0200
@@ -20,6 +20,7 @@
 
 
 #include "RadiographyWindowingTracker.h"
+#include "RadiographyWidget.h"
 
 #include <Core/OrthancException.h>
 
@@ -115,6 +116,8 @@
     
   RadiographyWindowingTracker::RadiographyWindowingTracker(UndoRedoStack& undoRedoStack,
                                                            RadiographyScene& scene,
+                                                           RadiographyWidget& widget,
+                                                           ImageInterpolation interpolationDuringTracking,
                                                            int x,
                                                            int y,
                                                            Action leftAction,
@@ -123,6 +126,8 @@
                                                            Action downAction) :
     undoRedoStack_(undoRedoStack),
     scene_(scene),
+    widget_(widget),
+    initialWidgetInterpolation_(widget.GetInterpolation()),
     clickX_(x),
     clickY_(y),
     leftAction_(leftAction),
@@ -131,6 +136,7 @@
     downAction_(downAction)
   {
     scene_.GetWindowingWithDefault(sourceCenter_, sourceWidth_);
+    widget_.SetInterpolation(interpolationDuringTracking);
 
     float minValue, maxValue;
     scene.GetRange(minValue, maxValue);
@@ -156,6 +162,7 @@
 
   void RadiographyWindowingTracker::MouseUp()
   {
+    widget_.SetInterpolation(initialWidgetInterpolation_);
     undoRedoStack_.Add(new UndoRedoCommand(*this));
   }
 
--- a/Framework/Radiography/RadiographyWindowingTracker.h	Wed Oct 09 17:17:56 2019 +0200
+++ b/Framework/Radiography/RadiographyWindowingTracker.h	Wed Oct 09 17:18:29 2019 +0200
@@ -27,6 +27,9 @@
 
 namespace OrthancStone
 {
+
+  class RadiographyWidget;
+
   class RadiographyWindowingTracker : public Deprecated::IWorldSceneMouseTracker
   {   
   public:
@@ -43,6 +46,8 @@
 
     UndoRedoStack&      undoRedoStack_;
     RadiographyScene&   scene_;
+    RadiographyWidget&  widget_;
+    ImageInterpolation  initialWidgetInterpolation_;
     int                 clickX_;
     int                 clickY_;
     Action              leftAction_;
@@ -62,6 +67,8 @@
   public:
     RadiographyWindowingTracker(UndoRedoStack& undoRedoStack,
                                 RadiographyScene& scene,
+                                RadiographyWidget& widget,
+                                ImageInterpolation interpolationDuringTracking,
                                 int x,
                                 int y,
                                 Action leftAction,