Vedo: Inconsistent behaviour of fullscreen and offscreen options for Plotter

Created on 11 Nov 2020  路  6Comments  路  Source: marcomusy/vedo

Hi Marco,

I'm trying to get a Plotter to have size='full' and render with offscreen=True, but the behaviour seems to be a bit inconsistent.

Some minimal code examples to reproduce:

  1. if I specify the size when I create the plotter, then the offscreen parameter is ignored:
from vedo import Plotter

plt = Plotter(
            axes=4,
            size="full",
        )

plt.show(offscreen=True)
  1. if I specify the size when I call show, then the size parameter is ignored:
from vedo import Plotter

plt = Plotter(
            axes=4,

        )

plt.show(offscreen=True, size="full",)
  1. if I specify both when I crate the plotter then the plotter window closes instantly as if I used interactive=False (perhaps this is the intended behaviour?)
from vedo import Plotter

plt = Plotter(
            axes=4,
            offscreen=True, 
            size="full"
        )

plt.show()

Option 3 works for what I need (avoid rendering on screen during video creation), but I just thought I'd report this.

bug enhancement

All 6 comments

Hey Marco,

After I've changed brainrender to use option 3 above, I'm getting this error

ERROR: In /Users/prabhu/src/git/VTKPythonPackage/standalone-build/VTK-source/Interaction/Widgets/vtkOrientationMarkerWidget.cxx, line 129
vtkOrientationMarkerWidget (0x7f9a5cf16c70): The interactor must be set prior to enabling/disabling widget

[1]    77156 segmentation fault  /Users/federicoclaudi/miniconda3/envs/dev/bin/python 

when trying to add an inset with:

self.plotter.showInset(inset, pos=(0.95, 0.1), draggable=False)

If I don't pass offscreen to Plotter then the inset creates fine.

Hi Federico - sorry for the late reply, I've checked this, in fact is is not possible to have an "inset" renderer in offscreen mode as it needs an interactor object that is not going to be created in that case.
I only added a line to return None if that combination happens.

  1. offscreen keyword should be used in Plotter initiation not in show (it's a _limitation_ i'm afraid..)
  2. fixed in the next release
  3. that is indeed an intended behavior.

Hi Marco thanks for getting back to me.

Thanks for the clarification, that makes a lot of sense.

Just pushed what should become v2020.4.2. Have a look if you wish before I upload it to pip.
The requirement for vtk<9 has now been dropped.

PS: I see you have an extra space in https://github.com/brainglobe/brainrender/blob/32dd43db00fe96ba4949c3c97ecd9682ef3f05c9/setup.py#L11
I wonder if that may cause troubles on some OS

thanks for the heads up!
Will check it out (and remove the space ;)

everything seems to be working fine here!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kemo993 picture kemo993  路  6Comments

jrdkr picture jrdkr  路  7Comments

m-albert picture m-albert  路  7Comments

bhaveshshrimali picture bhaveshshrimali  路  6Comments

Jesse0818 picture Jesse0818  路  4Comments