[Paraview] How to add extra informations associated to a vtkPolyData ?

David E DeMarle dave.demarle at kitware.com
Tue Dec 7 09:40:05 EST 2010


I would put it in FieldData instead of the Information vectors.

The information vectors are best used internally to the pipeline and are not
terribly easy to work with.

FieldData (as opposed to CellData or PointData) is easy to work with (it's
just an arbitrary collection of arbitrarily named, typed and sized arrays)
and is meant to be the place where arbitrary, whole data set associated,
information is kept.

David E DeMarle
Kitware, Inc.
R&D Engineer
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x109


On Tue, Dec 7, 2010 at 9:35 AM, R M <mlokida at yahoo.fr> wrote:

> Hi,
>
> Like the title says, I would like to add extra informations associated to a
> vtkPolyData (or vtkMultiBlockDataSet). I would like to add a simulationType
> (in the information associated to the vtkpolydata) that is a type of
> simulation (we have several ones) and a vtk filter will select the good
> process depending of the simulationType of the input.
>
> For example, in a RequestData I do:
>
> int myclass::RequestData( vtkInformation *vtkNotUsed(request),
>                                     vtkInformationVector
> **vtkNotUsed(inputVector),
>                                     vtkInformationVector *outputVector)
> {
>     ...
>     vtkInformation* outInfo = outputVector->GetInformationObject(0);
>     if( ! outInfo->Has(vtkDataObject::DATA_EXTENT_TYPE()))
>     {
>         vtkInformationIntegerKey* DATA_EXTENT_TYPE =
> vtkDataObject::DATA_EXTENT_TYPE();
>         outInfo->Set(DATA_EXTENT_TYPE, simulationType); // simulationType
> is a type of simulation and we have many type of simulation that will be
> used a filter to select the good process
>      }
>      if( outInfo->Has(vtkDataObject::DATA_EXTENT_TYPE()))
>      {
>          vtkOutputWindow::GetInstance()->DisplayText("---");
>        }
>     ...
> }
>
> But, I am not sure that DATA_EXTENT_TYPE is the good one. There are
> severals like (DATA_TYPE_NAME, FIELD_NAME,...). So which one should I use to
> add extra informations associated to a vtkPolyData?
>
> Thank you.
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20101207/e4132417/attachment.htm>


More information about the ParaView mailing list