How can I display different images on different axes in the same GUI?

조회 수: 1 (최근 30일)
José Ignacio Orlando
José Ignacio Orlando 2013년 3월 30일
I'm using MATLAB R2012a to develop a GUI for manual medical image segmentation. In particular, I want this regions to train a classifier for automatic brain tissue classification.
The GUI I design contains 2 axes, with tags 'figureImage' and 'figureVOI', respectively. In the first one I want to display a single slice of a 3D MRI scan, and in the other one I want to show the mask associated to that slice. I allow the user to move between slices using a scroll bar.
I'm using a 3D matrix to represent the image ('image'), and a 3D matrix to represent the mask ('voi'), both of them in the handles structure. I initialize the 'voi' matrix with zeros when the GUI is loaded.
The code I applied when the user clics on the scroll bar is the next:
% update the number of the actual slice
handles.actualSlice = round(get(handles.sliceSelector, 'Value'));
% update the image and the mask
axes(handles.figureImage)
imshow(handles.image(:, :, handles.actualSlice));
axes(handles.figureVOI)
imshow(handles.voi(:, :, handles.actualSlice));
However, when I clic on the scroll bar, the GUI just scroll to cut nº 70 aprox., and then all then the GUI stops to update the axes. If I close the window and try to run the GUI again, and MATLAB shows me a system error.
I want to know what I'm doing bad, and if there is another way to do what I need to do. Thanks a lot! :)

답변 (0개)

카테고리

Help CenterFile Exchange에서 Display Image에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by