# How do I modify the selection box in vtkInteractor StyleRubberBandPick to a selection circle?

**URL:** https://discourse.vtk.org/t/how-do-i-modify-the-selection-box-in-vtkinteractor-stylerubberbandpick-to-a-selection-circle/2586
**Category:** Support
**Created:** [February 12, 2020, 7:48am UTC](https://discourse.vtk.org/t/how-do-i-modify-the-selection-box-in-vtkinteractor-stylerubberbandpick-to-a-selection-circle/2586 "2020-02-12T07:48:29Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ymmx](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/y/e47c2d/32.png) [@ymmx](https://discourse.vtk.org/u/ymmx)
#### Post date: [February 12, 2020, 7:48am UTC](https://discourse.vtk.org/t/how-do-i-modify-the-selection-box-in-vtkinteractor-stylerubberbandpick-to-a-selection-circle/2586/1 "2020-02-12T07:48:29Z")

</div>

I’m wondering if it is possible to modify the shape of the box that is displayed when I pick an area with ‘r’? I would like it to be circle where the center is the position the mouse was at when I pressed the mouse and the radius the distance from that previous position and the current mouse position?  
I probably need to rewrite a vtkInteractorStyleRubberBandPick method, but which one and how.  
I give a minimal code to start with.

```
import vtk

class MouseInteractorHighLightActor(vtk.vtkInteractorStyleRubberBandPick):

    def __init__ (self, parent=None):
        self.AddObserver(vtk.vtkCommand.EndPickEvent, self.EndPickEventfunc)
        return

    def EndPickEventfunc(self, obj, event):
        print('I was here!')

# A renderer and render window
renderer = vtk.vtkRenderer()
renderer.SetBackground(.3, .4, .5)

renwin = vtk.vtkRenderWindow()
renwin.AddRenderer(renderer)

# An interactor
interactor = vtk.vtkRenderWindowInteractor()
interactor.SetRenderWindow(renwin)

# add the custom style
style = MouseInteractorHighLightActor()
style.SetDefaultRenderer(renderer)
interactor.SetInteractorStyle(style)

# Add spheres to play with
for i in range(10):
    source = vtk.vtkSphereSource()

    source.SetRadius(vtk.vtkMath.Random(.5, 1.0))
    source.SetCenter(vtk.vtkMath.Random(-5, 5), vtk.vtkMath.Random(-5, 5), vtk.vtkMath.Random(-5, 5))
    source.SetPhiResolution(11)
    source.SetThetaResolution(21)

    mapper = vtk.vtkPolyDataMapper()
    mapper.SetInputConnection(source.GetOutputPort())
    actor = vtk.vtkActor()
    actor.SetMapper(mapper)

    actor.GetProperty().SetDiffuseColor(vtk.vtkMath.Random(.4, 1.0), vtk.vtkMath.Random(.4, 1.0), vtk.vtkMath.Random(.4, 1.0))

    renderer.AddActor(actor)

# Start
interactor.Initialize()
interactor.Start()
```
