Changeset 339 for trunk/src/civ.m


Ignore:
Timestamp:
Dec 19, 2011, 10:12:56 AM (12 years ago)
Author:
sommeria
Message:

name2display replaced by fileparts_uvmat and find_file_series in series.
name2display partially replaced in civ.m (to be continued)
series.fig reorganized with panels.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ.m

    r336 r339  
    183183    end
    184184end
    185 [RootPath,RootFile,str1,str2,str_a,str_b,ext,nom_type,subdir]=name2display(fileinput);
     185%[RootPath,RootFile,str1,str2,str_a,str_b,FileExt,NomType,subdir]=name2display(fileinput);
     186[~,~,~,i1,i2,j1,j2,FileExt,NomType]=fileparts_uvmat(fileinput);
    186187% filebase=fullfile(RootPath,RootFile);
    187 num_i1=str2double(str1);
    188 if isnan(num_i1),num_i1=1;end
    189 num_i2=str2double(str2);
    190 if isnan(num_i2),num_i2=num_i1;end
    191 num_j1=stra2num(str_a);
    192 if isnan(num_j1),num_j1=1;end
    193 num_j2=stra2num(str_b);
    194 if isnan(num_j2),num_j2=num_j1;end
     188if isempty(i1),i1=1;end
     189if isempty(i2),i2=i1;end
     190if isempty(j1),j1=1;end
     191if isempty(j2),j2=j1;end
    195192if isequal(get(handles.ListCompareMode,'Value'),1)
    196193    browse=[];%initialisation
     
    198195    browse=get(handles.RootName,'UserData');
    199196end
    200 browse.num_i1=num_i1;
    201 browse.num_i2=num_i2;
    202 browse.num_j1=num_j1;
    203 browse.num_j2=num_j2;
    204 if length(ext)>1 && (~isempty(imformats(ext(2:end)))||strcmpi(ext,'.avi'));%if an image file has been opened by uvmat
    205     browse.nom_type_ima=nom_type;
    206     browse.ext_ima=ext;
    207     set(handles.ImaExt,'String',ext)
    208 end
    209 set(handles.ImaDoc,'String',ext);
     197browse.num_i1=i1;
     198browse.num_i2=i2;
     199browse.num_j1=j1;
     200browse.num_j2=j2;
     201if length(FileExt)>1 && (~isempty(imformats(FileExt(2:end)))||strcmpi(FileExt,'.avi'));%if an image file has been opened by uvmat
     202    browse.nom_type_ima=NomType;
     203    browse.ext_ima=FileExt;
     204    set(handles.ImaExt,'String',FileExt)
     205end
     206set(handles.ImaDoc,'String',FileExt);
    210207
    211208set(handles.RootName,'UserData',browse);% store information from browser
     
    335332nom_type_ima='';%default
    336333nom_type_nc='';
    337 [RootPath,FileName,i1_str,i2_str,j1_str,j2_str,ext_input,nom_type_input,subdir]=name2display(fileinput);
    338 RootName=fullfile(RootPath,FileName);
     334[RootPath,RootFile,i1_str,i2_str,j1_str,j2_str,ext_input,nom_type_input,subdir]=name2display(fileinput);
     335%[RootPath,subdir,RootFile,i1,i2,j1,j2,ext_input,nom_type_input]=fileparts_uvmat(fileinput);TODO: use to replace name2display
     336RootName=fullfile(RootPath,RootFile);
    339337set(handles.RootName,'String',RootName)
    340338set(handles.RootName,'BackgroundColor',[1 1 0])%paint RootName edit box in yellow to indicate that the file input is proceeding
Note: See TracChangeset for help on using the changeset viewer.