]> Creatis software - creaMaracasVisu.git/blobdiff - lib/Kernel/VTKObjects/SurfaceRenderer/surfacerenderingimagestencilexport.cxx
#3109 creaMaracasVisu Bug New Normal - branch vtk7itk4 compilation with vtk7
[creaMaracasVisu.git] / lib / Kernel / VTKObjects / SurfaceRenderer / surfacerenderingimagestencilexport.cxx
index 00424743978b101a25e85048f1b480c785268a42..a8a27e14400cfedd03b44b58c3fd9781d623cf4f 100644 (file)
@@ -153,12 +153,16 @@ int SurfaceRenderingImageStencilExport::RequestData(  vtkInformation *vtkNotUsed
     stencil->SetBackgroundValue(128);
     stencil->Update();
 
-    if(ImageOutput)
-       {
-        ImageOutput->Delete();
-    }
-    ImageOutput = vtkImageData::New();
-    ImageOutput->DeepCopy(stencil->GetOutput());
+//    if(ImageOutput)
+//     {
+//       ImageOutput->Delete();
+//    }
+//    ImageOutput = vtkImageData::New();
+//    ImageOutput->DeepCopy(stencil->GetOutput());
+
+       output->ShallowCopy( stencil->GetOutput() );
+       stencil->Delete();
+
 
        return 1;
 }
@@ -173,7 +177,13 @@ int SurfaceRenderingImageStencilExport::RequestData(  vtkInformation *vtkNotUsed
 
 //-------------------------------------------------------------------------------------------
 
-vtkImageData* SurfaceRenderingImageStencilExport::GetOutputData()
-{
-    return ImageOutput;
-}
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ vtkImageData* SurfaceRenderingImageStencilExport::GetOutputData()
+  {
+     return ImageOutput;
+  }
+#else
+  // ..
+#endif
+