Drawfreehand in App Designer

matlab
#1

Hi,

I want to add a freehand draw in my app, with :

d = drawfreehand(app.UIAxes_1,'color','green');

But i have this error:

Error using images.roi.internal.ROI/parseInputs

ROI parent must be a valid Axes object.

Error in images.roi.Freehand

So how can i use drawfreehand in App Designer ?

Thanks a lot in advance.

#2

Hi @moon716,
you need to use classical axes instead:

You can use ROIs in apps created with App Designer. However, you must use a standard Axes object in your app. You cannot parent an ROI in a UIAxes

see more here:
https://se.mathworks.com/help/images/roi-creation-overview.html#mw_2242f80e-e866-4b87-85c6-5c08ae0d66b3

The functionality of the AppDesigner is still sadly very limited…

Best regards,
Ilya

#3

Hi Ilya,

Thank you!

Best regards,

Mounia