]> Creatis software - clitk.git/blobdiff - vv/vvSlicerManagerCommand.cxx
- improve (?) speed render for contours
[clitk.git] / vv / vvSlicerManagerCommand.cxx
index 0415c9e8934fe6b98fe6848b37e8ef01445c2776..f29263b76c34347e66258d9677722c9c05cd71e9 100644 (file)
 #include <vtkAssemblyPath.h>
 #include <vtkCornerAnnotation.h>
 #include <vtkRenderWindow.h>
-
+#include <vvImage.h>
+#include <vtkImageReslice.h>
 #include "vvSlicer.h"
 #include "vvInteractorStyleNavigator.h"
+#include "vtkTransform.h"
 
 #include <cmath>
 
@@ -80,6 +82,8 @@ void vvSlicerManagerCommand::Execute(vtkObject *caller,
         if (VisibleInWindow>-1)
             renderer=this->SM->GetSlicer(VisibleInWindow)->GetRenderer();
         newLandmark = false;
+       
+
 
         if (event == vtkCommand::StartPickEvent && VisibleInWindow == -1)
         {
@@ -243,9 +247,13 @@ void vvSlicerManagerCommand::Execute(vtkObject *caller,
                 }
                 if (KeyPress == "Up")
                 {
-                    this->SM->GetSlicer(VisibleInWindow)->SetSlice(this->SM->GetSlicer(VisibleInWindow)->GetSlice()+1);
-                    this->SM->UpdateSlice(VisibleInWindow);
-                    this->SM->UpdateInfoOnCursorPosition(VisibleInWindow);
+                 DD("------------ up");
+                 this->SM->GetSlicer(VisibleInWindow)->SetSlice(this->SM->GetSlicer(VisibleInWindow)->GetSlice()+1);
+                 DD("------------ after set slice");
+                 this->SM->UpdateInfoOnCursorPosition(VisibleInWindow);
+                 DD("------------ after UpdateInfoOnCursorPosition");
+                 this->SM->UpdateSlice(VisibleInWindow);
+                 DD("------------ after updateslice");
                 }
                 if (KeyPress == "Down")
                 {
@@ -283,6 +291,7 @@ void vvSlicerManagerCommand::Execute(vtkObject *caller,
                     this->SM->UpdateSliceRange(VisibleInWindow);
                     this->SM->UpdateInfoOnCursorPosition(VisibleInWindow);
                 }
+                
             }
 
             //All type of mouse events