# Rendering on Windows, black screen on Ubuntu.

**URL:** https://discourse.vtk.org/t/rendering-on-windows-black-screen-on-ubuntu/6272
**Category:** Support
**Created:** [July 30, 2021, 9:30am UTC](https://discourse.vtk.org/t/rendering-on-windows-black-screen-on-ubuntu/6272 "2021-07-30T09:30:52Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ziga\_Bizjak](https://discourse.vtk.org/user_avatar/discourse.vtk.org/ziga_bizjak/32/3721_2.png) [@ziga\_Bizjak](https://discourse.vtk.org/u/ziga_Bizjak)
#### Post date: [July 30, 2021, 9:30am UTC](https://discourse.vtk.org/t/rendering-on-windows-black-screen-on-ubuntu/6272/1 "2021-07-30T09:30:52Z")

</div>

Hi,

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:

> **[GitHub - pierreamir123/VTK\_pyqt\_3D\_visualisation\_DICOM: pyqt5 GUI application...](https://github.com/pierreamir123/VTK_pyqt_3D_visualisation_DICOM)**
>
> pyqt5 GUI application use VTK tools to visualize DICOM files in 3D modules in two modes Surface Rending and Ray Casting - GitHub - pierreamir123/VTK\_pyqt\_3D\_visualisation\_DICOM: pyqt5 GUI appli...

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

 ![Screenshot from 2021-07-30 11-18-32](https://discourse.vtk.org/uploads/default/original/2X/f/fd3a938d15ae5e3784cdfb01def8abb7e217c04b.png)

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  
64 GB RAM  
…

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

---

<div class="post-metadata">

### Author: ![Ian\_Chen](https://discourse.vtk.org/user_avatar/discourse.vtk.org/ian_chen/32/3969_2.png) [@Ian\_Chen](https://discourse.vtk.org/u/Ian_Chen)
#### Post date: [September 21, 2021, 1:23pm UTC](https://discourse.vtk.org/t/rendering-on-windows-black-screen-on-ubuntu/6272/2 "2021-09-21T13:23:06Z")

</div>

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