Changeset 84 for trunk/src/civ.m
- Timestamp:
- Apr 24, 2010, 2:07:22 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/civ.m
r82 r84 51 51 % handles structure with handles and user data (see GUIDATA) 52 52 % varargin command line arguments to civ (see VARARGIN) 53 global test_batch patch_newBin CivBin%=1 ifpatch processing available53 global patch_newBin %=1 if new patch processing available 54 54 %filebase: root name 55 55 %nom_type: nomencalture used ('png_old','_i_j'...) … … 127 127 test_batch=strcmp(sparam.BatchParam.BatchMode,'sge'); %sge is currently the only implemented batch mod 128 128 end 129 % if isfield(sparam,'PatchNewBin')130 % patch_newBin=sparam.PatchNewBin;131 % end132 % if isfield(sparam,'SGE')133 % sge=str2double(sparam.SGE);134 % end135 % test_batch=sge;%default136 129 if test_batch==0 130 set(handles.BATCH,'Enable','off')% put the BATCH button in grey (unactivated) 137 131 set(handles.BATCH,'BackgroundColor',[0.831 0.816 0.784])% put the BATCH button in grey (unactivated) 138 132 end … … 297 291 [RootPath,RootFile,str1,str2,str_a,str_b,ext,nom_type,subdir]=name2display(fileinput); 298 292 filebase=fullfile(RootPath,RootFile); 299 % if isequal(nom_type,'*')% all fields in a single file ( movie files)300 % num_i1=1;num_i2=1;num_j1=1;num_j2=1;301 % else302 293 num_i1=stra2num(str1); 303 294 if isempty(num_i1),num_i1=1;end … … 318 309 browse.nom_type_ima=nom_type; 319 310 browse.field_count=num_i1; 320 % A=imread(fileinput);321 % npxy=size(A);322 % set(handles.ImaExt,'UserData',npxy)323 311 end 324 312 set(handles.ImaDoc,'String',ext); … … 437 425 function RootName_Callback(hObject, eventdata, handles) 438 426 %------------------------------------------------------------------------ 439 global test_batch440 427 set(handles.compare,'Visible','on') 441 428 ext_ima=get(handles.ImaExt,'String'); … … 510 497 511 498 %%%%%%%% read image documentation file %%%%%%%%%%%%%%%%%%%%%%%%%%% 512 mode=''; %default 513 set(handles.ImaDoc,'BackgroundColor',[1 1 0]) 514 drawnow 515 %read the image documentation file if found 499 mode=''; %default 500 set(handles.ImaDoc,'BackgroundColor',[1 1 0]) 501 drawnow 516 502 if isequal(ext,'.civxml') || isequal(ext,'.xml')|| isequal(ext,'.civ') 517 503 set(handles.ref_i,'Visible','On')%use a reference index 518 504 set(handles.ref_j,'Visible','On') 519 % set(handles.dt,'Visible','Off')520 % set(handles.root_txt,'String','')521 505 elseif isequal(ext,'.avi') || isequal(ext,'.AVI') 522 506 set(handles.ref_j,'Visible','Off') 523 % set(handles.dt,'Visible','Off')524 % set(handles.root_txt,'String','ref. ind.')525 507 else 526 508 set(handles.ref_i,'Visible','Off') 527 509 set(handles.ref_j,'Visible','Off') 528 % set(handles.dt,'Visible','On')529 % set(handles.root_txt,'String','dt(ms)=')530 510 end 531 511 testima_xml=0; … … 538 518 elseif isequal(ext,'.xml') 539 519 [XmlData,warntext]=imadoc2struct([filebase '.xml']); 540 if isfield(XmlData,'Time')541 time=XmlData.Time;542 nbfield=size(time,1);543 nburst=size(time,2);544 end545 520 ext_ima_read=[]; 546 521 nom_type_read=[]; … … 550 525 if ~exist(fullname,'file') 551 526 msgbox_uvmat('WARNING',['FirstImage ' fullname ' defined in the xml file does not exist']) 527 end 528 end 529 if isfield(XmlData,'Time') 530 time=XmlData.Time 531 nbfield=size(time,1); 532 nburst=size(time,2); 533 %transform .Time to a column vector if it is a line vector the nomenclature uses a single index 534 if isequal(nbfield,1) && ~isequal(nburst,1)% .Time is a line vector 535 if numel(nom_type_read)>=2 && (strcmp(nom_type_read,'_i')||strcmp(nom_type_read(1:2),'%0')||strcmp(nom_type_read(1:2),'_%')) 536 time=time'; 537 nbfield=nburst; 538 nburst=1; 539 end 552 540 end 553 541 end … … 748 736 set(handles.RUN, 'Enable','On') 749 737 set(handles.RUN,'BackgroundColor',[1 0 0]) 750 if isequal(test_batch,1)%if batch installation is available 751 set(handles.BATCH, 'Enable','On') 738 if isequal(get(handles.BATCH, 'Enable'),'On') 752 739 set(handles.BATCH,'BackgroundColor',[1 0 0]) 753 740 end … … 3374 3361 filename=name_generator(filebase_ima1,num1_civ2(ifile),num_a_civ2(j),'.png',nom_type_imanew1); 3375 3362 if ~exist(filename,'file') 3376 A=read_image(cell2mat(filecell.ima1.civ2(ifile,j)), nom_type_ima2,num1_civ2(ifile));3363 A=read_image(cell2mat(filecell.ima1.civ2(ifile,j)),type_ima2,num1_civ2(ifile)); 3377 3364 imwrite(A,filename,'BitDepth',16); 3378 3365 end … … 3380 3367 filename=name_generator(filebase_ima2, num2_civ2(ifile),num_b_civ2(j),'.png',nom_type_imanew2); 3381 3368 if ~exist(filename,'file') 3382 A=read_image(cell2mat(filecell.ima2.civ2(ifile,j)), nom_type_ima2,num2.civ1(ifile));3369 A=read_image(cell2mat(filecell.ima2.civ2(ifile,j)),type_ima2,num2_civ2(ifile)); 3383 3370 imwrite(A,filename,'BitDepth',16); 3384 3371 end
Note: See TracChangeset
for help on using the changeset viewer.