<div dir="ltr">Hi Cory,<div><br></div><div>Thanks for the answer and the workaround, will go this way.</div><div><br></div><div>Cheers,</div><div>Sergey</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 30, 2017 at 4:18 PM, Cory Quammen <span dir="ltr"><<a href="mailto:cory.quammen@kitware.com" target="_blank">cory.quammen@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Sergey,<br>
<br>
I'm not aware of another writer that has the behavior you describe of<br>
saving out specified data arrays. As a result, there isn't any<br>
existing code to select the data arrays to be saved. There are a<br>
number of readers that do support which arrays to load, but it's not<br>
really possible to reuse that infrastructure without some additional<br>
ParaView development work to support selecting arrays to be written.<br>
<br>
A workaround would be to use a Pass Data Arrays filter to select the<br>
data arrays, then save the Pass Data Arrays output to your custom<br>
writer.<br>
<br>
Hope that helps,<br>
Cory<br>
<div><div class="h5"><br>
On Mon, Jan 30, 2017 at 5:00 AM, Sergey Alexandrov<br>
<<a href="mailto:alexandrov88@gmail.com">alexandrov88@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> I am trying to implement a sink algorithm (writer) to output point clouds in<br>
> my custom format. The points may have multiple data<br>
> arrays, and the writer should provide the user with an option to select<br>
> which of these arrays are to be output.<br>
><br>
> Unfortunately, I am not able to find any wiki pages or articles that explain<br>
> how to implement such a writer. Also, I do not find any<br>
> existing writers with this functionality. The most similar things I found<br>
> are:<br>
><br>
> 1) AMR base particles reader. It provides a facility to select which data<br>
> arrays are to be read from a file. Basically, when the user<br>
> sets the filename, the reader loads the meta-information about available<br>
> arrays from the file, and then these are displayed in<br>
> ParaView properties panel. The user can tick the arrays he wants and press<br>
> "Apply" to read. I can not figure out how to apply this<br>
> in my writer, because the only extension point for writers is the<br>
> WriteData() function. It is called after the user has pressed the<br>
> "Save" button, which is too late. In fact, I want to "inject" some code<br>
> between the moment the user chose the output filename (and<br>
> hence the writer to use), and the moment a dialog window with the properties<br>
> of the writer is shown.<br>
><br>
> 2) Wiki page on writing readers. There is an example how make a drop-down<br>
> list to select which input array to process. Perhaps<br>
> I could add this to the writer, however it does seem to support only a<br>
> single array choice, whereas I need multiple.<br>
><br>
> I would be very grateful for suggestions on how to implement the<br>
> functionality I need. Examples of existing readers would be<br>
> great. Or if there is definitely no "official" clean way to implement this,<br>
> please also let me know.<br>
><br>
> Cheers,<br>
> Sergey<br>
><br>
</div></div>> ______________________________<wbr>_________________<br>
> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the ParaView Wiki at:<br>
> <a href="http://paraview.org/Wiki/ParaView" rel="noreferrer" target="_blank">http://paraview.org/Wiki/<wbr>ParaView</a><br>
><br>
> Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>ParaView</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://public.kitware.com/mailman/listinfo/paraview" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/paraview</a><br>
><br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
--<br>
Cory Quammen<br>
Staff R&D Engineer<br>
Kitware, Inc.<br>
</font></span></blockquote></div><br></div>