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

2 vues (au cours des 30 derniers jours)
José Ignacio Orlando
José Ignacio Orlando le 30 Mar 2013
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! :)

Réponses (0)

Catégories

En savoir plus sur Display Image dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by