X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvSlicerManagerCommand.cxx;h=b6fdad145815f7c734eedcaa0f927fb3271b0d7c;hb=9a9ae52b68d1cc0fea67acb45702d092446b423e;hp=5d252043bb0603c9f5f0f58419df63b9f0a3ff73;hpb=1e034c70105f0926939acaaa27ddb46e904ae8bf;p=clitk.git diff --git a/vv/vvSlicerManagerCommand.cxx b/vv/vvSlicerManagerCommand.cxx index 5d25204..b6fdad1 100644 --- a/vv/vvSlicerManagerCommand.cxx +++ b/vv/vvSlicerManagerCommand.cxx @@ -188,6 +188,14 @@ void vvSlicerManagerCommand::Execute(vtkObject *caller, this->SM->Render(); return; } + if (KeyPress == "x") { + for(int i=0; iNumberOfSlicers(); i++) { + SM->RemoveActor("overlay",0); + SM->SetColorMap(0); + SM->Render(); + } + return; + } if (KeyPress == "u") { this->SM->Reload(); this->SM->Render(); @@ -217,13 +225,13 @@ void vvSlicerManagerCommand::Execute(vtkObject *caller, return; } if (KeyPress == "Up") { - DD("------------ up"); + // DD("------------ up"); this->SM->GetSlicer(VisibleInWindow)->SetSlice(this->SM->GetSlicer(VisibleInWindow)->GetSlice()+1); - DD("------------ after set slice"); + //DD("------------ after set slice"); this->SM->UpdateInfoOnCursorPosition(VisibleInWindow); - DD("------------ after UpdateInfoOnCursorPosition"); + //DD("------------ after UpdateInfoOnCursorPosition"); this->SM->UpdateSlice(VisibleInWindow); - DD("------------ after updateslice"); + //DD("------------ after updateslice"); } if (KeyPress == "Down") { this->SM->GetSlicer(VisibleInWindow)->SetSlice(this->SM->GetSlicer(VisibleInWindow)->GetSlice()-1); @@ -291,6 +299,10 @@ void vvSlicerManagerCommand::Execute(vtkObject *caller, mStartSlicer = -1; } + if (event == vtkCommand::EndInteractionEvent) { + this->SM->UpdateLinkedNavigation(this->SM->GetSlicer(VisibleInWindow),true); + return; + } } if (VisibleInWindow > -1) { this->SM->Activated(); @@ -304,6 +316,7 @@ void vvSlicerManagerCommand::Execute(vtkObject *caller, } else if (event == vtkCommand::MouseWheelForwardEvent && isi->GetInteractor()->GetControlKey()) { double factor = 2; this->Dolly(pow((double)1.1, factor),isi->GetInteractor()); + Execute(caller, vtkCommand::EndInteractionEvent, NULL); } else if (event == vtkCommand::MouseWheelBackwardEvent && !isi->GetInteractor()->GetControlKey()) { this->SM->GetSlicer(VisibleInWindow)->SetSlice(this->SM->GetSlicer(VisibleInWindow)->GetSlice()-1); this->SM->UpdateSlice(VisibleInWindow); @@ -311,6 +324,7 @@ void vvSlicerManagerCommand::Execute(vtkObject *caller, } else if (event == vtkCommand::MouseWheelBackwardEvent && isi->GetInteractor()->GetControlKey()) { double factor = -2; this->Dolly(pow((double)1.1, factor),isi->GetInteractor()); + Execute(caller, vtkCommand::EndInteractionEvent, NULL); } double xWorld=0; double yWorld=0;