]> Creatis software - clitk.git/blobdiff - vv/vvSlicer.cxx
Debug RTStruct conversion with empty struc
[clitk.git] / vv / vvSlicer.cxx
index 7405a450bb67f3e35f23aedfbd39abba34cfa8cf..2089d41caa3d564e5e076b0e3f94df4710d56fb5 100644 (file)
@@ -24,6 +24,7 @@
 #include "vvSlicerManagerCommand.h"
 #include "vvGlyphSource.h"
 #include "vvGlyph2D.h"
+#include "vvUtils.h"
 
 #include <vtkVersion.h>
 #include <vtkExtentTranslator.h>
@@ -134,7 +135,7 @@ vvSlicer::vvSlicer()
 
   pdmA = vtkSmartPointer<vtkActor2D>::New();
   pdmA->SetMapper(pdm);
-  pdmA->GetProperty()->SetColor(255,10,212);
+  pdmA->GetProperty()->SetColor(1,0,0);
   pdmA->SetVisibility(0);
   pdmA->SetPickable(0);
 
@@ -268,7 +269,7 @@ void vvSlicer::ToggleContourSuperposition()
 
 
 //------------------------------------------------------------------------------
-void vvSlicer::SetCursorColor(int r,int g, int b)
+void vvSlicer::SetCursorColor(double r, double g, double b)
 { 
   pdmA->GetProperty()->SetColor(r,g,b);
 }
@@ -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);
     }
 
@@ -983,7 +988,7 @@ void vvSlicer::SetSliceOrientation(int orientation)
     copyExtent(ext, extent);
 #endif
 
-  if (extent[5]-extent[4] <= 2)
+  if (extent[5]-extent[4] < 1)
     orientation = vtkImageViewer2::SLICE_ORIENTATION_XY;
 
   if (orientation < vtkImageViewer2::SLICE_ORIENTATION_YZ ||