]> Creatis software - clitk.git/commitdiff
Open image, overlay, fusion taking into account the interpolation settings
authortbaudier <thomas.baudier@creatis.insa-lyon.fr>
Wed, 19 Dec 2018 14:54:09 +0000 (15:54 +0100)
committertbaudier <thomas.baudier@creatis.insa-lyon.fr>
Wed, 19 Dec 2018 14:54:09 +0000 (15:54 +0100)
It reads in vv_settings.txt the status of the interpolation

vv/vvSlicer.cxx

index 7405a450bb67f3e35f23aedfbd39abba34cfa8cf..550e8a034ac4395c59de133f3bc0185d44a22474 100644 (file)
@@ -24,6 +24,7 @@
 #include "vvSlicerManagerCommand.h"
 #include "vvGlyphSource.h"
 #include "vvGlyph2D.h"
+#include "vvUtils.h"
 
 #include <vtkVersion.h>
 #include <vtkExtentTranslator.h>
@@ -352,6 +353,8 @@ void vvSlicer::SetImage(vvImage::Pointer image)
     if (!mImageReslice) {
       mImageReslice = vtkSmartPointer<vtkImageReslice>::New();
       mImageReslice->SetInterpolationModeToLinear();
+      SetInterpolationImageReslice(getInterpolationFavoriteStatus());
+      GetImageActor()->SetInterpolate(getInterpolationFavoriteStatus());
       mImageReslice->AutoCropOutputOn();
       mImageReslice->SetBackgroundColor(-1000,-1000,-1000,1);
     }
@@ -455,6 +458,7 @@ void vvSlicer::SetOverlay(vvImage::Pointer overlay)
 #if VTK_MAJOR_VERSION >= 6 || (VTK_MAJOR_VERSION >= 5 && VTK_MINOR_VERSION >= 10)
       mOverlayActor->GetMapper()->BorderOn();
 #endif
+      mOverlayActor->SetInterpolate(getInterpolationFavoriteStatus());
       }
 
     //stupid but necessary : the Overlay need to be rendered before fusion
@@ -530,6 +534,7 @@ void vvSlicer::SetFusion(vvImage::Pointer fusion, int fusionSequenceCode)
       mFusionActor->GetMapper()->BorderOn();
 #endif
 
+      mFusionActor->SetInterpolate(getInterpolationFavoriteStatus());
       this->GetRenderer()->AddActor(mFusionActor);
     }