[Paraview] Python Reader

Aurélien Marsan aur.marsan at gmail.com
Tue Oct 19 10:54:25 EDT 2010


In doing so, it seems that the reader must have a "SetFileName" function.
How do you handle this with python ? Or can you avoid this ?

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++.

2010/10/19 Paul Edwards <paul.m.edwards at gmail.com>

> You will need a separate xml file for the GUI plugin to tell paraview about
> the new format.  Look at pqReader.xml in
> "Examples/Plugins/Reader".
>
> Regards,
> Paul
>
>
>
> On 19 October 2010 14:26, Brockmann Patrick <Patrick.Brockmann at cea.fr>wrote:
>
>> Paul Edwards a écrit :
>>
>>  Hi Patrick,
>>>
>>> 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 (
>>> http://paraview.org/gitweb?p=ParaView.git;a=blob;f=Examples/Plugins/HelixSource/helix.xml;h=d6c385561d9cdffc5298ced17d700bae8bc167b6;hb=HEAD)
>>> and you can see how to add the GUI XML file in the other reader example (
>>> http://paraview.org/gitweb?p=ParaView.git;a=tree;f=Examples/Plugins/Reader;hb=HEAD
>>> )
>>>
>>>  Hi Paul,
>>
>> Thanks to share your experience on this topic.
>> As I wrote to another paraview user,
>> my python code is a small 200 lines using netCDF4, numpy
>> and its conversion is not as straightforward as it could be because I use
>> many numpy functions.
>> Of course, I can do it but the python approach is more attrative.
>>
>> I have tried to add
>>    <StringVectorProperty
>>       name="FileName"
>>       animateable="0"
>>       command="SetFileName"
>>       number_of_elements="1">
>>       <FileListDomain name="files"/>
>>    </StringVectorProperty>
>>
>> to the helix.xml example but
>> when I load it nothing appears in the source menu.
>>
>> What I would like is a Python Reader example.
>> If someone has this to share, I am very interested.
>>
>> Patrick
>>
>> --
>> LSCE/IPSL, Laboratoire CEA-CNRS-UVSQ
>> Data Analysis and Visualization Engineer
>> IPSL Global Climate Modelling Group
>> --
>>
>>
>
> _______________________________________________
> 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20101019/677782c2/attachment.htm>


More information about the ParaView mailing list