X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvSlicerManager.cxx;h=b175c46ccc642665487641e20c102b2e8c8e5d37;hb=c7a6bc15ce7ef75426e8f1db97453635fa430370;hp=015409b2debdf12cc501dd6b0226eddabf77e6a8;hpb=f8f487135ec75a4a88e1d325cad6375313b59a29;p=clitk.git diff --git a/vv/vvSlicerManager.cxx b/vv/vvSlicerManager.cxx index 015409b..b175c46 100644 --- a/vv/vvSlicerManager.cxx +++ b/vv/vvSlicerManager.cxx @@ -417,6 +417,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) { @@ -641,18 +658,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; }