I’m using VTK to visualize medical data in Python. My goal is to display 3D points with “clickable” labels, so I can pick a label and hide it from the user.
I found the following example in C++ that pretty much covers the Python implementation that I’ve been using: https://kitware.github.io/vtk-examples/site/Cxx/Visualization/LabelPlacementMapper/
I’m a newbie to VTK and I’m wondering where is stored the information about the shapes and positions of the 2D objects representing labels on the screen? Is it possible to get a list of bounding boxes in 2D pixel space somehow? I’ve seen that there is a lot of code to calculate overlaps etc, but I don’t see API to return any specific values for all labels.
Ideally, I would like to click on a label (box with description, not the point) and check whether 2D coordinates from mouse click are within label bounds to get the corresponding point/actor.