From 229b5c47165370a8f34ddae0861874c4a28a2463 Mon Sep 17 00:00:00 2001 From: tbaudier Date: Tue, 6 Dec 2016 16:10:26 +0100 Subject: [PATCH] Modify Nearest Neighbor interpolation --- vv/vvSlicer.cxx | 8 ++++++++ vv/vvSlicer.h | 1 + vv/vvSlicerManager.cxx | 1 + 3 files changed, 10 insertions(+) diff --git a/vv/vvSlicer.cxx b/vv/vvSlicer.cxx index 4c5fcfb..06a5951 100644 --- a/vv/vvSlicer.cxx +++ b/vv/vvSlicer.cxx @@ -57,6 +57,7 @@ #include #include #include +#include #include #include @@ -322,6 +323,13 @@ double* vvSlicer::GetCurrentPosition() } //------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ +void vvSlicer::SetInterpolationImageReslice(int interpolation) +{ + mImageReslice->SetInterpolationMode(interpolation); +} +//------------------------------------------------------------------------------ + //------------------------------------------------------------------------------ void vvSlicer::SetCurrentPosition(double x, double y, double z, int t) { diff --git a/vv/vvSlicer.h b/vv/vvSlicer.h index 30a0d7a..23c1959 100644 --- a/vv/vvSlicer.h +++ b/vv/vvSlicer.h @@ -181,6 +181,7 @@ public: void AddContour(vvMesh::Pointer contours,bool propagate); ///Toggle temporal superposition of contours void ToggleContourSuperposition(); + void SetInterpolationImageReslice(int interpolation); virtual void SetColorWindow(double s); virtual void SetColorLevel(double s); diff --git a/vv/vvSlicerManager.cxx b/vv/vvSlicerManager.cxx index 12928af..b3e2890 100644 --- a/vv/vvSlicerManager.cxx +++ b/vv/vvSlicerManager.cxx @@ -583,6 +583,7 @@ void vvSlicerManager::ToggleInterpolation() { bool interpolate=!(mSlicers[0]->GetImageActor()->GetInterpolate()); for ( unsigned int i = 0; i < mSlicers.size(); i++) { + mSlicers[i]->SetInterpolationImageReslice(interpolate); mSlicers[i]->GetImageActor()->SetInterpolate(interpolate); if (mSlicers[i]->GetOverlayActor()) mSlicers[i]->GetOverlayActor()->SetInterpolate(interpolate); -- 2.47.1