MATLAB: Problem about DICOM Image GUI

dicom listbox and display in on axes1

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?

Best Answer

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');
Related Question