How could I make a callback that updates when the user moves an roi?
9 次查看(过去 30 天)
显示 更早的评论
I'm making an app which loads and displays the same image side by side in app.UIAxes and app.UIAxes2. I have a rectangle roi object in app.UIAxes2 which the user can move around and adjust the size of. I want to take the coordiantes of the roi in app.UIAxes2 and use that to interactively zoom to those coordinates for the other UIAxes by changing the XLim and YLim accordingly. My issue is I don't know how to setup the callback so that it responds to a change in the position.
My question is really, is it possible to setup a value changing funtion that is called everytime the position values change in the roi, and if so how would I go about it? This would be similar to a value changing callback for a slider but the difference/issue being that draw rectangle is not part of the component library for app designer.
Any help/guidance would be appreciated.
1 个评论
Arthur Roué
2020-3-11
I'm not familiar with ROI rectangle, but you could try to add a listener on it's DrawingArea property.
addlistener(roi, 'DrawingArea', 'PostSet', @foo)
采纳的回答
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!