Hello,
I have created a command that allows me to display different images from a folder to a GUI. There are a total of 4 randomly selected images from 4 different folders.
The command is:
files = dir('/Users/Documents/MATLAB/IR1/**/*.dcm')num_files = numel(files);filename = files(randi(num_files)).name;image = dicomread(filename);for image_order = randperm(num_files); k = image_order filename = files(k).name; image = dicomread(filename);end
With the PushButton the user can select the images by his own order.
My question now would be, how does the image name (of the selected image) save itself in the workspace? And how can one set it so that exactly the order appears that one has selected?
Unfortunately I don't know the commands for it, even after a long search I couldn't find an answer.
Best Answer