[Paraview] Question on Multiple output Custom Readers

Mike Jackson imikejackson at gmail.com
Tue May 20 10:46:10 EDT 2008


I am writing another custom reader for our data and I had a question
about setting the output port information. If I have my reader derive
from PolyDataAlgorithm, and I generally know how many "data sets"
there will be, can those datasets actually be something other than a
vtkPolyData object? For example in our data we have 3 distinct pieces
of data that we want to be able to display. 2 of those are vtkPolyData
objects, but the third is a group of unknown (at compile time) number
of vtkPolyData objects which I was thinking of grouping into a
vtkMultiBlockDataset?

So in the FillOutputPortINformation(int port, vtkInformation* info)
method can I do something like:

if (port == 0 || port ==1)
  info->Set(vtkDataObject::DATA_TYPE_NAME(), "vtkPolyData");
else if (port == 2)
 info->Set(vtkDataObject::DATA_TYPE_NAME(), "vtkMultiBlockDataset");

Is this possible? and if it is, what ramifications would that have on
other parts of the pipeline such as applying filters to only the
port=2 datasets or the port==1 data set?

Thanks for any insight into this.
-- 
Mike Jackson
imikejackson _at_ gee-mail dot com


More information about the ParaView mailing list