Problem about DICOM Image GUI
3 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Walter Roberson
2016-3-27
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 个评论
Walter Roberson
2016-3-27
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.
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!