How could I make a callback that updates when the user moves an roi?
9 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Turlough Hughes
el 15 de Feb. de 2020
Respondida: Turlough Hughes
el 6 de En. de 2022
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 comentario
Arthur Roué
el 11 de Mzo. de 2020
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)
Respuesta aceptada
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!