X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvSlicerManager.cxx;h=b175c46ccc642665487641e20c102b2e8c8e5d37;hb=fbd1f3ace65ab9540cb4e0b2d4af83b60232479e;hp=9331bf1ab78a859dcfaf96c4b092c8f4ce3f7454;hpb=b7c0103ffcb88cd6dc1458fec00fc2d7077e48ea;p=clitk.git diff --git a/vv/vvSlicerManager.cxx b/vv/vvSlicerManager.cxx index 9331bf1..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; } @@ -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);