[Paraview] Python array data into Paraview with simultaneous manipulation by Programmable Filter

Eli Medvescek eli.medvescek at duke.edu
Fri Oct 23 00:46:56 EDT 2015


Hi, 

I am very new to both Paraview and Python, so I apologize if this question is rudimentary (or doesn’t make any sense!). 

Right now I am conducting data analysis in Python for which the output is an array of variable size (depending on a loop variable); the array contains x-coordiantes, y-coordinates, and z-coordinates. I would like to use Paraview/Python scripting in the Python Shell to generate this array, load the data into Paraview, and visualize the data as an unstructured grid. From there, I would like to use the use a Programmable Filter to connect the data points with lines (the method for which I found in another thread.. thank you!) I’d then like to repeat this process several thousand times. In case the above doesn’t make sense, the sequence would be something like:

1. Generate array of size N in Python Shell
2. Load array data into Paraview as x, y, and z coordinates.
3. Display data as Unstructured Grid
4. Use Programmable Filter to connect data points with lines (again, I have found a method for this specific step on another thread)
5. Repeat 1-4 for new arrays, while maintaining visualization of previously-loaded data

Is there a way to conduct this procedure all in one fell swoop in the Python Shell? The main things I am curious about are 1) whether I can load a data from a Python array into Paraview as x, y, and z coordinates and 2) whether there’s a way to control the creation of a Programmable Filter from the Python shell.

Thank you for the help!
Eli


--
Eli Medvescek
Duke University '17 | Biomedical Engineering
520.780.6888
eli.medvescek at duke.edu





More information about the ParaView mailing list