I wish to add at least 3 customizable point ROIs on an axes in App designer and to store them in an array. Any idea how to make this code shorter and better that it will allow to add more than 3 point ROIs (without declaring several drawpoint) and still allow them to be moved on the image?
Code:
function StartButtonPushed(app, event)
imshow('peppers.png','Parent',app.ImageAxes);
roiPOC1 = drawpoint(app.ImageAxes);
PosPOC1=round(get(roiPOC1,'Position'))
roiPOC2 = drawpoint(app.ImageAxes);
PosPOC2=round(get(roiPOC2,'Position'))
roiPOC3 = drawpoint(app.ImageAxes);
PosPOC3=round(get(roiPOC3,'Position'))
drawnow;
end