ROI functions (drawpolygon, drawrectangle, etc.) cause bugs

11 visualizaciones (últimos 30 días)
Ilya
Ilya el 8 de Mayo de 2024
Editada: Piyush Kumar el 14 de Mayo de 2024
I have UIAxes in the app which is used to display TIF images. The user can draw a region of interest on the axes in order to create a mask for the image. The drawing is initiated by clicking a button:
function PushToolClicked(app, event)
global Mask
global ImageTif
roi = drawrectangle('Color','r','Parent',app.UIAxes);
cm = uicontextmenu(app.UIFigure);
m1 = uimenu(cm,"Text","Delete","MenuSelectedFcn",{@roidelete,roi});
m2 = uimenu(cm,"Text","Mask", "MenuSelectedFcn", {@addMask,roi,app,Mask,ImageTif});
m3 = uimenu(cm,"Text","Unmask", "MenuSelectedFcn",{@removeMask,roi,app,Mask,ImageTif});
roi.ContextMenu = cm;
end
It works well on my PC both in MATLAB and standalone app. However, when the same app is run on my collegue's PC, the following problems occur:
If drawpolygon is applied, the points are not displayed during drawing until the shape is completed. Then, it is not possible to modify the shape.
If drawrectangle, drawcircle or drawellipce are applied, ROI appeares as a single point at the point of the first MouseDown.
The last version of MATLAB Runtime is installed on both devices. What are the possible reasons for this problem and is there a more reliable way to implement ROI?

Respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by