[Paraview] Composite Datasets

Berk Geveci berk.geveci at gmail.com
Mon Feb 7 09:15:02 EST 2005


Hi John,

Currently, there are a few different ways paraview  handles composite datasets:

1. The reader produces multiple outputs. ParaView creates multiple,
parallel pipelines, one for each output. Each of these pipelines
function as a regular streaming demand driven pipeline. There are few
specialized filters that work on these outputs. One such filter is
extract parts.

2. The reader produces CTH AMR dataset. This is a sub-class of
vtkDataSet and can be processed by any dataset filter as usual. There
are a few specialized filters.

3. The reader produces one of the sub-classes of vtkCompositeDataSet.
Only one pipeline is created and the pipeline handles the iteration.
There are a few specialized filters.

1 and 2 came first and are more stable. I have been working on 3 and
recently added my first implementation to paraview. In time, 3 will
replace 1 and 2 (therefore is the recommended approach). However, it
is still in its infancy and requires more work.

> Question:
> Can I obtain the "parent" dataobject inside my filter. Is this present
> in the information anywhere. Once I have the composite dataset object, I
> can iterate of the children and get the info I need.

Yes you can. The composite data object is stored with the
vtkCompositeDataSet::COMPOSITE_DATA_SET() key and can be accessed as
follows:

  vtkInformation* inInfo = inputVector[0]->GetInformationObject(0);

  vtkCompositeDataSet *hdInput = vtkCompositeDataSet::SafeDownCast(
    inInfo->Get(vtkCompositeDataSet::COMPOSITE_DATA_SET()));
 
> If not : Can I simply create a filter which accepts a composite dataset
> as an input, and use this in the normal manner (but spawning child
> filters in the same way as paraview is doing - any convenient code that
> I can reuse?) : Also if not. Is there any way of adding the parent
> composite dataobject to the information (some special key which states
> that this is a part of X dataset...)

You can do this too.  I am going to write a few simple examples and
let you know.

> also : I notice that the MultiBlock dataset has been removed. Has the
> functionality simply been put into the Heirarchical dataset and one can
> simply assume a flat one level deep dataset contains all the same info.

Correct. Once I made vtkHierarchicalDataSet concrete, there was no
need for vtkMultiBlockDataSet. If, in the future, we want an API
without level, we can subclass from vtkHierarchicalDataSet and force
the number of levels to be 1.


More information about the ParaView mailing list