Interactive text widget. Search box.

I have created a bridge vtkImguiAdapter between VTK and Imgui.

vtkImguiAdapter links both frameworks using SDL2. SDL2 compatibility in VTK was recently added in vtkSDL2OpenGLRenderWindow and vtkSDL2RenderWindowInteractor, so VTK9.0 is needed.

If VTK wasn’t compiled with VTK_USE_SDL2, those VTK files will be compiled in the vtkImguiAdapter project.

Imgui is not suited for controlling full desktop applications, but it’s a pretty useful addon for single window visualizations in VTK. The biggest selling point of Imgui is that it lives closer to the rendered data, so modifications of the data are easy. Imgui is used heavily in the game industry, as a level editor, and as a scene debugger.

For the search box, I am still figuring out how to easily FindData in VTK for a toy example. I am sure the functionality is there, but the API is not that clear to me.

Also, I haven’t tested it with a lot of rendered data, so, not sure yet about frame rates in complex scenes.

Please have a look at the code example. I am sure there is room for improvement.

3 Likes