]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
Make the SimpleMode work with input unstructured grid V8_5_0a1
authorAnthony Geay <anthony.geay@edf.fr>
Tue, 13 Feb 2018 06:31:42 +0000 (07:31 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Tue, 13 Feb 2018 06:31:42 +0000 (07:31 +0100)
src/Plugins/SimpleMode/IO/vtkSimpleMode.cxx
src/Plugins/SimpleMode/IO/vtkSimpleMode.h

index 0affd5c177b3c2a3d9a538a82c906afdbf5c7d73..7942578b8293374c46e207773e74223086a054bc 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "vtkStreamingDemandDrivenPipeline.h"
 #include "vtkUnstructuredGrid.h"
-#include "vtkPolyData.h"
+#include "vtkDataSet.h"
 #include  "vtkMultiBlockDataSet.h"
 
 #include "vtkInformationStringKey.h"
@@ -298,7 +298,7 @@ void vtkSimpleMode::SetInputArrayToProcess(int idx, int port, int connection, in
 {
   if(idx==0)
     this->Internal->setFieldForReal(name);
-  vtkPolyDataAlgorithm::SetInputArrayToProcess(idx,port,connection,ff,name);
+  vtkDataSetAlgorithm::SetInputArrayToProcess(idx,port,connection,ff,name);
 }
 
 double GetOptimalRatioFrom(vtkUnstructuredGrid *dataset, vtkDoubleArray *array)
@@ -334,6 +334,12 @@ double GetOptimalRatioFrom(vtkUnstructuredGrid *dataset, vtkDoubleArray *array)
   return maxGeoDelta/maxDispDelta;
 }
 
+int vtkSimpleMode::FillOutputPortInformation( int vtkNotUsed(port), vtkInformation* info)
+{
+  info->Set(vtkDataObject::DATA_TYPE_NAME(), "vtkPolyData");
+  return 1;
+}
+
 int vtkSimpleMode::RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
 { 
   //std::cerr << "########################################## vtkSimpleMode::RequestInformation ##########################################" << std::endl;
index db110c2bf767e1697ae9317d0bead3dca2d42150..160bb9d06147c457f76644cfdd44abd2fd18855f 100644 (file)
 #ifndef vtkSimpleMode_h__
 #define vtkSimpleMode_h__
 
-#include "vtkPolyDataAlgorithm.h"
+#include "vtkDataSetAlgorithm.h"
 
 class vtkMutableDirectedGraph;
 
-class VTK_EXPORT vtkSimpleMode : public vtkPolyDataAlgorithm
+class VTK_EXPORT vtkSimpleMode : public vtkDataSetAlgorithm
 {
 public:
   static vtkSimpleMode* New();
-  vtkTypeMacro(vtkSimpleMode, vtkPolyDataAlgorithm)
+  vtkTypeMacro(vtkSimpleMode, vtkDataSetAlgorithm)
   void PrintSelf(ostream& os, vtkIndent indent);
   void SetInputArrayToProcess(int idx, int port, int connection, int fieldAssociation, const char *name);
   vtkGetMacro(Factor,double);
@@ -39,7 +39,7 @@ public:
 protected:
   vtkSimpleMode();
   ~vtkSimpleMode();
-
+  int FillOutputPortInformation( int vtkNotUsed(port), vtkInformation* info);
   int RequestInformation(vtkInformation *request,
       vtkInformationVector **inputVector, vtkInformationVector *outputVector);