# A user-friendly way of picking lines

**URL:** https://discourse.vtk.org/t/a-user-friendly-way-of-picking-lines/9104
**Category:** Support
**Created:** [August 7, 2022, 5:53pm UTC](https://discourse.vtk.org/t/a-user-friendly-way-of-picking-lines/9104 "2022-08-07T17:53:19Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![rdbrn](https://discourse.vtk.org/user_avatar/discourse.vtk.org/rdbrn/32/5627_2.png) [@rdbrn](https://discourse.vtk.org/u/rdbrn)
#### Post date: [August 7, 2022, 5:53pm UTC](https://discourse.vtk.org/t/a-user-friendly-way-of-picking-lines/9104/1 "2022-08-07T17:53:19Z")

</div>

I’m looking for a user friendly way to pick lines using the mouse.

Problem with lines is that they are thin, so difficult to hit exactly with the mouse.

I experimented with vtkAreaPicker to pick an area instead of a point. But vtkAreaPicker gives a lot of false positives.

So then I decided to try a vtkPropPicker and let that sample all points in an area. Unfortunately that turned out to be unworkably slow. Interrogating a small area already takes seconds.

Before going into more exotic ideas, is there anyone with a good option on how to solve this? Else my next try would be to go back to areapicker and then find the Prop with the lowest distance to the camera. Or use vtkPropPicker along a line instead of over an area.

---

<div class="post-metadata">

### Author: ![rdbrn](https://discourse.vtk.org/user_avatar/discourse.vtk.org/rdbrn/32/5627_2.png) [@rdbrn](https://discourse.vtk.org/u/rdbrn)
#### Post date: [August 9, 2022, 7:55am UTC](https://discourse.vtk.org/t/a-user-friendly-way-of-picking-lines/9104/2 "2022-08-09T07:55:01Z")

</div>

Picking directly from the renderer instead of using any of the pickers did the trick:

```auto
renderer = self.GetCurrentRenderer()
assemblyPath = renderer.PickProp(self.start_x, self.start_y, self.end_x, self.end_y)
collection = renderer.GetPickResultProps()

```

renderer.PickProp returns the nearest prop while all picked props are stored in renderer.GetPickResultProps()
