Beispiel #1
0
 def FillOutputPortInformation(self, port, info):
     from vtkmodules.vtkCommonDataModel import vtkDataObject
     if port == 0:
         info.Set(vtkDataObject.DATA_TYPE_NAME(), "vtkPartitionedDataSet")
     else:
         info.Set(vtkDataObject.DATA_TYPE_NAME(),
                  "vtkPartitionedDataSetCollection")
     return 1
Beispiel #2
0
 def FillOutputPortInformation(self, port, info):
     self._outputType = None
     self._topology = self._topologies[port]
     self._coords = self._node["topologies/" + self._topology + "/coordset"]
     topologyType = self._node["topologies/" + self._topology + "/type"]
     if topologyType == "uniform":
         self._outputType = vtkConstants.VTK_IMAGE_DATA
         self._extension = "vti"
         outputTypeName = "vtkImageData"
     elif topologyType == "rectilinear":
         self._outputType = vtkConstants.VTK_RECTILINEAR_GRID
         self._extension = "vtr"
         outputTypeName = "vtkRectilinearGrid"
     elif topologyType == "structured":
         self._outputType = vtkConstants.VTK_STRUCTURED_GRID
         self._extension = "vts"
         outputTypeName = "vtkStructuredGrid"
     elif topologyType == "unstructured":
         self._outputType = vtkConstants.VTK_UNSTRUCTURED_GRID
         self._extension = "vtu"
         outputTypeName = "vtkUnstructuredGrid"
     else:
         print("Error: invalid topology type {}".format(topologyType))
         return 0
     info.Set(vtkDataObject.DATA_TYPE_NAME(), outputTypeName)
     return 1
Beispiel #3
0
 def FillOutputPortInformation(self, vtkself, port, info):
     """Sets the default output type to OutputType."""
     info.Set(vtkDataObject.DATA_TYPE_NAME(), self.OutputType)
     return 1