X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvSlicerManager.cxx;h=b175c46ccc642665487641e20c102b2e8c8e5d37;hb=c7a6bc15ce7ef75426e8f1db97453635fa430370;hp=9ff163eb1990e519bb1a2668b80cc5c54b0539ef;hpb=f6b191a882fde37f9db483825a48da6586dafc52;p=clitk.git diff --git a/vv/vvSlicerManager.cxx b/vv/vvSlicerManager.cxx index 9ff163e..b175c46 100644 --- a/vv/vvSlicerManager.cxx +++ b/vv/vvSlicerManager.cxx @@ -23,7 +23,6 @@ #include "vvInteractorStyleNavigator.h" #include "vvLandmarks.h" #include "vvMesh.h" -#include "vvImageMapToWLColors.h" #include "vvBlendImageActor.h" #include @@ -418,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) { @@ -642,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; } @@ -737,7 +753,7 @@ void vvSlicerManager::UpdateLinkedNavigation(vvSlicer *refSlicer, bool bPropagat //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- -double vvSlicerManager::GetColorWindow() +double vvSlicerManager::GetColorWindow() const { if (mSlicers.size()) return mSlicers[0]->GetColorWindow(); @@ -747,7 +763,7 @@ double vvSlicerManager::GetColorWindow() //---------------------------------------------------------------------------- -double vvSlicerManager::GetColorLevel() +double vvSlicerManager::GetColorLevel() const { if (mSlicers.size()) return mSlicers[0]->GetColorLevel(); @@ -1305,15 +1321,11 @@ void vvSlicerManager::SetColorMap(int colormap) invLUT->SetSaturationRange(1,1); invLUT->SetHueRange(double((mOverlayColor+180)%360)/360,double((mOverlayColor+180)%360)/360); invLUT->Build(); - dynamic_cast(mSlicers[i]->GetWindowLevel()) - ->SetWindowLevelMode(true); mSlicers[i]->GetWindowLevel()->SetLookupTable(supLUT); mSlicers[i]->GetOverlayMapper()->SetLookupTable(invLUT); invLUT->Delete(); supLUT->Delete(); } else if (mSlicers[i]->GetOverlay()) { - //dynamic_cast(mSlicers[i]->GetWindowLevel()) - //->SetWindowLevelMode(false); mSlicers[i]->GetWindowLevel()->SetLookupTable(LUT); } else { mSlicers[i]->GetWindowLevel()->SetLookupTable(LUT);