Rendering on Windows, black screen on Ubuntu.


I’m new to VTK so i apologize if this question is already answered somewhere (however i didn’t find answer online that would work for my case.) I hope this is the right forum for such a question because here we are talking about integration in pyqt5. Anyway…

So i’m building medical 3D image viewer and i want to do ray casting inside PYQT5. There are solutions online how to do that so i started with simple solution using only VTK and ray casting and it worked perfectly. However, when i used ray casting inside PYQT widget the screen was just black. Worrying that something is wrong with my code, i used publicly available code:

and got same results. I tried same program on windows platform and it worked perfectly, however on linux the screen is black:

Meaning same code works on windows, however fails on ubuntu machine. Specifications of both computers:
Intel(R) Core™ i7-8700K CPU @ 3.70GHz
Nvidia RTX2080Ti

VTK version: vtk 9.0.3
PYQT version: PyQt5 5.15.4
Python version: 3.6.9

I hope i added enough information about my problem that someone can answer me how to resolve this.

Best regards,
Žiga Bizjak

I’ve test your code in Ubuntu 20.04 + Python3.8 + Anaconda3 + Spyder3 and it works fine.