]> Creatis software - creaMaracasVisu.git/commitdiff
#3109 creaMaracasVisu Bug New Normal - branch vtk7itk4 compilation with vtk7
authorEduardo DAVILA <davila@localhost.localdomain>
Thu, 3 Aug 2017 15:14:33 +0000 (17:14 +0200)
committerEduardo DAVILA <davila@localhost.localdomain>
Thu, 3 Aug 2017 15:14:33 +0000 (17:14 +0200)
lib/Kernel/VTKObjects/SurfaceRenderer/surfacerenderingimagestencilexport.cxx
lib/Kernel/VTKObjects/SurfaceRenderer/surfacerenderingimagestencilexport.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkClosePolyData.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
+
index 5548f5263fbbc7e75530e0c1a0cf1fbad28d0d06..249c000f4c6000c0075338b99cd2c12704ef9adc 100644 (file)
@@ -32,7 +32,7 @@
 #if VTK_MAJOR_VERSION <= 5
   #include <vtkDataSetToImageFilter.h>
 #else
-  #include "vtkPolyDataAlgorithm.h"
+  #include "vtkImageAlgorithm.h"
   #include "vtkDataObject.h"
   #include "vtkInformation.h"
   #include "vtkDemandDrivenPipeline.h"
 #if VTK_MAJOR_VERSION <= 5
 class SurfaceRenderingImageStencilExport : public vtkDataSetToImageFilter
 #else
-class SurfaceRenderingImageStencilExport : public vtkPolyDataAlgorithm
+class SurfaceRenderingImageStencilExport : public vtkImageAlgorithm
 #endif
 {
 public:
     static SurfaceRenderingImageStencilExport *New();
 
-    vtkTypeMacro(SurfaceRenderingImageStencilExport,vtkPolyDataAlgorithm)
-
 #if VTK_MAJOR_VERSION <= 5
+    vtkTypeMacro(SurfaceRenderingImageStencilExport,vtkDataSetToImageFilter)
     virtual void Update();
+    virtual vtkImageData* GetOutputData();
 #else
-       // ..
+    vtkTypeMacro(SurfaceRenderingImageStencilExport,vtkImageAlgorithm)
 #endif
 
 
-    virtual vtkImageData* GetOutputData();
 protected:
 
 //EED 2017-01-01 Migration VTK7
index bb2446879b5eb843d376177c9025c20f0508eefb..3ef680a78b55906f4f360abb179e7be922bbb78e 100644 (file)
@@ -126,23 +126,6 @@ vtkClosePolyData::~vtkClosePolyData()
        }
 
 #else
-/*
-       int vtkClosePolyData::ProcessRequest(   vtkInformation *request, 
-                                                                                       vtkInformationVector **inputVector, 
-                                                                                       vtkInformationVector *outputVector)
-       {
-printf("EED Warning ERROR ! vtkClosePolyData::ProcessRequest  not implemented  VTK7 migration");
-               // generate the data
-               if(request->Has(vtkDemandDrivenPipeline::REQUEST_INFORMATION()))
-               {
-                       // specify that the output (only one for this filter) will be double
-                       vtkInformation* outInfo = outputVector->GetInformationObject(0);
-                       outInfo->Set(vtkDataObject::SCALAR_TYPE(),VTK_DOUBLE);
-                       return 1;
-               }
-               return this->Superclass::ProcessRequest(request,inputVector,outputVector);
-       }
-*/
 
 int vtkClosePolyData::RequestData(  vtkInformation *vtkNotUsed(request),  vtkInformationVector **inputVector,  vtkInformationVector *outputVector)
 {