Comments (18)
It should not be a requirement, but technically, there is no point in showing the window on the server. When using an offscreen flavor like egl/osmesa, this is implicit and therefore automatic. On a graphic/desktop environment, that is another story, and it should be up to the user/dev to decide if they want to call such a function. In your case, it seems that the window manager mess things up somewhere in the process so forcing an offscreen window is required.
I think the best way forward would be to document that, but I'm not sure how to best describe and capture the reader attention. Any suggestion or PR on doc update is welcome...
Thanks for tracking that down.
from trame.
Thanks for the detailed issue. But I've just tested the code on a fresh venv and it is working fine on my mac.
I do see the memory grow and shrink as expected.
Can you provide the versions of your various packages (pip list
)?
My setup was
Package Version
------------------- -----------
aiohttp 3.9.3
aiosignal 1.3.1
async-timeout 4.0.3
attrs 23.2.0
contourpy 1.2.0
cycler 0.12.1
fonttools 4.49.0
frozenlist 1.4.1
idna 3.6
importlib_resources 6.1.3
kiwisolver 1.4.5
matplotlib 3.8.3
more-itertools 10.2.0
multidict 6.0.5
numpy 1.26.4
packaging 24.0
pillow 10.2.0
pip 24.0
pyparsing 3.1.2
python-dateutil 2.9.0.post0
setuptools 65.4.1
six 1.16.0
trame 3.5.2
trame-client 2.16.2
trame-server 2.17.2
trame-vtk 2.8.5
trame-vuetify 2.4.2
vtk 9.3.0
wslink 1.12.4
yarl 1.9.4
zipp 3.17.0
from trame.
Maybe something cuda or linux specific?
python 3.11
Package Version
--------------- -----------
aiohttp 3.9.3
aiosignal 1.3.1
attrs 23.2.0
build 1.1.1
click 8.1.7
contourpy 1.2.0
cycler 0.12.1
distro 1.9.0
fonttools 4.49.0
frozenlist 1.4.1
idna 3.6
kiwisolver 1.4.5
matplotlib 3.8.3
more-itertools 10.2.0
multidict 6.0.5
numpy 1.26.4
packaging 23.2
pillow 10.2.0
pip 24.0
pip-tools 7.4.1
pyparsing 3.1.2
pyproject_hooks 1.0.0
python-dateutil 2.9.0.post0
scikit-build 0.17.6
setuptools 65.5.0
six 1.16.0
trame 3.5.2
trame-client 2.16.2
trame-server 2.17.2
trame-vtk 2.8.5
trame-vuetify 2.4.2
vtk 9.3.0
wheel 0.42.0
wslink 1.12.4
yarl 1.9.4
from trame.
Any suggestion to try to debug it would be welcome. I have no idea where to start going deeper. Maybe something wslink related?
from trame.
When you download ParaView, does it render and work as expected?
What do you get in the about dialog?
from trame.
Also can you also try with Python 3.9 or 3.10?
from trame.
Also can you also try with Python 3.9 or 3.10?
These are with python 3.11, but I tried with python3.9, and same behavior.
I tried with both (via conda)
from trame.
Found it...
If I use gnome, instead of i3, as window manager, it works...
i3 doesn't show the name of the windows. How is the transfer of the render window to the webpage done?
from trame.
VTK grabs the pixels of its render window before sending them. And I was suspecting that step was failing and sending garbage over the wire...
from trame.
Should I open an issue in VTK proper then?
I would like to keep using i3 as windows manager.
from trame.
Yes, please, especially since it seems to be related to that window manager. Unless you want to try to use vtk-egl
, which may solve that window manager issue.
Just make sure you remove any vtk previously installed in your venv. (pip install --extra-index-url https://wheels.vtk.org vtk-egl
)
from trame.
vtk-egl works indeed.
Could you aid me with the title for the VTK issue? What vtk class manages the "transfer"? I am not sure how to describe the problem in VTK terms.
from trame.
So the main issue is the window creation. Does the problem show up with ParaView as well?
Ideally, you want to find an example that highlights such an issue. One simple VTK Python example (assuming it fails) might be enough.
from trame.
I have no problem creating vtk windows. The problem seems when transferring the content of the render window into the webpage.
With vtkRemoteView nothing is displayed in the webpage, but the window is created and displays fine in its own window.
from trame.
Can you try that python example and see if it fails producing the image on disk?
https://examples.vtk.org/site/Python/Utilities/Screenshot/
from trame.
Can you try that python example and see if it fails producing the image on disk?
Tried, and it works fine. Render window is displayed and written to file.
from trame.
Sorry to keep asking you to try things out, but I'm wondering if you call renderWindow.SetOffScreenRendering(1)
, that fix the trame remote view issue.
from trame.
That fixes it as well.
Was that a requirement for using VtkRemoteView?
from trame.
Related Issues (20)
- ctrl.view_reset_camera seems not working HOT 10
- Event not triggered with vue3 HOT 2
- some bugs in 32_i18n.py HOT 2
- some bug in 32_i18n_vue3.py HOT 1
- hot reload for UI, controller and state change won't work HOT 2
- How to implement custom frontend and remote view? HOT 4
- Flushing layout content does not work if the template name has an underscore HOT 1
- vscode remote support on NERSC? HOT 9
- remoteview on windows 11 cant work correctly HOT 4
- Documentation of file_upload HOT 3
- vtkCompositePolyDataMapper can't work in VtkLocalView HOT 2
- Slicing function with trame HOT 1
- How to deploy the trame application on the server HOT 9
- Surprising results using routers HOT 1
- docs: missing video in landing page HOT 1
- Get Just the File Path for File Upload HOT 9
- Menu example with vuetify is not working HOT 1
- Core dumped on examples VTK Simple cone Remote Rendering HOT 4
- Jupyter Lab: Compatibility with Sidecar HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from trame.