Lets say I have an object i.e. vtkLineSource. I have drawn it using the code.
Public Sub CreateLine(x1 As Double, y1 As Double, z1 As Double,
x2 As Double, y2 As Double, z2 As Double,
color As Color, renderer As Kitware.VTK.vtkRenderer)
Dim line As New vtkLineSource
line.SetPoint1(x1, y1, z1)
line.SetPoint2(x2, y2, z2)
'// Visualize
Dim mapper As vtkPolyDataMapper = New vtkPolyDataMapper
mapper.SetInputConnection(line.GetOutputPort())
mapper.SetColorMode(122)
Dim actor As vtkActor = New vtkActor
actor.SetMapper(mapper)
actor.GetProperty().SetLineWidth(2)
actor.GetProperty.SetColor(color.R, color.G, color.B)
'renderer.SetBackground(0.2, 0.3, 0.4)
renderer.AddActor(actor)
End Sub
Now i want to select this line by clicking on it. How it can be done?