ROI functions (drawpolygon, drawrectangle, etc.) cause bugs
11 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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?
1 Kommentar
Piyush Kumar
am 14 Mai 2024
Bearbeitet: Piyush Kumar
am 14 Mai 2024
Hi Ilya,
Check the FAQ for a list of common reasons your compiled app won't run on a target system: https://matlab.fandom.com/wiki/FAQ#My_standalone_executable_won't_run_on_the_target_computer._What_can_I_try?
To learn about using "Using ROIs in Apps Created with App Designer": https://www.mathworks.com/help/images/roi-creation-overview.html#mw_2242f80e-e866-4b87-85c6-5c08ae0d66b3
Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!