How to draw a resizable circle?

I need to insert a circle into VTK widget window via mouse interaction. Its radius and position should be resizable by dragging. Inserting a polydata doesn’t seem to provide the option to modify radius and position. Could anyone suggest the right tool to do this - similar to distance widget or angle widget? Or any method to implement this. Any help would be highly appreciated.

Thanks

You can use the combination of line widget and circle and connect then via a callback. The point handle of line widget can be used for dragging/resize circle.

Thank you for the reply… Those are two separate elements. How do we connect one’s handle to the other

You can connect the elements using vtkcallback, refer this example for vtkcallback implementation. You can use the the mouse click and move events for creating and resizing circle.

1 Like

That worked. Thank you. Though I used an eventfilter instead of callback… same principle