How to use a Matlab GUI slider to display image timeframes
<p>First of all, I need to be able to select and load multiple image files using the function 'uigetfile'. Then, I need to use a slider to display the successive timeframes of the loaded images onto the axes. So the question is, how to load multiple image files into the GUI and how to use a slider to display through the multiple images one by one. I have a feeling that the function 'dir' needs to be used to select multiple images in 'uigetfile', but I am not sure how to implement it. I am using GUIDE.</p>

<p>This is the image loading push button code.</p>

<pre><code>function loadImagePushButton_Callback(hObject,~,handles)

[fileName,pathName] = uigetfile('*.*');
normalImage = imread(fullfile(pathName,fileName));
handles.normalimage = normalImage;
axes(handles.imageDisplay)
imshow(normalImage)
guidata(hObject,handles)

end
</code></pre>

<p>This is the slider for displaying images one by one.</p>

<pre><code>function imageFrameSlider_Callback(hObject,~,handles)

normalImage = handles.normalimage;
sliderValue = get(hObject,'Value');
nextImage = %?%?%?% Not sure what to code here
axes(handles.imageDisplay)
imshow(nextImage)

end
</code></pre>