From: Romulo Pinho Date: Fri, 29 Jun 2012 08:58:49 +0000 (+0200) Subject: VTK compatibility X-Git-Tag: v1.3.0~29 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=a6ea44eedda768b674fbd77f6aa10b121c122ebd;p=clitk.git VTK compatibility - BlendImageActor issue with legacy VTK versions --- diff --git a/vv/vvBlendImageActor.cxx b/vv/vvBlendImageActor.cxx index 466083a..2093c7d 100644 --- a/vv/vvBlendImageActor.cxx +++ b/vv/vvBlendImageActor.cxx @@ -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) { diff --git a/vv/vvBlendImageActor.h b/vv/vvBlendImageActor.h index 0abe616..bb2e066 100644 --- a/vv/vvBlendImageActor.h +++ b/vv/vvBlendImageActor.h @@ -21,13 +21,20 @@ #include #include + +#if VTK_MAJOR_VERSION >= 5 && VTK_MINOR_VERSION >= 10 +#define VTK_IMAGE_ACTOR vtkImageActor #include +#else +#define VTK_IMAGE_ACTOR vtkOpenGLImageActor +#include +#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: