Changeset 36 for trunk/src/civ.m
- Timestamp:
- Mar 5, 2010, 11:23:19 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/civ.m
r16 r36 1315 1315 find_pair_indices(handles,mode) 1316 1316 %------------------------------------------------------------------------ 1317 first_i=str2num(get(handles.first_i,'String')); 1318 last_i=str2num(get(handles.last_i,'String')); 1319 incr=str2num(get(handles.incr_i,'String')); 1320 num1=[first_i:incr:last_i]; 1317 first_i=str2num(get(handles.first_i,'String'));%first index i 1318 last_i=str2num(get(handles.last_i,'String'));%last index i 1319 incr=str2num(get(handles.incr_i,'String'));% increment 1320 num1=[first_i:incr:last_i];% list of i indices (reference values for each pair) 1321 1321 if isequal(get(handles.first_j,'Visible'),'on') 1322 first_j=str2num(get(handles.first_j,'String')); 1323 last_j=str2num(get(handles.last_j,'String')); 1324 incr_j=str2num(get(handles.incr_j,'String')); 1322 first_j=str2num(get(handles.first_j,'String'));%first index j 1323 last_j=str2num(get(handles.last_j,'String'));%last index j 1324 incr_j=str2num(get(handles.incr_j,'String'));% increment 1325 1325 else 1326 1326 first_j=1; … … 1328 1328 incr_j=1; 1329 1329 end 1330 num_j=[first_j:incr_j:last_j]; 1330 num_j=[first_j:incr_j:last_j];% list of j indices (reference values for each pair) 1331 1331 list_civ1=get(handles.list_pair_civ1,'String'); 1332 1332 index_civ1=get(handles.list_pair_civ1,'Value'); 1333 str_civ1=list_civ1{index_civ1}; 1333 str_civ1=list_civ1{index_civ1};%string defining the image pairs for civ1 1334 1334 if isempty(str_civ1)||isequal(str_civ1,'') 1335 1335 msgbox_uvmat('ERROR','no image pair selected for civ1') … … 1342 1342 index_civ2=index_civ1; 1343 1343 end 1344 str_civ2=list_civ2{index_civ2}; 1345 if ise qual(first_i,[])|isequal(first_j,[]), errordlg('first field number not defined'),...1346 set(handles.RUN, 'Enable','On'), set(handles.RUN,'BackgroundColor',[1 0 0]),return,end;1347 if isequal(last_i,[])| isequal(last_j,[]), errordlg('last field number not defined'),...1348 set(handles.RUN, 'Enable','On'), set(handles.RUN,'BackgroundColor',[1 0 0]),return,end;1349 if isequal(incr,[])| isequal(incr_j,[]), errordlg('increment in field number not defined'),...1350 set(handles.RUN, 'Enable','On'), set(handles.RUN,'BackgroundColor',[1 0 0]),return,end;1351 if last_i < first_i | last_j < first_j , errordlg('last field number must be larger than the first one'),...1352 set(handles.RUN, 'Enable','On'), set(handles.RUN,'BackgroundColor',[1 0 0]),return,end;1353 if isequal (mode,'series(Di)') % |isequal(mode,'st_series(Di)')1344 str_civ2=list_civ2{index_civ2};%string defining the image pairs for civ2 1345 if isempty(first_i)||isempty(first_j), msgbox_uvmat('ERROR','first field number not defined'),... 1346 return,end; 1347 if isequal(last_i,[])| isequal(last_j,[]),msgbox_uvmat('ERROR','last field number not defined'),... 1348 return,end; 1349 if isequal(incr,[])| isequal(incr_j,[]),msgbox_uvmat('ERROR','increment in field number not defined'),... 1350 return,end; 1351 if last_i < first_i | last_j < first_j , msgbox_uvmat('ERROR','last field number must be larger than the first one'),... 1352 return,end; 1353 if isequal (mode,'series(Di)') 1354 1354 %recognize the pair civ1 from the display 1355 1355 indsel=find((double(str_civ1)<48)|(double(str_civ1)>57));% character indices of non numerical characters … … 1408 1408 num2_civ2=num2_civ2(indsel); 1409 1409 end 1410 elseif isequal (mode,'series(Dj)') %|isequal (mode,'st_series(Dj)')1410 elseif isequal (mode,'series(Dj)') 1411 1411 lastfield_j=str2num(get(handles.nb_field2,'String')); 1412 1412 num1_civ1=num1;% set of first image numbers … … 1435 1435 num_b_civ2=num_b_civ2(indsel); 1436 1436 end 1437 elseif isequal(mode,'pair j1-j2') % | isequal(mode,'st_pair j1-j2')%case of bursts (png_old or png_2D)1437 elseif isequal(mode,'pair j1-j2') %case of bursts (png_old or png_2D) 1438 1438 num1_civ1=num1; 1439 1439 num1_civ2=num1; … … 1455 1455 num_b_civ2=num_j; 1456 1456 end 1457 'TESTfind' 1458 num1_civ1 1459 num2_civ1 1460 num_a_civ1 1461 num_b_civ1 1457 1462 1458 1463 %------------------------------------------------------------------------ … … 1659 1664 [filecell,num1_civ1,num2_civ1,num_a_civ1,num_b_civ1,num1_civ2,num2_civ2,num_a_civ2,num_b_civ2,nom_type_nc,file_ref_fix1,file_ref_fix2]=... 1660 1665 set_civ_filenames(handles,compare,box_test); 1666 'TESTnbre_RUN' 1667 nbfield=size(num1_civ1,2) 1668 nbslice=size(num1_civ1,1) 1669 1661 1670 if isempty(filecell) 1662 1671 set(handles.RUN, 'Enable','On') … … 2176 2185 set_civ_filenames(handles,compare,box_test); 2177 2186 display('files OK, processing...') 2178 nbfield=size(num1_civ1,2); 2179 nbslice=size(num1_civ1,1); 2187 'TESTnbre' 2188 nbfield=size(num1_civ1,2) 2189 nbslice=size(num1_civ1,1) 2180 2190 2181 2191 %GET PARAMETERS: … … 3504 3514 textout=char(textcmx); 3505 3515 % dlmwrite(filename_cmx,textout,''); 3506 3507 filename_ima3508 filename_ima_13509 3516 fid=fopen([filename_cmx],'w'); 3510 3517 fprintf(fid, ['############## CMX file' '\n']); … … 4956 4963 path_to_uvmat=which ('uvmat');% check the path of uvmat 4957 4964 pathelp=fileparts(path_to_uvmat); 4958 helpfile=fullfile(pathelp,'UVMAT_DOC','uvmat_doc.html'); 4959 if isempty(dir(helpfile)), errordlg('Please put the help file uvmat_doc.html in the directory UVMAT/UVMAT_DOC') 4960 else 4961 web([helpfile '#civ']) 4965 helpfile=fullfile(pathelp,'uvmat_doc','uvmat_doc.html'); 4966 if isempty(dir(helpfile)), msgbox_uvmat('ERROR','Please put the help file uvmat_doc.html in the sub-directory /uvmat_doc of the UVMAT package') 4967 else 4968 addpath (fullfile(pathelp,'uvmat_doc')) 4969 web([helpfile '#civ']) 4962 4970 end 4963 4971
Note: See TracChangeset
for help on using the changeset viewer.