[Paraview] loading multiple state-files without hiding and resetting already loaded objects
Grothausmann, Roman Dr.
grothausmann.roman at mh-hannover.de
Fri Sep 15 08:09:41 EDT 2017
Dear Cory,
Many thanks for your reply pointing out the known limitations and suggestions
for restoring with python. I tried to give that a try:
https://github.com/romangrothausmann/ParaView_scripts/blob/146aa352d1a3ada203bcf91d17e11c169bc99583/pvsm-multi.py#L44-L61
but am stuck at the python error:
TypeError: SetProperties() takes at most 1 argument (2 given)
while the docs suggest to specify 2 args:
https://www.paraview.org/ParaView/Doc/Nightly/www/py-doc/paraview.simple.html?highlight=getproperty#paraview.simple.SetProperties
What am I missing here? Do I have to set each property by itself (i.e. from
GetProperty) or can I just set the whole list of properties from
ListProperties() in one go?
Is the approach for restoring to go through all objects from the last LoadState
the right one?
Many thanks for looking into this.
Roman
On 07/09/17 23:37, Cory Quammen wrote:
> Hi Roman,
>
> It turns out ParaView was not designed for this use case because of
> certain difficulties discussed here:
>
> https://gitlab.kitware.com/paraview/paraview/issues/17442
>
> In your Python script, you could manually cash all the properties of
> the existing representations and restore them after loading the most
> recent state file.
>
> The functions
>
> reprs = GetRepresentations()
> repr = reprs.values()[0]
> props = repr.ListProperties()
> GetProperty(repr, props[0])
>
> would be helpful for this.
>
> Cory
>
>
> On Mon, Sep 4, 2017 at 8:42 AM, Grothausmann, Roman Dr.
> <grothausmann.roman at mh-hannover.de> wrote:
>> Dear mailing list members,
>>
>>
>> It seems that PV (and paraview.simple.LoadState) by default hides already
>> loaded objects (and resets e.g. their coloring) when another state-file is
>> loaded.
>> Is there a way to load multiple state-files after one another without hiding
>> and resetting already existent objects? I.e. a way to concatenate multiple
>> state-files and leave their objects in the state as they got loaded (e.g.
>> colored, hidden/visible)?
>> I do understand that loading a new state-file will reset the camera, but not
>> the rest.
>> Here's my initial attempt to achieve this with pvpython:
>> https://github.com/romangrothausmann/ParaView_scripts/blob/90eb4ca8499070bed941d50b89ebea82fd6a9e23/pvsm-multi.py
>>
>> Any help or hints are very much appreciated
>> Roman
>>
>> --
>> Dr. Roman Grothausmann
>>
>> Tomographie und Digitale Bildverarbeitung
>> Tomography and Digital Image Analysis
>>
>> Medizinische Hochschule Hannover
>> Institut für Funktionelle und Angewandte Anatomie
>> OE 4120, Carl-Neuberg-Str. 1, 30625 Hannover, Deutschland
>>
>> Tel. +49 511 532-2900
>> grothausmann.roman at mh-hannover.de
>> http://www.mh-hannover.de/anatomie.html
>> _______________________________________________
>> 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
>>
>> Search the list archives at: http://markmail.org/search/?q=ParaView
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/paraview
>
>
>
--
Dr. Roman Grothausmann
Tomographie und Digitale Bildverarbeitung
Tomography and Digital Image Analysis
Medizinische Hochschule Hannover
Institut für Funktionelle und Angewandte Anatomie
OE 4120, Carl-Neuberg-Str. 1, 30625 Hannover, Deutschland
Tel. +49 511 532-2900
grothausmann.roman at mh-hannover.de
http://www.mh-hannover.de/anatomie.html
More information about the ParaView
mailing list