1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| function Nom_orthophoto_bouton_Callback(hObject, eventdata, handles)
%% Nom_orthophoto_bouton_Callback
% hObject handle to Nom_orthophoto_bouton (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
actualname = get(handles.Nom_orthophoto_box, 'String') ;
ici = cd ;
if ~isempty(actualname)
[pathstr, name, ext] = fileparts(actualname) ;
cd (pathstr) ;
end
[FileName,PathName] = uigetfile('*.tif','Orthophoto') ;
cd (ici) ;
if all([FileName,PathName]==0)
return
end
nom = [PathName FileName] ;
r = afficher_image(handles, nom) ;
if r == -2
nom = sprintf('Fichier inconnu ou incorrect') ;
end
set (handles.Nom_orthophoto_box, 'String', nom) ;
guidata(hObject, handles) ; |
Partager