From: Simon Rit Date: Thu, 6 Mar 2014 15:56:45 +0000 (+0100) Subject: Fixed displayed slice number. Now 0-based and accurate... X-Git-Tag: v1.4.0~127 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=5c8aaa9c6b7df300289416c60e1a0b7909c1dab1;p=clitk.git Fixed displayed slice number. Now 0-based and accurate... --- diff --git a/vv/vvMainWindow.cxx b/vv/vvMainWindow.cxx index d2c732f..af39d3e 100644 --- a/vv/vvMainWindow.cxx +++ b/vv/vvMainWindow.cxx @@ -1473,6 +1473,7 @@ void vvMainWindow::InitSlicers() mSlicerManagers.back()->SetSlicerWindow(1,NEViewWidget->GetRenderWindow()); mSlicerManagers.back()->SetSlicerWindow(2,SOViewWidget->GetRenderWindow()); mSlicerManagers.back()->SetSlicerWindow(3,SEViewWidget->GetRenderWindow()); + mSlicerManagers.back()->Render(); // SR: displayed #slice is wrong without this } } diff --git a/vv/vvSlicer.cxx b/vv/vvSlicer.cxx index cd65e2f..dd58563 100644 --- a/vv/vvSlicer.cxx +++ b/vv/vvSlicer.cxx @@ -1170,7 +1170,6 @@ void vvSlicer::SetRenderWindow(int orientation, vtkRenderWindow * rw) this->SetupInteractor(rw->GetInteractor()); ca->SetImageActor(this->GetImageActor()); ca->SetWindowLevel(this->GetWindowLevel()); - ca->SetText(2, ""); ca->SetText(3, "\n"); double bounds[6]; @@ -1448,6 +1447,10 @@ void vvSlicer::Render() << std::endl; } ca->SetText(1,worldPos.str().c_str()); + + std::stringstream slicePos; + slicePos << "Slice: " << this->GetSlice(); + ca->SetText(2, slicePos.str().c_str()); } if (pdmA->GetVisibility()) {