pcl icon indicating copy to clipboard operation
pcl copied to clipboard

GUI for pcl::visualizer

Open victoryc opened this issue 6 years ago • 10 comments

I would like to have some simple GUI on top of pcl:visualizer. Basically, I want to have a few buttons, drop-down lists etc. Are there any examples of doing it? Seems like using Qt is one way. Since Qt seems like an overkill for my needs, I am wondering whether I can use imGui.

Any thoughts/suggestions/examples would be appreciated. Thanks.

victoryc avatar Mar 30 '20 23:03 victoryc

Here is an example of using PCLVisualizer with Qt: http://pointclouds.org/documentation/tutorials/qt_colorize_cloud.php#qt-colorize-cloud

I'm not aware of imGui + PCLVisualizer usage.

taketwo avatar Mar 31 '20 10:03 taketwo

I figured out a big chunk of what needs to be done to use imGui with PCLVisualizer. I am pretty close. However, I am stuck with the following issue.

As I see in RenderDoc debugger, when PCLVisualizer::spinOnce is called it does the following:

  • Clears the viewport
  • Renders point cloud
  • Clears again (Not sure why; but, that is not my main concern as of now)
  • Renders point cloud again (Not sure why; but, that is not my main concern as of now)
  • Swaps buffers

I would like to render the GUI just before it swaps buffer. Is there a way to do it? Basically, I want to render the GUI in addition to the point cloud. The rendering of the GUI happens by setting up some render state and then calling glDrawElementsBaseVertex. Basically I need a way to do that somewhere between the BeginFrame and EndFrame of PCLVisualizer's rendering.

victoryc avatar Apr 03 '20 18:04 victoryc

I found a way to do what I asked by making a renderer (subclass of vtkRenderer) to render the GUI and adding it to vtkRenderWindow of PCLVisualizer using its AddRenderer method.

victoryc avatar Apr 04 '20 00:04 victoryc

I found a way to do what I asked by making a renderer (subclass of vtkRenderer) to render the GUI and adding it to vtkRenderWindow of PCLVisualizer using its AddRenderer method.

Hello @victoryc, I am trying to to use imGUI with PCL visualizer as well. Can you please share a working example? Thanks

mzeeshanarshad avatar Jul 10 '20 07:07 mzeeshanarshad

Hi @victoryc

I am wondering if you can share your changes adding imgui to PCLVisualizer? Thanks!

hduonggithub avatar Sep 15 '20 13:09 hduonggithub

I found a way to do what I asked by making a renderer (subclass of vtkRenderer) to render the GUI and adding it to vtkRenderWindow of PCLVisualizer using its AddRenderer method.

Hello @victoryc, I am trying to to use imGUI with PCL visualizer as well. Can you please share a working example? Thanks

Same thing! I am really looking to integrate ImGui to PCL. That would be a wonderful addition! Thanks!

9and3 avatar Nov 02 '20 08:11 9and3

I found a way to do what I asked by making a renderer (subclass of vtkRenderer) to render the GUI and adding it to vtkRenderWindow of PCLVisualizer using its AddRenderer method.

Hello @victoryc, I am trying to to use imGUI with PCL visualizer as well. Can you please share a working example? Thanks

Same thing! I am really looking to integrate ImGui to PCL. That would be a wonderful addition! Thanks! @victoryc +1

adahbingee avatar Jun 13 '22 11:06 adahbingee

@victoryc Could you please share the method with more details? Thank you in advance.

leochien1110 avatar Jul 21 '23 13:07 leochien1110

Is there any new progress in this regard?

QiuYilin avatar Jun 25 '24 01:06 QiuYilin

Is there any new progress in this regard?

Any updates?

t-black4 avatar Jun 15 '25 02:06 t-black4