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