How to integrate WxWidgets and VTK?
How to integrate WxWidgets and VTK?
Does anyone know how to integrate WxWidgets and VTK.
Re: How to integrate WxWidgets and VTK?
There is an old project named wxVTK. Most likely it won't compile today, but studying its source should be helpful:
https://github.com/vadz/wxVTK
https://github.com/vadz/wxVTK
Use the source, Luke!
Re: How to integrate WxWidgets and VTK?
I myself have no experience with it, but this should be an updated version of wxVTK (wxWidgets 3 and VTK 8):
https://github.com/harshn05/wxvtk-UpdatedOnJan23_2018
https://github.com/harshn05/wxvtk-UpdatedOnJan23_2018
Re: How to integrate WxWidgets and VTK?
I'm trying VTK too.
But VTK 9.1 is not frendly with my env(mingw64), and I don't want to spend time to resolve the compile error now. Though VTK supports Qt(announced), I don't like Qt's complicated way.
If you need draw charts, there are both opensource and commercial candidates for wxWidgets.
Check https://www.wxwidgets.org/blog/2018/08/ ... lications/
But VTK 9.1 is not frendly with my env(mingw64), and I don't want to spend time to resolve the compile error now. Though VTK supports Qt(announced), I don't like Qt's complicated way.
If you need draw charts, there are both opensource and commercial candidates for wxWidgets.
Check https://www.wxwidgets.org/blog/2018/08/ ... lications/
No, I know everything.
Re: How to integrate WxWidgets and VTK?
I've had success with this. Here's my code (in Python)
Code: Select all
# Import required modules and objects
import vtk
from vtk.wx.wxVTKRenderWindowInteractor import wxVTKRenderWindowInteractor
# Instantiate a new VTK render window
window = vtk.vtkRenderWindow()
# Instantiate a new wxVTKRenderWIndowInteractor (note: "panel" below is a placeholder for any wxWindow object you want to embed into)
interactor = wxVTKRenderWindowInteractor(panel, wx.ID_ANY)
# Link the VTK render window to the wxVTKRenderWindowInteractor
interactor.SetRenderWindow(window)
Last edited by cbrinck on Fri Jun 03, 2022 2:22 am, edited 2 times in total.