In doing so, it seems that the reader must have a "SetFileName" function.<br>How do you handle this with python ? Or can you avoid this ? <br><br>I do not think the integration of a python script in the GUI can be as perfect as that of a reader writen in c++. <br>
<br><div class="gmail_quote">2010/10/19 Paul Edwards <span dir="ltr"><<a href="mailto:paul.m.edwards@gmail.com">paul.m.edwards@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
You will need a separate xml file for the GUI plugin to tell paraview about the new format. Look at pqReader.xml in <br>"Examples/Plugins/Reader".<br><br>Regards,<br><font color="#888888">Paul</font><div><div>
</div>
<div class="h5"><br><br><br><div class="gmail_quote">On 19 October 2010 14:26, Brockmann Patrick <span dir="ltr"><<a href="mailto:Patrick.Brockmann@cea.fr" target="_blank">Patrick.Brockmann@cea.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Paul Edwards a écrit :<div><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Patrick,<br>
<br>
Have you tried adding a StringVectorProperty to your XML for a filename (with <FileListDomain name="files"/>) and having a GUI XML file for adding a reader? I think someone suggested you look at the helix source xml (<a href="http://paraview.org/gitweb?p=ParaView.git;a=blob;f=Examples/Plugins/HelixSource/helix.xml;h=d6c385561d9cdffc5298ced17d700bae8bc167b6;hb=HEAD" target="_blank">http://paraview.org/gitweb?p=ParaView.git;a=blob;f=Examples/Plugins/HelixSource/helix.xml;h=d6c385561d9cdffc5298ced17d700bae8bc167b6;hb=HEAD</a>) and you can see how to add the GUI XML file in the other reader example (<a href="http://paraview.org/gitweb?p=ParaView.git;a=tree;f=Examples/Plugins/Reader;hb=HEAD" target="_blank">http://paraview.org/gitweb?p=ParaView.git;a=tree;f=Examples/Plugins/Reader;hb=HEAD</a>)<br>
<br>
</blockquote></div>
Hi Paul,<br>
<br>
Thanks to share your experience on this topic.<br>
As I wrote to another paraview user,<br>
my python code is a small 200 lines using netCDF4, numpy<br>
and its conversion is not as straightforward as it could be because I use<br>
many numpy functions.<br>
Of course, I can do it but the python approach is more attrative.<br>
<br>
I have tried to add<br>
<StringVectorProperty<br>
name="FileName"<br>
animateable="0"<br>
command="SetFileName"<br>
number_of_elements="1"><br>
<FileListDomain name="files"/><br>
</StringVectorProperty><br>
<br>
to the helix.xml example but<br>
when I load it nothing appears in the source menu.<br>
<br>
What I would like is a Python Reader example.<br>
If someone has this to share, I am very interested.<br>
<br>
Patrick<br>
<br>
-- <br>
LSCE/IPSL, Laboratoire CEA-CNRS-UVSQ<br>
Data Analysis and Visualization Engineer<br>
IPSL Global Climate Modelling Group<br><font color="#888888">
--<br>
<br>
</font></blockquote></div><br>
</div></div><br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br>