1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
| % --- Executes on key press with focus on mainGUI and no controls selected.
function mainGUI_KeyPressFcn(hObject, eventdata, handles)
% hObject handle to mainGUI (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global FILTERED_DATA
key = get(handles.mainGUI,'CurrentKey');
switch key
case 'leftarrow'
val = round(get(handles.point_slider,'value'));
if val>1
val = val - 1;
end
set(handles.point_slider,'value',val);
case 'rightarrow'
val = round(get(handles.point_slider,'value'));
if val<273
val = val + 1;
end
set(handles.point_slider,'value',val);
case 'downarrow'
val = round(get(handles.position_slider,'value'));
if val>1
val = val - 1;
end
set(handles.position_slider,'value',val);
case 'uparrow'
val = round(get(handles.position_slider,'value'));
if val<size(getappdata(0,'input_data'),3)-1
val = val + 1;
end
set(handles.position_slider,'value',val);
otherwise
end
Affpol2zoompoint(getappdata(0,'input_data')...
,FILTERED_DATA...
,round(get(handles.point_slider,'value'))...
,round(str2double(get(handles.plan_edit,'String'))) ...
,round(get(handles.position_slider,'value'))...
,get(handles.zoom_window_popupmenu,'value'),handles); |
Partager