X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvMainWindow.cxx;h=a44aadfb956311329c5b79e17d5c0076526efe73;hb=876ae811f8e0fbdf06746779754a71d18c73c112;hp=8ca48660a78c786dc680f8cb430d068a54d8056b;hpb=8410a88a08678a4b2e026b5bc2c61adaef763c05;p=clitk.git diff --git a/vv/vvMainWindow.cxx b/vv/vvMainWindow.cxx index 8ca4866..a44aadf 100644 --- a/vv/vvMainWindow.cxx +++ b/vv/vvMainWindow.cxx @@ -324,6 +324,7 @@ vvMainWindow::vvMainWindow():vvMainWindowBase() connect(overlayPanel,SIGNAL(FusionPropertyUpdated(int,int,int,double,double, bool)), this,SLOT(SetFusionProperty(int,int,int,double,double, bool))); connect(landmarksPanel,SIGNAL(UpdateRenderWindows()),this,SLOT(UpdateRenderWindows())); + connect(landmarksPanel,SIGNAL(SelectedPointChanged()),this,SLOT(GoToLandmark())); playMode = 0;//pause mFrameRate = 10; @@ -2990,6 +2991,23 @@ void vvMainWindow::GoToCursor() } //------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ +void vvMainWindow::GoToLandmark() +{ + int index = GetSlicerIndexFromItem(DataTree->selectedItems()[0]); + for (int column = 1; column < 5; column++) { + if (DataTree->selectedItems()[0]->data(column,Qt::CheckStateRole).toInt() > 1) { + double* cursorPos = landmarksPanel->GetSelectedPoint(); + mSlicerManagers[index]->GetSlicer(column-1)->SetCurrentPosition( + cursorPos[0],cursorPos[1],cursorPos[2],cursorPos[3]); + mSlicerManagers[index]->UpdateViews(1,column-1); + mSlicerManagers[index]->UpdateLinked(column-1); + break; + } + } +} +//------------------------------------------------------------------------------ + //------------------------------------------------------------------------------ void vvMainWindow::PlayPause() {