Is there an example of how to add a callback to drawcircle to get the current position?
    조회 수: 2 (최근 30일)
  
       이전 댓글 표시
    
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
댓글 수: 0
채택된 답변
  Walter Roberson
      
      
 2019년 3월 9일
        h = drawcircle('Center', [500, 500], 'Radius', 100, 'StripeColor', 'red');   %adjust parameters as needed
L1 = addlistener(h, 'ROIMoved', @(hObject, event) disp(event.CurrentCenter))  %example callback
댓글 수: 0
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!