Embedding VTK output in wxpanel with C++

Question:

I am a C++ beginner and looking for a working example which embeds VTK output in wxpanel with C++ language. I came across the following
https://sourceforge.net/projects/wxvtk/
which was last updated four years ago, and doesn’t compile with the latest cmake, VTK and WxWidgets. I am using MinGW-W64 compiler on windows 10. I see that the same can be easily done using python which must be using some C++/C code internally.

Asked By: Harsh Kumar Narula

||

Answers:

I finally modified the original source-code of wxvtk and CMakeLists.txt in order to make it work with WxWidgets-3.0.3 and VTK-8. Modifications were required since a lot has changed in VTK source code during last five years or so. The modified version with updated source code is available here. It builds wxVTKRenderWindowInteractor.(dll,lib) as well as compiles a minimal working example (SAMPLE.cpp) with dynamic linking to the wxVTKRenderWindowInteractor.dll leading to MAIN.exe. A screenshot of the output window (MAIN.exe) is shown below:

enter image description here

I hope it will be helpful for the community.

Answered By: Harsh Kumar Narula

can you update this for the current wxWidgets (3.2.1) and VTK (9.2.2) versions?

Answered By: user20231285
Categories: questions Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.