[Paraview] [EXTERNAL] Help with Programmable Filters

Scott, W Alan wascott at sandia.gov
Wed Apr 20 19:45:47 EDT 2016


Ping?

-----Original Message-----
From: ParaView [mailto:paraview-bounces at paraview.org] On Behalf Of Scott, W Alan
Sent: Friday, April 15, 2016 3:18 PM
To: paraview at paraview.org
Subject: [EXTERNAL] [Paraview] Help with Programmable Filters

>From a user:



Hi
I'm trying to get started with programmable filters and am having a little trouble putting it together from the material in the paraview user guide. I have a few questions below:

1.       Is there any documentation generally describing the input and output data objects that form the programmable filter API?

a.       I was able to get some basic info on these objects by executing "print dir(inputs[0])" for example in the program. filter window, but if there is documentation somewhere for each of the object types, that would be useful...

2.       It appears that the user guide suggested methods for accessing the data in the input objects (input.Points, input.PointData['Name'], etc) produce vtk data objects of some form. These can be indexed similar to numpy arrays, but seem to behave differently in other cases. For instance, I couldn't figure how to reshape these arrays (numpy.reshape fails as the vtk array objects don't have any shape attribute defined...). Is there any way to get the input data into actual numpy array form? This would be helpful for direct reuse of existing scripts designed to work on numpy arrays...

3.       I was attempting to write a simple script that does some calcs on a block structured input dataset (input comes in as vtkCompositeDataSet) and writes out some reduced data to a table (I chose vtkTable as the output format). Through inspection of the output object, I found that I could add new rows (which appear in paraview as columns...) of data using output.RowData.append(DATA,NAME). However, DATA needs to be some basic python sequence type or numpy array, and the vtk array types created by the input data access methods (input.Points etc...) don't work... So again here, if there is a good way to convert the data held in the vtk array types to numpy array types, that would be useful here...

Thanks,
Jon




Thanks,

Alan
_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


More information about the ParaView mailing list