Changeset 298 for trunk/src/uvmat.m


Ignore:
Timestamp:
Nov 24, 2011, 4:33:06 PM (9 years ago)
Author:
sommeria
Message:

improve the input to the civ GUI

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/uvmat.m

    r296 r298  
    867867    get(handles.MenuFile_3,'Label');get(handles.MenuFile_4,'Label');get(handles.MenuFile_5,'Label')];
    868868   
    869 for ifile=1:length(MenuFile)
     869for ifile=1:min(length(MenuFile),5)
    870870    eval(['set(handles.MenuFile_' num2str(ifile) ',''Label'',MenuFile{ifile});'])
    871871    eval(['set(handles.MenuFile_' num2str(ifile) '_1,''Label'',MenuFile{ifile});'])
     
    46744674function MenuPIV_Callback(hObject, eventdata, handles)
    46754675%------------------------------------------------------------------------
    4676  
    4677 [FileName,RootPath,filebase,FileIndices,ext,SubDir]=read_file_boxes(handles);
    4678 num1=stra2num(get(handles.i1,'String'));
    4679 num2=stra2num(get(handles.i2,'String'));
    4680 num_a=stra2num(get(handles.j1,'String'));
    4681 num_b=stra2num(get(handles.j2,'String'));
    4682 NomType=get(handles.FileIndex,'UserData');
    4683 ind_opening=1; % default (images): will advice civ1 option by default in the civ interface
    4684 if isequal(ext,'.nc') ||  isequal(ext,'.cdf')% netcdf files
    4685     ind_opening=2;% propose 'fix' as the default option
    4686 % +read the current netcdf rootfile
    4687     Data=nc2struct(FileName,'ListGlobalAttribute','fix','patch','civ2','fix2');
    4688     if isfield(Data,'fix') && isequal(Data.fix,1)
    4689         ind_opening=3;
    4690     end
    4691     if isfield(Data,'patch') && isequal(Data.patch,1)
    4692         ind_opening=4;
    4693     end
    4694     if isfield(Data,'civ2') && isequal(Data.civ2,1)
    4695         ind_opening=5;
    4696     end
    4697     if isfield(Data,'fix2') && isequal(Data.fix2,1)
    4698         ind_opening=6;
    4699     end
    4700 end     
    4701 param.RootName=filebase;
    4702 param.NomType=NomType;
    4703 param.num1=num1;
    4704 param.num2=num2;
    4705 param.num_a=num_a;
    4706 param.num_b=num_b;
    4707 param.SubDir=SubDir;
    4708 param.IndOpening=ind_opening;% A REVOIR +TRANSMETTRE IMADOC INFO
    4709 param.ImaExt=ext;
    4710 civ(param);% interface de civ(not in the uvmat file)
     4676 FileName=read_file_boxes(handles);
     4677%[FileName,RootPath,filebase,FileIndices,ext,SubDir]=read_file_boxes(handles)
     4678% num1=stra2num(get(handles.i1,'String'));
     4679% num2=stra2num(get(handles.i2,'String'));
     4680% num_a=stra2num(get(handles.j1,'String'));
     4681% num_b=stra2num(get(handles.j2,'String'));
     4682% NomType=get(handles.FileIndex,'UserData');
     4683% ind_opening=1; % default (images): will advice civ1 option by default in the civ interface
     4684% if isequal(ext,'.nc') ||  isequal(ext,'.cdf')% netcdf files
     4685%     ind_opening=2;% propose 'fix' as the default option
     4686% % +read the current netcdf rootfile
     4687%     Data=nc2struct(FileName,'ListGlobalAttribute','fix','patch','civ2','fix2');
     4688%     if isfield(Data,'fix') && isequal(Data.fix,1)
     4689%         ind_opening=3;
     4690%     end
     4691%     if isfield(Data,'patch') && isequal(Data.patch,1)
     4692%         ind_opening=4;
     4693%     end
     4694%     if isfield(Data,'civ2') && isequal(Data.civ2,1)
     4695%         ind_opening=5;
     4696%     end
     4697%     if isfield(Data,'fix2') && isequal(Data.fix2,1)
     4698%         ind_opening=6;
     4699%     end
     4700% end     
     4701% param.RootName=filebase;
     4702% param.NomType=NomType;
     4703% param.num1=num1;
     4704% param.num2=num2;
     4705% param.num_a=num_a;
     4706% param.num_b=num_b;
     4707% param.SubDir=SubDir;
     4708% param.IndOpening=ind_opening;% A REVOIR +TRANSMETTRE IMADOC INFO
     4709% param.ImaExt=ext;
     4710civ(FileName);% interface de civ(not in the uvmat file)
    47114711
    47124712%------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.