Commit 7ed767af authored by Eamon Doyle's avatar Eamon Doyle
Browse files

speed improvements

parent 0472156f
......@@ -439,6 +439,7 @@ line=s(2).line;
display(['At ' s.name 'line ' line]);
function redrawImage(hObject, eventdata, handles)
%tic
%st = dbstack;
%display(['Start ' st.name]);
%currentLine
......@@ -568,22 +569,33 @@ function slider2_Callback(hObject, eventdata, handles)
% hObject handle to slider2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
%tic
sv = round(get(handles.slider2,'Value'));
%toc
set(handles.slider2,'Value',sv);
%toc
handles.currentSlice = sv;
%toc
% Hints: get(hObject,'Value') returns position of slider
% get(hObject,'Min') and get(hObject,'Max') to determine range of slider
if get(handles.slider2,'Max') ~= 1.1
axes(handles.axes1);
%if get(handles.slider2,'Max') ~= 1.1
% toc
%axes(handles.axes1);
% toc
images = handles.imageMat;
% toc
h = imagesc(images(:,:,1,get(handles.slider2,'Value')));
% toc
colormap('gray')
% toc
set(h,'ButtonDownFcn',@axes1_ButtonDownFcn);
% toc
redrawImage(hObject,eventdata,handles);
end
% toc
%end
guidata(hObject,handles);
toc
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment