# Change vtkImageCroppingWidget handle radius

**URL:** https://discourse.vtk.org/t/change-vtkimagecroppingwidget-handle-radius/8454
**Category:** Web
**Created:** [May 10, 2022, 5:22am UTC](https://discourse.vtk.org/t/change-vtkimagecroppingwidget-handle-radius/8454 "2022-05-10T05:22:37Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![seattlewayne](https://discourse.vtk.org/user_avatar/discourse.vtk.org/seattlewayne/32/3958_2.png) [@seattlewayne](https://discourse.vtk.org/u/seattlewayne)
#### Post date: [May 10, 2022, 5:22am UTC](https://discourse.vtk.org/t/change-vtkimagecroppingwidget-handle-radius/8454/1 "2022-05-10T05:22:37Z")

</div>

I am attempting to use a vtkImageCroppingWidget, but the handles end up being rendered much to large to be useful. How does one adjust the handle size? Looking at the example and the source it is not obvious how to solve this. The method suggested in [Change vtkDistanceWidget handles radius](https://discourse.vtk.org/t/change-vtkdistancewidget-handles-radius/5428) does not work with the vtkImageCroppingWidget.

Thanks.

---

<div class="post-metadata">

### Author: ![Forrest](https://discourse.vtk.org/user_avatar/discourse.vtk.org/forrest/32/300_2.png) [@Forrest](https://discourse.vtk.org/u/Forrest)
#### Post date: [May 11, 2022, 3:30pm UTC](https://discourse.vtk.org/t/change-vtkimagecroppingwidget-handle-radius/8454/2 "2022-05-11T15:30:24Z")

</div>

You will need to extend the existing vtkImageCroppingWidget and add pixel-sized handles. Specifically, you will need to add the following bit of config [here](https://github.com/Kitware/vtk-js/blob/master/Sources/Widgets/Widgets3D/ImageCroppingWidget/index.js#L125):

```auto
initialValues: {
  scaleInPixels: true,
}

```

This means that the [`scale1`](https://github.com/Kitware/vtk-js/blob/master/Sources/Widgets/Widgets3D/ImageCroppingWidget/state.js#L64) state is to be interpreted as a height in screen pixels.

You can see an example of this with the [PolyLineWidget](https://github.com/Kitware/vtk-js/blob/master/Sources/Widgets/Widgets3D/PolyLineWidget/index.js#L48-L50).
