Changeset 339 for trunk/src/civ.m
- Timestamp:
- Dec 19, 2011, 10:12:56 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/civ.m
r336 r339 183 183 end 184 184 end 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); 186 187 % 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 188 if isempty(i1),i1=1;end 189 if isempty(i2),i2=i1;end 190 if isempty(j1),j1=1;end 191 if isempty(j2),j2=j1;end 195 192 if isequal(get(handles.ListCompareMode,'Value'),1) 196 193 browse=[];%initialisation … … 198 195 browse=get(handles.RootName,'UserData'); 199 196 end 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 uvmat205 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);197 browse.num_i1=i1; 198 browse.num_i2=i2; 199 browse.num_j1=j1; 200 browse.num_j2=j2; 201 if 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) 205 end 206 set(handles.ImaDoc,'String',FileExt); 210 207 211 208 set(handles.RootName,'UserData',browse);% store information from browser … … 335 332 nom_type_ima='';%default 336 333 nom_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 336 RootName=fullfile(RootPath,RootFile); 339 337 set(handles.RootName,'String',RootName) 340 338 set(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.