]> Creatis software - clitk.git/commitdiff
Modify Nearest Neighbor interpolation
authortbaudier <thomas.baudier@creatis.insa-lyon.fr>
Tue, 6 Dec 2016 15:10:26 +0000 (16:10 +0100)
committertbaudier <thomas.baudier@creatis.insa-lyon.fr>
Tue, 6 Dec 2016 15:10:26 +0000 (16:10 +0100)
vv/vvSlicer.cxx
vv/vvSlicer.h
vv/vvSlicerManager.cxx

index 4c5fcfb44f6fbc08f336ea85a83f904d26f69327..06a59512a1ee5e4ecd81f24bfaa375bc8a5a4e09 100644 (file)
@@ -57,6 +57,7 @@
 #include <vtkLight.h>
 #include <vtkLightCollection.h>
 #include <vtkScalarBarActor.h>
+#include <vtkImageProperty.h>
 #include <vtkLookupTable.h>
 
 #include <vtkRenderer.h>
@@ -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)
 { 
index 30a0d7a3ae45e875d762532eeecc5e88ad772d17..23c19599958dcf66a5f67cfc8d8286c8ee38ba2f 100644 (file)
@@ -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);
index 12928afa2d82ca079a02fa4c1d5bbf9e2eaaab42..b3e2890f9d6d531df58fcfafa947945293d69722 100644 (file)
@@ -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);