Coding for user-error with imfreehand / iptSetPointerBehavior
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have created a GUI that allows the user to section out a portion of an image using imfreehand. Right now the GUI is set up where they can start sectioning when they press a button. I'm am trying to code for a user-error where the user presses the sectioning button, but clicks on other buttons in the GUI immediately after instead of tracing a section. The error that occurs is:
Error using iptSetPointerBehavior>parseInputs (line 134)
First input argument, h, contains one or more invalid handles.
Error in iptSetPointerBehavior (line 118)
[h, pointerBehavior] = parseInputs(varargin{:});
Error in manageInteractivePlacement/resetChildPointerManagement (line 154)
iptSetPointerBehavior(cached_pointer_behavior{k,1},...
Error in manageInteractivePlacement (line 105)
resetChildPointerManagement();
Error in imfreehand>imfreehandAPI (line 166)
placement_aborted = manageInteractivePlacement(h_axes,h_group,@placeFreehand);
Error in imfreehand (line 82)
[h_group,draw_api] = imfreehandAPI(varargin{:});
Error in Tracer (line 19)
trace_dicom = imfreehand(gca);
Where 'Tracer' is my function. I am not familiar enough with imfreehand function to truly know what is going on, and how to code to prevent this error.
How I would like to solve this is by displaying an error message to the user when they click on other buttons (something like: 'Please finish sectioning the image') and allowing the user to continue sectioning where they left off (they can currently trace multiple regions).
I can provide the code for the Tracer function if needed.
Thank You.
0 commentaires
Réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!