Problem about DICOM Image GUI
3 views (last 30 days)
Show older comments
KHOR WEI KOK
on 26 Mar 2016
Edited: Walter Roberson
on 2 Apr 2016
how can i insert list of dicom images into listbox and display in one of axes?? I have a folder containg dicom images and i want to insert list of images into the listbox. Any example for GUI DICOM images?
0 Comments
Accepted Answer
Walter Roberson
on 27 Mar 2016
dinfo = dir('*.dcm');
dcm_files = {dinfo.name};
set( handles.listbox1, 'String', dcm_files);
...
function listbox1_Callback(src, event, handles)
box_choices = get(src, 'String');
box_chosen = get(src, 'Value');
file_chosen = box_choices{box_chosen};
[ImageData, ImageMap] = imread(file_chosen);
imshow( ImageData, ImageMap, 'Parent', handles.axes_to_display_in);
axis(handles.axes_to_display_in, 'image');
3 Comments
Walter Roberson
on 27 Mar 2016
That is a proper example. Just change "listbox1" to the Tag you used for your listbox, and change "axes_to_display_in" to the tag you used for the axes to display the image in.
More Answers (0)
See Also
Categories
Find more on DICOM Format 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!