Change vtkImageCroppingWidget handle radius

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 does not work with the vtkImageCroppingWidget.


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:

initialValues: {
  scaleInPixels: true,

This means that the scale1 state is to be interpreted as a height in screen pixels.

You can see an example of this with the PolyLineWidget.

1 Like