]> Creatis software - clitk.git/commitdiff
VTK compatibility
authorRomulo Pinho <romulo.pinho@lyon.unicancer.fr>
Fri, 29 Jun 2012 08:58:49 +0000 (10:58 +0200)
committerRomulo Pinho <romulo.pinho@lyon.unicancer.fr>
Fri, 29 Jun 2012 08:58:49 +0000 (10:58 +0200)
- BlendImageActor issue with legacy VTK versions

vv/vvBlendImageActor.cxx
vv/vvBlendImageActor.h

index 466083ae010278c55cf6c905577396d9bdb9def9..2093c7d7e0721c21330520c976261269f7b0651b 100644 (file)
@@ -47,7 +47,7 @@ void vvBlendImageActor::Render(vtkRenderer *ren)
   }
 
   //Call normal render
-  vtkImageActor::Render(ren);
+  VTK_IMAGE_ACTOR::Render(ren);
 
   //Move back blending to weighted sum
   if (vtkgl::BlendEquationEXT!=0) {
index 0abe616de6c4560719d1754012dc6fdf708756a5..bb2e0667bc25618a7cd222e2288363f62b1d95a1 100644 (file)
 
 #include <vtkActor.h>
 #include <vtkSmartPointer.h>
+
+#if VTK_MAJOR_VERSION >= 5 && VTK_MINOR_VERSION >= 10
+#define VTK_IMAGE_ACTOR vtkImageActor
 #include <vtkImageActor.h>
+#else
+#define VTK_IMAGE_ACTOR vtkOpenGLImageActor
+#include <vtkOpenGLImageActor.h>
+#endif
 
-class vvBlendImageActor : public vtkImageActor
+class vvBlendImageActor : public VTK_IMAGE_ACTOR
 {
 public:
   static vvBlendImageActor *New();
-  vtkTypeMacro(vvBlendImageActor, vtkImageActor);
+  vtkTypeMacro(vvBlendImageActor, VTK_IMAGE_ACTOR);
   virtual void PrintSelf(ostream& os, vtkIndent indent);
 
   // Description: