X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvSlicerManagerCommand.cxx;h=0415c9e8934fe6b98fe6848b37e8ef01445c2776;hb=fe61abeb6e452e5f54bef60a287aa104e4e02d70;hp=37d78e6a066090bdecfdeefbde1c08d9cf16346c;hpb=866e2bab7292139df3dd93205a8ae3cef9a23857;p=clitk.git diff --git a/vv/vvSlicerManagerCommand.cxx b/vv/vvSlicerManagerCommand.cxx index 37d78e6..0415c9e 100644 --- a/vv/vvSlicerManagerCommand.cxx +++ b/vv/vvSlicerManagerCommand.cxx @@ -108,13 +108,13 @@ void vvSlicerManagerCommand::Execute(vtkObject *caller, if (KeyPress == "f" || KeyPress == "F") { FlyToPosition(isi->GetInteractor(),this->SM->GetSlicer(VisibleInWindow)); - return; + return; + } + if (KeyPress == "w") + { + this->SM->SetLocalColorWindowing(VisibleInWindow); + return; } - if (KeyPress == "z") - { - this->SM->SetLocalColorWindowing(VisibleInWindow); - return; - } if (KeyPress == "0") { this->SM->SetPreset(0); @@ -190,13 +190,13 @@ void vvSlicerManagerCommand::Execute(vtkObject *caller, this->SM->UpdateWindowLevel(); return; } - if (KeyPress == "u") + if (KeyPress == "c") { this->SM->ToggleContourSuperposition(); this->SM->Render(); return; } - if (KeyPress == "i") + if (KeyPress == "l") { this->SM->ToggleInterpolation(); this->SM->Render(); @@ -208,7 +208,7 @@ void vvSlicerManagerCommand::Execute(vtkObject *caller, this->SM->Render(); return; } - if (KeyPress == "l") + if (KeyPress == "u") { this->SM->Reload(); this->SM->Render(); @@ -262,21 +262,21 @@ void vvSlicerManagerCommand::Execute(vtkObject *caller, if (KeyPress == "Right") this->SM->SetNextTSlice(VisibleInWindow); - if (KeyPress == "F1") + if (KeyPress == "F2") { this->SM->GetSlicer(VisibleInWindow)->GetAnnotation()->SetText(2,"Sagital\n"); this->SM->GetSlicer(VisibleInWindow)->SetSliceOrientation(0); this->SM->UpdateSliceRange(VisibleInWindow); this->SM->UpdateInfoOnCursorPosition(VisibleInWindow); } - if (KeyPress == "F2") + if (KeyPress == "F3") { this->SM->GetSlicer(VisibleInWindow)->GetAnnotation()->SetText(2,"Coronal\n"); this->SM->GetSlicer(VisibleInWindow)->SetSliceOrientation(1); this->SM->UpdateSliceRange(VisibleInWindow); this->SM->UpdateInfoOnCursorPosition(VisibleInWindow); } - if (KeyPress == "F3") + if (KeyPress == "F4") { this->SM->GetSlicer(VisibleInWindow)->GetAnnotation()->SetText(2,"Axial\n"); this->SM->GetSlicer(VisibleInWindow)->SetSliceOrientation(2); @@ -294,6 +294,15 @@ void vvSlicerManagerCommand::Execute(vtkObject *caller, return; } + //DD(event); + // Mouse release HERE + if (event == vtkCommand::EndPickEvent) { + // DD(VisibleInWindow); + if (VisibleInWindow > -1) + this->SM->LeftButtonReleaseEvent(VisibleInWindow); + return; // no return !!!! ??? + } + if (event == vtkCommand::StartWindowLevelEvent) { mStartSlicer = -1; @@ -508,7 +517,10 @@ void vvSlicerManagerCommand::Dolly(double factor, vtkRenderWindowInteractor *int renderer->ResetCameraClippingRange(); //interactor->Render(); } +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ void vvSlicerManagerCommand::FlyToPosition(vtkRenderWindowInteractor *interactor,vvSlicer* slicer) { double flyFrom[3], flyTo[3]; @@ -577,3 +589,4 @@ void vvSlicerManagerCommand::FlyToPosition(vtkRenderWindowInteractor *interactor } } } +//------------------------------------------------------------------------------