Hi,
I finally came to a solution for this problem, some changes are needed
in VTK and in Paraview,
http://paraview.org/Bug/view.php?id=5626
http://paraview.org/Bug/view.php?id=12778
It look correct to me, the only problem is that we cant treat point/cell
data fields and field data with the same names. (I don't know how to
solve this)
Also not all the filters propagate the field data, for example
CleanToGrid and D3 (see http://paraview.org/Bug/view.php?id=10787, and
http://paraview.org/Bug/view.php?id=12777)
note: I also did some modification for the python calculator, but the
code in not very clean.
Felipe
On 12/10/2011 11:00, Felipe Bordeu wrote:
Sven,
Thank very much for the info. With your filters an the changes to my
home made paraview, I'm able to do what I want.
I put some changer in the bugs report.
changes to use fielddata in the pythoncalculator.
http://www.paraview.org/Bug/view.php?id=5626.
change to pass the fieldata
http://www.paraview.org/Bug/view.php?id=10787.
Felipe
On 09/10/2011 09:11, Sven Buijssen wrote:
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
[email protected]
Institut GeM - UMR CNRS 6183
École Centrale Nantes
1 Rue de La Noë, 44321 Nantes, FRANCE
-------------------------------------
--
Felipe Bordeu Weldt
Ingénieur de Recherche
-------------------------------------
Tél. : 33 (0)2 40 37 16 57
Fax. : 33 (0)2 40 74 74 06
[email protected]
Institut GeM - UMR CNRS 6183
École Centrale Nantes
1 Rue de La Noë, 44321 Nantes, FRANCE
-------------------------------------
_______________________________________________
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