[Paraview] use of global variables

Sven Buijssen sven.buijssen at tu-dortmund.de
Sun Oct 9 03:11:10 EDT 2011


Felipe,

The Calculator filter has no support for field data currently, see e.g.
http://www.paraview.org/Bug/view.php?id=5626. Neither it is the only
filter that does not pass field data, see e.g.
http://www.paraview.org/Bug/view.php?id=10787.

For operations involving field data, like plotting field data over time
or some trivial calculations, I resort to the Programmable Filter.

Here's an example pipeline that first adds a source, then adds some
vector point data to operate on and a single scalar value as field data
to eventually scale an input (point data) data array (stored in the
first non-multi-block leaf of a multi-block dataset) by (the first
component of) the first tuple of a given name data array stored as field
data and add the result as a new data array.

    Sources - Wavelet - Apply
    Filters - Programmable Filter -
        Script: see add.scalarValue.as.fieldData.py - Apply
    Filters - Random Vectors - Apply
    Filters - Programmable Filter -
        Script: see scale.pointData.by.fieldDataValue.py - Apply

It should get you started. Changing the script to work on cell data or
with a different input data array/field data tuple is straightforward.

Sven



Felipe Bordeu wrote, On 07.10.2011 19:15:
> Hello everybody,
> 
> I have a custom reader, and I generate cells and points data correctly.
> Now I am trying to put global data (like material propeties) in a
> vtkFieldData using
> 
> ouput->SetFieldData(my_vtkfielddata);
> 
> This work properly and I can see the information in the information tab
> (variable Y).
> 
> 
> But the problem is I am unable to access this information in paraview, I
> cant use the variable in the calculator, and if apply the calculator
> filter the global fields are not passed to the output.
> 
> How can I access this kind of information in the calculator??
> 
> I am using the 3.12.0-RC2 from git in linux, and a custom reader in c++.
> 
> 
> -- 
> 
> Felipe Bordeu Weldt
> Ingénieur de Recherche
> -------------------------------------
> Tél. : 33 (0)2 40 37 16 57
> Fax. : 33 (0)2 40 74 74 06
> Felipe.Bordeu at ec-nantes.fr
> Institut GeM - UMR CNRS 6183
> École Centrale Nantes
> 1 Rue de La Noë, 44321 Nantes, FRANCE
> -------------------------------------
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: add.scalarValue.as.fieldData.py
URL: <http://www.paraview.org/pipermail/paraview/attachments/20111009/cbcbfdc4/attachment.asc>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: scale.pointData.by.fieldDataValue.py
URL: <http://www.paraview.org/pipermail/paraview/attachments/20111009/cbcbfdc4/attachment.txt>


More information about the ParaView mailing list