Can a GUI track commands and output them in a report?
Show older comments
I've made a GUI environment for image processing. I want to be able to generate reports from this GUI, and I want to include the processing commands I used (with parameters) in the report. Is there any way to make MATLAB do this?
Accepted Answer
More Answers (1)
Sean de Wolski
on 31 Jan 2013
Edited: Sean de Wolski
on 31 Jan 2013
This questions is a little too vague to answer explicitly but let me throw an idea out there:
If you are trying to report the state of all of your sliders etc. and images in the GUI, you could have a button that generates a *.m file with snapshots of the figure at different states and text comments etc. This could then be published using publish(). You could write equivalent commands into this *.m file.
E.g. if one button does a morphological erosion of an image with a strel selected from a listbox and shows it. You could write the following code to the *.m file.
st = strel('diamond',4); %diamond is string{value} from listbox
Ieroded = imerode(I,st);
imshow(Ieroded);
Use fprintf() to write code automatically.
5 Comments
Caleb
on 31 Jan 2013
Sean de Wolski
on 31 Jan 2013
Exactly what I am saying above!
Whenever you execute a command in the GUI, fprintf() it to a file!
Caleb
on 31 Jan 2013
Sean de Wolski
on 31 Jan 2013
It depends on your GUI. You would get() all of the various information about the inputs, variables and operations you are receiving and then fprintf() it.
If I have tim elater, I'll make a simple example.
Caleb
on 31 Jan 2013
Categories
Find more on Image Arithmetic in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!