Changeset 638 for trunk/src


Ignore:
Timestamp:
May 20, 2013, 10:14:24 AM (12 years ago)
Author:
sommeria
Message:

bug with mask corrected in uvmat. Update of browser in series

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series.m

    r636 r638  
    366366 else
    367367     oldfile=fullfile(RootPathCell{1},RootFileCell{1});
    368  end
    369 [FileName, PathName, filterindex] = uigetfile( ...
    370        {'*.xml;*.xls;*.png;*.avi;*.AVI;*.nc', ' (*.xml,*.xls, *.png, *.avi,*.nc)';
    371        '*.xml',  '.xml files '; ...
    372         '*.xls',  '.xls files '; ...
    373         '*.png','.png image files'; ...
    374         '*.avi;*.AVI','.avi movie files'; ...
    375         '*.nc','.netcdf files'; ...
    376         '*.*',  'All Files (*.*)'}, ...
    377         'Pick a file',oldfile);
    378 fileinput=[PathName FileName];%complete file name
    379 sizf=size(fileinput);
    380 if (~ischar(fileinput)|~isequal(sizf(1),1)),return;end
    381 [path,name,ext]=fileparts(fileinput);
    382 if isequal(ext,'.xml')
    383     msgbox_uvmat('ERROR','input file type not implemented')%A Faire: ouvrir le fichier pour naviguer
    384 elseif isequal(ext,'.xls')
    385     msgbox_uvmat('ERROR','input file type not implemented')%A Faire: ouvrir le fichier pour naviguer
    386 else
    387     display_file_name(handles,fileinput,'append')
    388 end
     368end
     369 fileinput=uigetfile_uvmat('pick a file to append in the input table',oldfile);
     370if ~isempty(fileinput)
     371     display_file_name(handles,fileinput,'append')
     372end
     373% [FileName, PathName, filterindex] = uigetfile( ...
     374%        {'*.xml;*.xls;*.png;*.avi;*.AVI;*.nc', ' (*.xml,*.xls, *.png, *.avi,*.nc)';
     375%        '*.xml',  '.xml files '; ...
     376%         '*.xls',  '.xls files '; ...
     377%         '*.png','.png image files'; ...
     378%         '*.avi;*.AVI','.avi movie files'; ...
     379%         '*.nc','.netcdf files'; ...
     380%         '*.*',  'All Files (*.*)'}, ...
     381%         'Pick a file',oldfile);
     382% fileinput=[PathName FileName];%complete file name
     383% sizf=size(fileinput);
     384% if (~ischar(fileinput)|~isequal(sizf(1),1)),return;end
     385% [path,name,ext]=fileparts(fileinput);
     386% if isequal(ext,'.xml')
     387%     msgbox_uvmat('ERROR','input file type not implemented')%A Faire: ouvrir le fichier pour naviguer
     388% elseif isequal(ext,'.xls')
     389%     msgbox_uvmat('ERROR','input file type not implemented')%A Faire: ouvrir le fichier pour naviguer
     390% else
     391%     display_file_name(handles,fileinput,'append')
     392% end
    389393
    390394% --------------------------------------------------------------------
  • trunk/src/uvmat.m

    r635 r638  
    12841284if isequal(get(handles.CheckMask,'Value'),1)
    12851285     [RootPath,SubDir,RootFile,FileIndices,FileExt]=read_file_boxes(handles);
    1286      FileBase=fullfile(RootPath,RootFile);
     1286     FileBase=fullfile(RootPath,SubDir,RootFile);
    12871287    num_i1=stra2num(get(handles.i1,'String'));
    12881288    num_j1=stra2num(get(handles.j1,'String'));
     
    13381338    errormsg=[];%default
    13391339    if mdetect==0
    1340         [FileName, PathName, filterindex] = uigetfile( ...
    1341             {'*.png', ' (*.png)';
    1342             '*.png',  '.png files '; ...
    1343             '*.*', 'All Files (*.*)'}, ...
    1344             'Pick a mask file *.png',FileBase);
    1345         if ~ischar(FileName),return,end %abandon if the browser is cancelled
    1346         maskname=fullfile(PathName,FileName);
     1340        maskname=uigetfile_uvmat('pick a mask image file:',fullfile(RootPath,SubDir));
     1341
     1342%% display the selected field and related information
     1343if isempty(maskname)
     1344    set(handles.CheckMask,'Value',0)
     1345    return
     1346end
     1347%         [FileName, PathName, filterindex] = uigetfile( ...
     1348%             {'*.png', ' (*.png)';
     1349%             '*.png',  '.png files '; ...
     1350%             '*.*', 'All Files (*.*)'}, ...
     1351%             'Pick a mask file *.png',FileBase);
     1352%         if ~ischar(FileName),return,end %abandon if the browser is cancelled
     1353%         maskname=fullfile(PathName,FileName);
    13471354        [RootDir,SubDir,RootFile,tild,tild,tild,tild,tild,Mask.NomType]=fileparts_uvmat(maskname);
    13481355        Mask.Base=fullfile(RootDir,SubDir,RootFile);
    1349         Mask.NbSlice=1;
     1356 %       Mask.NbSlice=1;
    13501357        set(handles.CheckMask,'UserData',Mask);
    1351         set(handles.CheckMask,'BackgroundColor',[1 1 0])
     1358%         set(handles.CheckMask,'BackgroundColor',[1 1 0])
    13521359    end
    13531360    if isempty(errormsg)
Note: See TracChangeset for help on using the changeset viewer.