[Paraview] Writer plugin with selection of data arrays to output

Sergey Alexandrov alexandrov88 at gmail.com
Mon Jan 30 05:00:00 EST 2017


Hi,

I am trying to implement a sink algorithm (writer) to output point clouds
in my custom format. The points may have multiple data
arrays, and the writer should provide the user with an option to select
which of these arrays are to be output.

Unfortunately, I am not able to find any wiki pages or articles that
explain how to implement such a writer. Also, I do not find any
existing writers with this functionality. The most similar things I found
are:

1) AMR base particles reader
<http://www.vtk.org/doc/nightly/html/classvtkAMRBaseParticlesReader.html>.
It provides a facility to select which data arrays are to be read from a
file. Basically, when the user
sets the filename, the reader loads the meta-information about available
arrays from the file, and then these are displayed in
ParaView properties panel. The user can tick the arrays he wants and press
"Apply" to read. I can not figure out how to apply this
in my writer, because the only extension point for writers is the
WriteData() function. It is called after the user has pressed the
"Save" button, which is too late. In fact, I want to "inject" some code
between the moment the user chose the output filename (and
hence the writer to use), and the moment a dialog window with the
properties of the writer is shown.

2) Wiki page on writing readers
<http://www.paraview.org/Wiki/ParaView/Plugin_HowTo#Drop_down_list_with_values_from_input_arrays>.
There is an example how make a drop-down list to select which input array
to process. Perhaps
I could add this to the writer, however it does seem to support only a
single array choice, whereas I need multiple.

I would be very grateful for suggestions on how to implement the
functionality I need. Examples of existing readers would be
great. Or if there is definitely no "official" clean way to implement this,
please also let me know.

Cheers,
Sergey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20170130/1d9b8341/attachment.html>


More information about the ParaView mailing list