X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvSlicerManagerCommand.cxx;h=77b667e263bee3269a1f210e98a1f1bbf2c7cf0f;hb=0608e5a94e72e6c2ae9a1de81657b1f48ed61c3b;hp=805f51bea4bd943a23abc0ed4399d007b8dd8b8e;hpb=8ba83e36419fdc652818505bc9061135aa31e2d6;p=clitk.git diff --git a/vv/vvSlicerManagerCommand.cxx b/vv/vvSlicerManagerCommand.cxx index 805f51b..77b667e 100644 --- a/vv/vvSlicerManagerCommand.cxx +++ b/vv/vvSlicerManagerCommand.cxx @@ -109,7 +109,7 @@ void vvSlicerManagerCommand::Execute(vtkObject *caller, return; } if (KeyPress == "w") { - this->SM->SetLocalColorWindowing(VisibleInWindow); + this->SM->SetLocalColorWindowing(VisibleInWindow, bCtrlKey); return; } if (KeyPress == "0") { @@ -186,7 +186,6 @@ void vvSlicerManagerCommand::Execute(vtkObject *caller, return; } if (KeyPress == "h") { - std::cout << "KeyPress == \"h\"\n"; this->SM->SetCursorAndCornerAnnotationVisibility(0); this->SM->Render(); return; @@ -267,6 +266,7 @@ void vvSlicerManagerCommand::Execute(vtkObject *caller, this->SM->UpdateSliceRange(VisibleInWindow); } + this->SM->EmitKeyPressed(KeyPress); } //All type of mouse events @@ -277,7 +277,6 @@ void vvSlicerManagerCommand::Execute(vtkObject *caller, return; } - //DD(event); // Mouse release HERE if (event == vtkCommand::EndPickEvent) { // DD(VisibleInWindow); @@ -363,8 +362,12 @@ void vvSlicerManagerCommand::Execute(vtkObject *caller, zWorld = z; break; } + this->SM->GetSlicer(VisibleInWindow)->SetCurrentPosition(xWorld,yWorld,zWorld, - this->SM->GetSlicer(VisibleInWindow)->GetTSlice()); + this->SM->GetSlicer(VisibleInWindow)->GetTSlice()); + // We propagate the mouse position + this->SM->EmitMousePositionUpdated(VisibleInWindow); + if (newLandmark) { this->SM->AddLandmark(xWorld,yWorld,zWorld, this->SM->GetSlicer(VisibleInWindow)->GetTSlice()); @@ -405,8 +408,8 @@ void vvSlicerManagerCommand::Execute(vtkObject *caller, this->SM->SetColorWindow(window*dx); this->SM->SetColorLevel(level-dy); this->SM->SetPreset(6); - this->SM->UpdateWindowLevel(); this->SM->Render(); + this->SM->UpdateWindowLevel(); return; } }