[Paraview-developers] Creation of a ParaView Python table reader plugin

FOUCAULT Hadrien (AREVA) hadrien.foucault at areva.com
Fri Jun 16 11:47:07 EDT 2017


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20170616/79e18a96/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CSVNumpyReader.xml
Type: text/xml
Size: 1761 bytes
Desc: CSVNumpyReader.xml
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20170616/79e18a96/attachment-0002.xml>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fort.11
Type: application/octet-stream
Size: 93970 bytes
Desc: fort.11
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20170616/79e18a96/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fort_read.py
Type: application/octet-stream
Size: 2872 bytes
Desc: fort_read.py
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20170616/79e18a96/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Fort11Reader.xml
Type: text/xml
Size: 3056 bytes
Desc: Fort11Reader.xml
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20170616/79e18a96/attachment-0003.xml>


More information about the Paraview-developers mailing list