Creation of a ParaView Python table reader plugin

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Creation of a ParaView Python table reader plugin

FOUCAULT Hadrien (AREVA)

Hi all,

 

I am trying to create a ParaView reader for fort.11 data, a text format used in-house, I’ve attached a sample. The goal is to display those data first as a spreadsheetview and then to pick some of the variables to be plotted and modified with the calculator.

 

I have tried different way to create a reader and I believe the best one is to use Python as described in this thread: http://markmail.org/message/2pnrmzkbx5n2u3ke

So far I have successfully written a vtk script to load my data in a vtkTable and plot some of the variable. The script can be called from the python shell and open a new vtk window showing an test plot.

 

In order to make the reader script into a plugin I have reused the RingleReader example from the mailing-list and adapted it a little for my needs. When I open a fort.11 file and apply nothing seems to be really happening and no error displayed if I leave “output=self.GetUnstructuredGridOutput()” (which is wrong) but if I only call “self.GetOutput()” an indentation error and missing request data error is thrown.

 

To identify the issue I tried to make another simple csv reader based on https://www.paraview.org/Wiki/Python_calculator_and_programmable_filter#Programmable_Source and still the ringle reader and the result is the same, no data loaded and no error. If I change the output I find the same indentation and missing request data error.

 

When using the vtk reader script in the python shell I am able to access my vtkTable with all the data loaded into it but I don’t know how to put this data into a spreadsheetview wich is kind of infuriating.

 

Does anyone have successfully made a ParaView Python Reader Plugin with a vtkTable output? I must be missing something when I output my data to ParaView since I don’t really understand how the data are sent to views for vtkTable. I am using ParaView 5.0.1.

 

Any suggestions gratefully accepted,

 

Hadrien Foucault Intern at Areva NP

 


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=Paraview-developers

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

CSVNumpyReader.xml (2K) Download Attachment
fort.11 (125K) Download Attachment
fort_read.py (3K) Download Attachment
Fort11Reader.xml (4K) Download Attachment
Loading...