Selecting and interacting with points in plot

For my scatter plots in Slicer, I am using the interaction mode “select points” in order to select specific points on the plot. Once I’ve selected my points, however, I’m unsure how exactly to use my selection. I’ve used:

plotView.connect(“dataSelected(vtkStringArray*, vtkCollection*)”, self.onDataSelected)

but I’m not sure how to actually extract the data of the points I’ve selected from that. I haven’t been able to find documentation on what attributes can be used. I’d like to ultimately be able to create a new table and plot using just the data points from my selection.

I’ve added an example of how to get selected point IDs in Python: https://www.slicer.org/wiki/Documentation/Nightly/Developers/Plots#Signals

1 Like