General images.roi.Line questions - movingROI and roiMoved callbacks, etc.

6 views (last 30 days)
Hello all,
I was hoping for some help as I navigate the new(ish) images.roi objects in Matlab 2019b.
  • Is there a way to add a listener for the ROIMoved or movingROI events when they are not performed interactively, but instead programmatically (e.g. another code performs a set(roiObj,’Position’,pos) command? I have tested this, but it doesn’t ever trigger my callback, while interacting in the UI does.
  • Is there a way in ROIMoved or movingROI callbacks to differentiate whether an endpoint or the ROI itself has been moved? As per the documentation “Move the ROI - Position the pointer over the ROI. The pointer changes to the fleur shape. Then click and drag the ROI.”. What if I want a different callback when dragging with the “fleur” vs. the endpoints?
  • Is there a way to add other hot-keys to the “wait” function for ROIs – instead of double clicking, what if I also want a hotkey like spacebar or enter to complete the wait function?
Thanks, hopefully the answers will generalize to the other images.roi classes.
-Dan

Answers (1)

Selva Karna
Selva Karna on 23 Jan 2020
Hi ,
Use mouse waitbutton

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!