0

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! :)

  • 1
    Couldn't really decipher exactly what's going on here. But, as a heads up you should be resetting the `cdata` instead of using a new `imshow` for your updating callback. You should copy and paste the error as well. – JustinBlaber Mar 30 '13 at 19:16

1 Answers1

0

This is fairly easy question. You may have have different axis names and axes positioned at different locations.Then you route your images to the respective axes depending on which ever you want to choose to work with as the axes and you can choose both at the same time. Hope this helps. Good luck.

Kartik
  • 1