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

Sergey Alexandrov alexandrov88 at gmail.com
Mon Jan 30 13:08:39 EST 2017


Hi Cory,

Thanks for the answer and the workaround, will go this way.

Cheers,
Sergey


On Mon, Jan 30, 2017 at 4:18 PM, Cory Quammen <cory.quammen at kitware.com>
wrote:

> Hi Sergey,
>
> I'm not aware of another writer that has the behavior you describe of
> saving out specified data arrays. As a result, there isn't any
> existing code to select the data arrays to be saved. There are a
> number of readers that do support which arrays to load, but it's not
> really possible to reuse that infrastructure without some additional
> ParaView development work to support selecting arrays to be written.
>
> A workaround would be to use a Pass Data Arrays filter to select the
> data arrays, then save the Pass Data Arrays output to your custom
> writer.
>
> Hope that helps,
> Cory
>
> On Mon, Jan 30, 2017 at 5:00 AM, Sergey Alexandrov
> <alexandrov88 at gmail.com> wrote:
> > 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. 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. 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
> >
> > _______________________________________________
> > 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
> >
>
>
>
> --
> Cory Quammen
> Staff R&D Engineer
> Kitware, Inc.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20170130/65f252f2/attachment.html>


More information about the ParaView mailing list