[Paraview-developers] Lifecycle / Workflow of a Plugin

Joachim Pouderoux joachim.pouderoux at kitware.com
Tue Dec 27 11:01:49 EST 2016


Hi Matthias,

First mail to answer to the point 1.
When choosing a file to open, ParaView browses the available readers than
can process the extension of the provided file.
So during a first pass, those readers (here there is a single one I guess)
are instantiated temporarily and the function CanReadFile() is called with
the filepath.
Then, from all those readers ParaView checks the one that answered
positively (or the one choosen by the user if more than one reader
can process the file) and create a new temporary instance of it to call
CanReadFile() again.
Then a new instance is created again to perform the loading (RequestInfo
and eventually RequestData).

*"But additionally the RequestData routine of the first file (instanceA) is
> called again. Why?"*

I seen two possibilities here:
 - There might be a problem in your reader, if RequestData is called again
it might be because Modified() has been called on it or its input changed.
Check that there is no strange stuff like that in your reader.
 - I have seen such a behaviour recently with unstructured data: the
pipeline first executes the filter 'normally' (without ghost cells request)
but then, for rendering matters, the geometry filter internally connected
to the reader/filter requires one level of ghost cells. This updates the
pipeline request and eventually call RequestData again.
So check the pipeline requests (information keys) in RequestData to
understand what is happening here.

Best,
Joachim


*Joachim Pouderoux*, PhD

*Technical Expert - Scientific Computing Team*
*Kitware SAS <http://www.kitware.fr>*


2016-12-21 2:56 GMT-04:00 Matthias Sonntag <sonntag at iag.uni-stuttgart.de>:

> Hello,
>
> we are developing a Paraview-Plugin to read state files written by our CFD
> flow solver (https://www.flexi-project.org/). We managed to get it
> somehow running, but the internal logic of ParaView how the plugin is
> accessed, created and deleted is not totally clear to us.
> We observed the following (a commented logfile is listed below):
>
> 1. When opening a file with our plugin, ParaView first creates two
> instances of the plugin and directly destroys them, without calling the
> RequestInformation or RequestData routines. Why?
> 2. The third instance (lets call it instanceA) of the plugin finally
> executes the RequestInformation routine (but 2 times!) and the file becomes
> visible in the pipeline browser.
> 3. When pressing 'Apply' the RequestInformation is executed again. Why?
> And then RequestData routine is called once and everything works as
> expected and the data is visualized.
> 4. Loading a second file leads to the following behaviour:
> Steps 1. and 2. are the same for the second file. But additionally the
> RequestData routine of the first file (instanceA) is called again. Why?
> 5. Pressing 'Apply' for the second file shows the same behavior as in step
> 3. for the first file.
>
> Basically it works, but we get an additional RequestData call of the
> already visualized first file, when loading a second file. In our case this
> is quite expensive and we would like to avoid it.
>
> LogFile for the above example:
> * Loading first file
>    visu3DReader  0x431c2e0
>    ~visu3DReader 0x431c2e0
>    visu3DReader  0x431c2e0
>    ~visu3DReader 0x431c2e0
>    visu3DReader  0x431c2e0
>    RequestInformation 0x431c2e0
>    RequestInformation 0x431c2e0
> * Pressing Apply
>    RequestInformation 0x431c2e0
>    RequestData0x431c2e0
> * Loading second file
>    visu3DReader  0x736f950
>    ~visu3DReader 0x736f950
>    visu3DReader  0x74662f0
>    ~visu3DReader 0x74662f0
>    visu3DReader  0x74662f0
>    RequestInformation 0x74662f0
>    RequestInformation 0x74662f0
>    RequestData 0x431c2e0    <<<<<< Why called again for first file?
> * Pressing Apply
>    RequestInformation 0x74662f0
>    RequestData 0x74662f0
>
> Can anyone explain/reproduce this behavior? Is there any source of
> information how the internal logic of requesting information / data works?
> Does anyone know the respective parts in the paraview source code?
>
> Regards,
> Matthias Sonntag
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensou
> rce/opensource.html
>
> Search the list archives at: http://markmail.org/search/?q=
> Paraview-developers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview-developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20161227/a79e384a/attachment.html>


More information about the Paraview-developers mailing list