Azzera filtri
Azzera filtri

Speed up multi page tiff display?

1 visualizzazione (ultimi 30 giorni)
Jeff Spector
Jeff Spector il 10 Set 2013
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'));
%size(handles.Image_Sequence_Data(:,:,current_slice));
im =imshow(handles.Image_Sequence_Data(:,:,current_slice),[],'Parent',handles.Image_Sequence_Plot);%,'hittest','off') ;
%hold on;
%set(handles.Image_Sequence_Plot,'hittest','off');
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

Risposte (1)

Jan
Jan il 10 Set 2013
Modificato: Jan il 10 Set 2013
The profiler is a sufficient tool to find the bottleneck of your code.
I guess that image() would be much faster than imshow() for your case.

Categorie

Scopri di più su Image Processing Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by