]> Creatis software - clitk.git/commitdiff
Changment of cursor color value to keep the same color than before VTK8
authortbaudier <thomas.baudier@creatis.insa-lyon.fr>
Thu, 7 Mar 2019 15:48:24 +0000 (16:48 +0100)
committertbaudier <thomas.baudier@creatis.insa-lyon.fr>
Thu, 7 Mar 2019 15:48:24 +0000 (16:48 +0100)
With VTK update, the color of the cursor was white
I found that, passing value from int (base 256) to double (base 1.0) change the behavior
So I adapted the color to keep the red for the activated image, the green, unactivated slice and light blue for unactivated linked image

vv/vvSlicer.cxx
vv/vvSlicer.h
vv/vvSlicerManager.cxx

index 550e8a034ac4395c59de133f3bc0185d44a22474..4a4a5154bbd65655e350aee34b7489068749d1e4 100644 (file)
@@ -135,7 +135,7 @@ vvSlicer::vvSlicer()
 
   pdmA = vtkSmartPointer<vtkActor2D>::New();
   pdmA->SetMapper(pdm);
-  pdmA->GetProperty()->SetColor(255,10,212);
+  pdmA->GetProperty()->SetColor(1,0,0);
   pdmA->SetVisibility(0);
   pdmA->SetPickable(0);
 
@@ -269,7 +269,7 @@ void vvSlicer::ToggleContourSuperposition()
 
 
 //------------------------------------------------------------------------------
-void vvSlicer::SetCursorColor(int r,int g, int b)
+void vvSlicer::SetCursorColor(double r, double g, double b)
 { 
   pdmA->GetProperty()->SetColor(r,g,b);
 }
index 3beab6e6181d0ee866d371f19389ed1befb5356c..6af3773adf26ebdb7096208b224cf7b9e318d49a 100644 (file)
@@ -164,7 +164,7 @@ public:
   void SetCursorVisibility(bool s);
 
   bool GetCursorVisibility();
-  void SetCursorColor(int r,int g, int b);
+  void SetCursorColor(double r,double g, double b);
 
   void SetCornerAnnotationVisibility(bool s);
   bool GetCornerAnnotationVisibility();
index 9548dfded6f2944a4f61dadb3480b57ccd7747c9..fab1e8d8654bc145b392cce550641c85f92f2d60 100644 (file)
@@ -719,7 +719,7 @@ mSlicers[slicer]->GetRegisterExtent(extentImageReslice);
 #endif
   {
     mSlicers[slicer]->UpdateCursorPosition();
-    mSlicers[slicer]->SetCursorColor(10,212,255);
+    mSlicers[slicer]->SetCursorColor(1,0,0);
     mSelectedSlicer = slicer;
 
     switch (mSlicers[slicer]->GetSliceOrientation()) {
@@ -750,9 +750,9 @@ mSlicers[slicer]->GetRegisterExtent(extentImageReslice);
         if (current) { //do not display corner annotation if image is the one picked
           mSlicers[i]->SetCurrentPosition(-VTK_DOUBLE_MAX,-VTK_DOUBLE_MAX,
                                           -VTK_DOUBLE_MAX, mSlicers[slicer]->GetMaxCurrentTSlice());
-          mSlicers[i]->SetCursorColor(255,10,212);
+          mSlicers[i]->SetCursorColor(0,0.96,0.17);
         } else {
-          mSlicers[i]->SetCursorColor(150,10,282);
+          mSlicers[i]->SetCursorColor(0.41,0.96,1);
         }
         switch (mSlicers[i]->GetSliceOrientation()) {
         case vtkImageViewer2::SLICE_ORIENTATION_XY: