[Paraview-developers] Adding a Writer plugin to Catalyst in situ

Louka Jacques--Chevallier louka.jacques--chevallier at pi.esisar.grenoble-inp.fr
Wed Feb 28 09:44:41 EST 2018


Well, everything is working (or wip), but it's quite hard to understand at first, the user guide is clean, but to me, it lacks examples and details. 
I would like to share the project, but I can't as I'm currently a student working for a company (internship-like) to fullfill my engineering degree. The project is confidential. (We are three working on the PV-Catalyst part, so debugging goes quite fast)
I still can give you few informations : 
We are writing a PV Custom app and using it with Catalyst. 
The writer is used to send data asynchronously (new thread) on the network (for supervision protocols). And... It works (Yay !), no dead end on this side. 
Best, 
Louka


----- Mail original -----
De: "Andy Bauer" <andy.bauer at kitware.com>
À: PI22-2018 at pi.esisar.grenoble-inp.fr
Cc: "paraview-developers" <paraview-developers at public.kitware.com>
Envoyé: Mercredi 28 Février 2018 13:39:17
Objet: Re: [Paraview-developers] Adding a Writer plugin to Catalyst in situ

Is everything working for you now with the plugin writer and Catalyst?

Just curious -- would it be possible to share what you're trying to do with
Catalyst? We like to publicize Catalyst success stories as well as keep
track of the different use cases. Also, what's the format that you're
writing data out in? That may be something that we could add in to ParaView
itself which would save the trouble of dealing with a plugin.

Best,
Andy

On Wed, Feb 28, 2018 at 7:32 AM, Louka Jacques--Chevallier <
louka.jacques--chevallier at pi.esisar.grenoble-inp.fr> wrote:

> Hi,
> Thank you, this part was already done the right way, the problem occured
> while importing the pipeling.py in catalyst.
> But in the meantime, I realized that it was a missing attribute and a typo
> that were sort of hiding each other...
> Thank you for the fast answer though !
> Regards,
>
>
> ----- Mail original -----
> De: "Andy Bauer" <andy.bauer at kitware.com>
> À: PI22-2018 at pi.esisar.grenoble-inp.fr
> Cc: "paraview-developers" <paraview-developers at public.kitware.com>
> Envoyé: Mardi 27 Février 2018 16:48:53
> Objet: Re: [Paraview-developers] Adding a Writer plugin to Catalyst in situ
>
> Hi,
>
> The key thing is that in the GUI you don't actually create a writer for the
> Catalyst pipeline, you need to create a stub for the writer that gets
> filled in when you run Catalyst. For example, looking in utilities.xml for
> the XMLPImageDataWriter stub:
> =================
>     <SourceProxy name="XMLPImageDataWriter" class="vtkPVNullSource"
>       label="Parallel Image Data Writer">
>       <InputProperty name="Input">
>           <ProxyGroupDomain name="groups">
>             <Group name="sources" />
>             <Group name="filters" />
>           </ProxyGroupDomain>
>           <DataTypeDomain name="input_type" composite_data_supported="0">
>             <DataType value="vtkImageData" />
>           </DataTypeDomain>
>           <Documentation>
>             The input.
>           </Documentation>
>       </InputProperty>
>
>       <StringVectorProperty name="FileName"
>         number_of_elements="1"
>         default_values="filename_%t.pvti">
>      </StringVectorProperty>
>
>       <IntVectorProperty name="WriteFrequency"
>         number_of_elements="1"
>         default_values="1">
>         <IntRangeDomain name="range" min="1" />
>       </IntVectorProperty>
>
>       <IntVectorProperty name="PaddingAmount"
>         number_of_elements="1"
>         default_values="0">
>         <IntRangeDomain name="range" min="0" />
>       </IntVectorProperty>
>
>      <Hints>
>       <!-- TODO: this doesn't work yet -->
>       <PipelineIcon name=":pqComponents/pqSave32.png" />
>
>       <!-- This will help us when exporting the script state -->
>       <WriterProxy group="writers" name="XMLPImageDataWriter" />
>      </Hints>
>      <!-- End of XMLPImageDataWriter -->
>     </SourceProxy>
> ==================
>
> Note that this is in the insitu_writers_parameters group in that file. Some
> subtleties for this, if I remember correctly, are:
>
>    - The SourceProxy name attribute may need to be the name of your actual
>    writer (here it's XMLPImageDataWriter) though I don't think so
>    - You probably want to include FileName, WriteFrequency and
>    PaddingAmount properties here.
>    - In the Hints section the WriterProxy should have the name attribute
>    set to the actual writer from your plugin.
>
> If that doesn't seem to work, I'd suggest looking at coprocessing.py's
> RegisterWriter(), WriterParamtersProxy() and WriteData() methods.
>
> Best,
>
> Andy
>
>
>
> On Tue, Feb 27, 2018 at 10:11 AM, Louka Jacques--Chevallier <
> louka.jacques--chevallier at pi.esisar.grenoble-inp.fr> wrote:
>
> > Hello,
> > I'm trying to implement a custom asynchronous writer as a plugin for
> > paraview / Catalyst in situ.
> >
> > What actually works :
> > -The writer works when it's invoked as pure c++
> > -The xml that describes the writer seems OK as it shows the right
> > extensions when using the "save data" feature in PV (after being imported
> > of course)
> > -I already added a plugin filter (not writer) to paraview and it works
> > like a charm, so it's about the writer properties in particular
> > -I'm able to display it as an entry in the in situ Writers menu (using
> the
> > proxy group : in situ_writer_parameters)
> > -Exporting a pipeline (in python) using this writer works well, it's
> shown
> > with the right parameters
> >
> > What doesn't work :
> > -When importing the (previously exported) pipeline.py, it seems that the
> > writer is not found (meanwhile the filter is)
> >
> > What has been tried :
> > -Using the LoadPlugin("mylib.so") in python
> > -Recompiling unsuccessfully catalyst with the new files for the writer
> > -Looking for plugins used the same way with in situ, but found nothing...
> >
> > I don't really know if it is even possible, or if it has been done
> before,
> > any idea / suggestion will be appreciated ! ^.^
> > Regards,
> > Louka
> > _______________________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at http://www.kitware.com/
> > opensource/opensource.html
> >
> > Search the list archives at: http://markmail.org/search/?q=
> > Paraview-developers
> >
> > Follow this link to subscribe/unsubscribe:
> > https://public.kitware.com/mailman/listinfo/paraview-developers
> >
>


More information about the Paraview-developers mailing list