I am working on a GUI for some people in my lab. I can easily read in their data which are multipage tiff files. The process of reading them in takes about as long as it does when I open the file with ImageJ. However, in my gui I also have a slider that is supposed to update the image shown and when I scroll this slider the image that is shown in the window IS updated, but VERY slowly. Is there some way I can speed this up?
I have this :
current_slice = round(get(handles.Image_Slider,'Value'));
im =imshow(handles.Image_Sequence_Data(:,:,current_slice),.. [],'Parent',handles.Image_Sequence_Plot);
in the image slider call back.
and I use this :
hListener=handle.listener(handles.Image_Slider,'ActionEvent',@ImageSliderMoved);
setappdata(handles.Image_Slider,'myListener',hListener);
handles.output = hObject;
in the OpeningFcn
and then to update I use this :
function ImageSliderMoved(hObject, eventdata, handles)
handles=guidata(hObject);
current_slice = round(get(handles.Image_Slider,'Value'));
im =imshow(handles.Image_Sequence_Data(:,:,current_slice),[],'Parent',handles.Image_Sequence_Plot);
set(im,'hittest','off');
The scroll bar works, it is just very slow. For the record I am reading in 1000 16bit .tif files for a total stack file size of 500 MB. Is it just that my computer isn't fast enough to update this in real time using MATLAB? But I don't think that is the case because I can scroll through the images rapidly in imageJ. I am using R2010a, although should be getting The 2013 version in the near future I would rather not wait for it...
thanks..
-jeff