Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VTKOverlayWindow does not show up #181

Closed
liushuya7 opened this issue Jan 10, 2022 · 6 comments
Closed

VTKOverlayWindow does not show up #181

liushuya7 opened this issue Jan 10, 2022 · 6 comments

Comments

@liushuya7
Copy link

liushuya7 commented Jan 10, 2022

Some example code cannot run on my system because VTKOverlayWindow does not show up, I figured QVTKRenderWindowInteractor cannot Initialize() without passing a QObject (QWidget or QMainWindow) as parent.

Therefore, this example does not run on my system.

My environment:

Python 3.8.10
PyQt5 & PySide2
vtk 9.1

My solution:

# create the widget
window = QWidget() # Or QMainWindow()

widget = QVTKRenderWindowInteractor(window) # <-- pass in a QMainWindow or QWidget object
widget.Initialize()
widget.Start()

Then add this at the end.

window.show()

Afterwards I can see the rendering window pop up.

@thompson318
Copy link
Collaborator

Thanks for this. Can you please let me know what operating system you're running on? I've had similar problems on Linux (Ubuntu) but not macos or Windows.

@liushuya7
Copy link
Author

I'm running Ubuntu 20.04

@thompson318
Copy link
Collaborator

QVTKRenderWinderInteractor.py seems to be a copy of the same file in the main VTK repository, I'm not sure why we have our own copy of it in scikit-surgeryvtk, @tdowrick might know. In commit 4714cd2 I've set us up to use the native VTK version which seems to be OK in terms of unit tests etc. However it still has the same problem for me (ubuntu 20.04) as you're getting. So then this becomes a VTK bug. I found this https://gitlab.kitware.com/vtk/vtk/-/issues/17957 on their issue tracker which doesn't fill me with hope. I'll keep digging though.

One quick fix for you might be to set the vtk<9.0.0 in requirements.txt which should use vtk 8.something which did work.

@liushuya7
Copy link
Author

Thanks! I really appreciate that you looked into this. Yea, I figured it might have to do with VTK 9.1 that they have changed it.

thompson318 added a commit that referenced this issue Jan 12, 2022
@tdowrick
Copy link
Contributor

At the time we started using QVTKRenderWinderInteractor PySide2 wasn't supported, so I copied the file and made the relevant changes.

From looking at the most recent official version, then have included PySide2 support now, so assuming unit tests are passing, and probably with a bit of manual checking, it should be fine to go back to using the main VTK file.

thompson318 added a commit that referenced this issue Oct 13, 2022
thompson318 added a commit that referenced this issue Oct 18, 2022
thompson318 added a commit that referenced this issue Oct 18, 2022
thompson318 added a commit that referenced this issue Oct 19, 2022
thompson318 added a commit that referenced this issue Oct 19, 2022
thompson318 added a commit that referenced this issue Oct 19, 2022
thompson318 added a commit that referenced this issue Oct 19, 2022
thompson318 added a commit that referenced this issue Oct 19, 2022
thompson318 added a commit that referenced this issue Oct 19, 2022
thompson318 added a commit that referenced this issue Oct 19, 2022
thompson318 added a commit that referenced this issue Oct 19, 2022
thompson318 added a commit that referenced this issue Oct 19, 2022
thompson318 added a commit that referenced this issue Oct 20, 2022
thompson318 added a commit that referenced this issue Oct 20, 2022
thompson318 added a commit that referenced this issue Oct 25, 2022
thompson318 added a commit that referenced this issue Oct 25, 2022
thompson318 added a commit that referenced this issue Oct 25, 2022
thompson318 added a commit that referenced this issue Oct 25, 2022
thompson318 added a commit that referenced this issue Oct 27, 2022
thompson318 added a commit that referenced this issue Oct 27, 2022
thompson318 added a commit that referenced this issue Oct 27, 2022
thompson318 added a commit that referenced this issue Oct 27, 2022
thompson318 added a commit that referenced this issue Oct 27, 2022
thompson318 added a commit that referenced this issue Nov 2, 2022
thompson318 added a commit that referenced this issue Nov 2, 2022
thompson318 added a commit that referenced this issue Nov 2, 2022
thompson318 added a commit that referenced this issue Nov 2, 2022
thompson318 added a commit that referenced this issue Jan 18, 2023
…easily set where we call Inialize and Start
thompson318 added a commit that referenced this issue Jan 19, 2023
…easily set where we call Inialize and Start
@mxochicale
Copy link
Contributor

This has been addressed for local and remote unit test of #187 and #203 , so I am close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants