Is there an example of how to add a callback to drawcircle to get the current position?

2 Ansichten (letzte 30 Tage)
I need to get the curent radius and position of the circle using drawcircle() in GUIDE. Is there an example of how to add a callback? I'm not sure how to use the images.roi.CircleMovingEventData class
Thank you

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 9 Mär. 2019
h = drawcircle('Center', [500, 500], 'Radius', 100, 'StripeColor', 'red'); %adjust parameters as needed
L1 = addlistener(h, 'ROIMoved', @(hObject, event) disp(event.CurrentCenter)) %example callback

Weitere Antworten (0)

Kategorien

Mehr zu Animation finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by