X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvSlicerManager.cxx;h=244a7f6f715db856512d1fe3ce1552ef6aa72b29;hb=f1cebc71809c5218578a58486f829980eeb29ab3;hp=9ff163eb1990e519bb1a2668b80cc5c54b0539ef;hpb=f6b191a882fde37f9db483825a48da6586dafc52;p=clitk.git diff --git a/vv/vvSlicerManager.cxx b/vv/vvSlicerManager.cxx index 9ff163e..244a7f6 100644 --- a/vv/vvSlicerManager.cxx +++ b/vv/vvSlicerManager.cxx @@ -418,6 +418,23 @@ void vvSlicerManager::LeftButtonReleaseEvent(int slicer) } //---------------------------------------------------------------------------- + +//---------------------------------------------------------------------------- +void vvSlicerManager::EmitMousePositionUpdated(int slicer) +{ + emit MousePositionUpdatedSignal(slicer); +} +//---------------------------------------------------------------------------- + + +//---------------------------------------------------------------------------- +void vvSlicerManager::EmitKeyPressed(std::string KeyPress) +{ + emit KeyPressedSignal(KeyPress); +} +//---------------------------------------------------------------------------- + + //---------------------------------------------------------------------------- void vvSlicerManager::SetSliceOrientation(int slicer, int orientation) { @@ -642,18 +659,18 @@ void vvSlicerManager::UpdateViews(int current,int slicer) } switch (mSlicers[i]->GetSliceOrientation()) { case vtkImageViewer2::SLICE_ORIENTATION_XY: - if (mSlicers[i]->GetSlice() != (int)floor(z)) - mSlicers[i]->SetSlice((int)floor(z)); + if (mSlicers[i]->GetSlice() != (int)lrint(z)) + mSlicers[i]->SetSlice((int)lrint(z)); break; case vtkImageViewer2::SLICE_ORIENTATION_XZ: - if (mSlicers[i]->GetSlice() != (int)floor(y)) - mSlicers[i]->SetSlice((int)floor(y)); + if (mSlicers[i]->GetSlice() != (int)lrint(y)) + mSlicers[i]->SetSlice((int)lrint(y)); break; case vtkImageViewer2::SLICE_ORIENTATION_YZ: - if (mSlicers[i]->GetSlice() != (int)floor(x)) - mSlicers[i]->SetSlice((int)floor(x)); + if (mSlicers[i]->GetSlice() != (int)lrint(x)) + mSlicers[i]->SetSlice((int)lrint(x)); break; } @@ -737,7 +754,7 @@ void vvSlicerManager::UpdateLinkedNavigation(vvSlicer *refSlicer, bool bPropagat //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- -double vvSlicerManager::GetColorWindow() +double vvSlicerManager::GetColorWindow() const { if (mSlicers.size()) return mSlicers[0]->GetColorWindow(); @@ -747,7 +764,7 @@ double vvSlicerManager::GetColorWindow() //---------------------------------------------------------------------------- -double vvSlicerManager::GetColorLevel() +double vvSlicerManager::GetColorLevel() const { if (mSlicers.size()) return mSlicers[0]->GetColorLevel();