- Timestamp:
- Nov 26, 2010, 5:43:24 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/civ.m
r136 r137 469 469 470 470 %default first_i and j and increments 471 first_i=str2 num(get(handles.first_i,'String'));%value possibly set by uvmat_Opening472 if is empty(first_i)|| first_i < 1471 first_i=str2double(get(handles.first_i,'String'));%value possibly set by uvmat_Opening 472 if isnan(first_i)|| first_i < 1 473 473 first_i=1; %default first_i 474 474 end 475 last_i=str2 num(get(handles.last_i,'String'));476 if is empty(last_i)|| last_i < first_i475 last_i=str2double(get(handles.last_i,'String')); 476 if isnan(last_i)|| last_i < first_i 477 477 last_i=first_i; %default last_i 478 478 end 479 first_j=str2 num(get(handles.first_j,'String'));480 if is empty(first_j)|| first_j < 1479 first_j=str2double(get(handles.first_j,'String')); 480 if isnan(first_j)|| first_j < 1 481 481 first_j=1; %default first_j 482 482 end 483 last_j=str2 num(get(handles.last_j,'String'));484 if is empty(last_j)|| last_j < first_j483 last_j=str2double(get(handles.last_j,'String')); 484 if isnan(last_j)|| last_j < first_j 485 485 last_j=first_j; %default last_j 486 486 end 487 incr_i=str2 num(get(handles.incr_i,'String'));488 if is empty(incr_i) || incr_i < 1;487 incr_i=str2double(get(handles.incr_i,'String')); 488 if isnan(incr_i) || incr_i < 1; 489 489 set(handles.incr_i,'String','1') %default incr_i 490 490 end 491 incr_j=str2 num(get(handles.incr_j,'String'));492 if is empty(incr_j) || incr_j < 1;491 incr_j=str2double(get(handles.incr_j,'String')); 492 if isnan(incr_j) || incr_j < 1; 493 493 set(handles.incr_j,'String','1') %default incr_j 494 494 end … … 696 696 697 697 %determine the set of times and possible intervals for CIV 698 % dt=(1/1000)*str2 num(get(handles.dt,'String'));698 % dt=(1/1000)*str2double(get(handles.dt,'String')); 699 699 time=(0:nbfield-1)';% time=file index -1 by default 700 700 if numel(regexp(nom_type_search,'\D'))>=1%two indices i and j … … 790 790 txt=ver; 791 791 Release=txt(1).Release; 792 relnumb=str2 num(Release(3:4));792 relnumb=str2double(Release(3:4)); 793 793 if relnumb >= 14 794 794 save (profil_perso,'RootPath','-V6'); %store the root name for future opening of uvmat … … 816 816 end 817 817 displ_num=[];%default 818 ref_i=str2 num(get(handles.ref_i,'String'));818 ref_i=str2double(get(handles.ref_i,'String')); 819 819 % last_i=str2num(get(handles.last_i,'String')); 820 820 time=get(handles.RootName,'UserData'); %get the set of times … … 1203 1203 % return 1204 1204 % end 1205 ref_i=str2 num(get(handles.ref_i_civ2,'String'));1205 ref_i=str2double(get(handles.ref_i_civ2,'String')); 1206 1206 if isequal(mode,'pair j1-j2')%|isequal(mode,'st_pair j1-j2') 1207 1207 ref_j=0; 1208 1208 else 1209 ref_j=str2 num(get(handles.ref_j_civ2,'String'));1209 ref_j=str2double(get(handles.ref_j_civ2,'String')); 1210 1210 end 1211 1211 time=get(handles.RootName,'UserData'); %get the set of times … … 1304 1304 val=get(handles.list_pair_civ2,'Value'); 1305 1305 ichoice=min(find(select)); 1306 if (isempty(ichoice) | ichoice < 1); ichoice=1; end;1307 if get(handles.CIV2,'Value')==0 & get(handles.CIV1,'Value')==0 & get(handles.FIX1,'Value')==0& get(handles.PATCH1,'Value')==01306 if (isempty(ichoice) || ichoice < 1); ichoice=1; end; 1307 if get(handles.CIV2,'Value')==0 && get(handles.CIV1,'Value')==0 && get(handles.FIX1,'Value')==0 && get(handles.PATCH1,'Value')==0 1308 1308 val=ichoice;% first valid pair proposed by default in the menu 1309 1309 end … … 1324 1324 last_i=str2double(get(handles.last_i,'String'));%last index i 1325 1325 incr=str2double(get(handles.incr_i,'String'));% increment 1326 num_i= [first_i:incr:last_i];% list of i indices (reference values for each pair)1326 num_i=first_i:incr:last_i;% list of i indices (reference values for each pair) 1327 1327 if isequal(get(handles.first_j,'Visible'),'on') 1328 1328 first_j=str2double(get(handles.first_j,'String'));%first index j … … 1362 1362 str_raw=str_civ1(indsel); 1363 1363 indsepar=find(str_raw=='|'); %character index of the separator 1364 d1=str2double(str_civ1( [indsel(indsepar-1)+1:indsel(indsepar)-1]));1364 d1=str2double(str_civ1(indsel(indsepar-1)+1:indsel(indsepar)-1)); 1365 1365 if indsepar==length(str_raw) 1366 d2=str2double(str_civ1( [indsel(indsepar)+1:end]));1366 d2=str2double(str_civ1(indsel(indsepar)+1:end)); 1367 1367 else 1368 d2=str2double(str_civ1( [indsel(indsepar)+1:indsel(indsepar+1)-1]));1368 d2=str2double(str_civ1(indsel(indsepar)+1:indsel(indsepar+1)-1)); 1369 1369 end 1370 1370 num1_civ1=num_i-d1;% set of first image numbers … … 1377 1377 str_raw=str_civ2(indsel); 1378 1378 indsepar=find(str_raw=='|'); %character index of the separator 1379 d1=str2 num(str_civ2([indsel(indsepar-1)+1:indsel(indsepar)-1]));1379 d1=str2double(str_civ2(indsel(indsepar-1)+1:indsel(indsepar)-1)); 1380 1380 if indsepar==length(str_raw) 1381 d2=str2 num(str_civ2([indsel(indsepar)+1:end]));1381 d2=str2double(str_civ2(indsel(indsepar)+1:end)); 1382 1382 else 1383 d2=str2 num(str_civ2([indsel(indsepar)+1:indsel(indsepar+1)-1]));1384 end 1385 if is empty(d1)1383 d2=str2double(str_civ2(indsel(indsepar)+1:indsel(indsepar+1)-1)); 1384 end 1385 if isnan(d1) 1386 1386 num1_civ2=num_i; 1387 1387 else 1388 1388 num1_civ2=num_i-d1;% set of first image numbers 1389 1389 end 1390 if is empty(d2)1390 if isnan(d2) 1391 1391 num2_civ2=num_i; 1392 1392 else … … 1397 1397 1398 1398 % adjust the first and last field number 1399 lastfield=str2 num(get(handles.nb_field,'String'));1399 lastfield=str2double(get(handles.nb_field,'String')); 1400 1400 if isequal(lastfield,[]) 1401 1401 indsel=find((num1_civ1 >= 1)&(num1_civ2 >= 1)); … … 1415 1415 end 1416 1416 elseif isequal (mode,'series(Dj)') 1417 lastfield_j=str2 num(get(handles.nb_field2,'String'));1417 lastfield_j=str2double(get(handles.nb_field2,'String')); 1418 1418 num1_civ1=num_i;% set of first image numbers 1419 1419 num2_civ1=num_i; … … 1425 1425 num_b_civ2=num_j+ceil(index_civ2/2)*ones(size(num_j)); 1426 1426 % adjust the first and last field number 1427 if is equal(lastfield_j,[])1427 if isnan(lastfield_j) 1428 1428 indsel=find((num_a_civ1 >= 1)&(num_a_civ2 >= 1)); 1429 1429 else … … 1471 1471 index_pair=get(handles.list_pair_civ1,'Value'); 1472 1472 displ_num=get(handles.list_pair_civ1,'UserData'); 1473 num_a=displ_num(1,index_pair);1474 num_b=displ_num(2,index_pair);1473 % num_a=displ_num(1,index_pair); 1474 % num_b=displ_num(2,index_pair); 1475 1475 list_pair2=get(handles.list_pair_civ2,'String');%get the menu of image pairs 1476 1476 if index_pair<=length(list_pair2) … … 1483 1483 mode=mode_list{mode_value}; 1484 1484 if isequal(mode,'series(Di)') 1485 first_i=str2 num(get(handles.first_i,'String'));1486 last_i=str2 num(get(handles.last_i,'String'));1487 incr_i=str2 num(get(handles.incr_i,'String'));1485 first_i=str2double(get(handles.first_i,'String')); 1486 last_i=str2double(get(handles.last_i,'String')); 1487 incr_i=str2double(get(handles.incr_i,'String')); 1488 1488 num1=first_i:incr_i:last_i; 1489 lastfield=str2 num(get(handles.nb_field,'String'));1490 if ~is equal(lastfield,[])1489 lastfield=str2double(get(handles.nb_field,'String')); 1490 if ~isnan(lastfield) 1491 1491 ind=find((num1-floor(index_pair/2)*ones(size(num1))>0)& ... 1492 1492 (num1+ceil(index_pair/2)*ones(size(num1))<=lastfield)); … … 1496 1496 set(handles.last_i,'String',num2str(num1(end))); 1497 1497 elseif isequal(mode,'series(Dj)') 1498 first_j=str2 num(get(handles.first_j,'String'));1499 last_j=str2 num(get(handles.last_j,'String'));1500 incr_j=str2 num(get(handles.incr_j,'String'));1498 first_j=str2double(get(handles.first_j,'String')); 1499 last_j=str2double(get(handles.last_j,'String')); 1500 incr_j=str2double(get(handles.incr_j,'String')); 1501 1501 num_j=first_j:incr_j:last_j; 1502 lastfield2=str2 num(get(handles.nb_field2,'String'));1503 if ~is equal(lastfield2,[])1502 lastfield2=str2double(get(handles.nb_field2,'String')); 1503 if ~isnan(lastfield2) 1504 1504 ind=find((num_j-floor(index_pair/2)*ones(size(num_j))>0)& ... 1505 1505 (num_j+ceil(index_pair/2)*ones(size(num_j))<=lastfield2)); … … 1521 1521 mode=mode_list{mode_value}; 1522 1522 if isequal(mode,'series(Di)') 1523 first_i=str2 num(get(handles.first_i,'String'));1524 last_i=str2 num(get(handles.last_i,'String'));1525 incr_i=str2 num(get(handles.incr_i,'String'));1523 first_i=str2double(get(handles.first_i,'String')); 1524 last_i=str2double(get(handles.last_i,'String')); 1525 incr_i=str2double(get(handles.incr_i,'String')); 1526 1526 num1=first_i:incr_i:last_i; 1527 lastfield=str2 num(get(handles.nb_field,'String'));1528 if ~is equal(lastfield,[])1527 lastfield=str2double(get(handles.nb_field,'String')); 1528 if ~isnan(lastfield) 1529 1529 ind=find((num1-floor(index_pair/2)*ones(size(num1))>0)& ... 1530 1530 (num1+ceil(index_pair/2)*ones(size(num1))<=lastfield)); … … 1534 1534 set(handles.last_i,'String',num2str(num1(end))); 1535 1535 elseif isequal(mode,'series(Dj)') 1536 first_j=str2 num(get(handles.first_j,'String'));1537 last_j=str2 num(get(handles.last_j,'String'));1538 incr_j=str2 num(get(handles.incr_j,'String'));1536 first_j=str2double(get(handles.first_j,'String')); 1537 last_j=str2double(get(handles.last_j,'String')); 1538 incr_j=str2double(get(handles.incr_j,'String')); 1539 1539 num_j=first_j:incr_j:last_j; 1540 lastfield2=str2 num(get(handles.nb_field2,'String'));1541 if ~is equal(lastfield2,[])1540 lastfield2=str2double(get(handles.nb_field2,'String')); 1541 if ~isnan(lastfield2) 1542 1542 ind=find((num_j-floor(index_pair/2)*ones(size(num_j))>0)& ... 1543 1543 (num_j+ceil(index_pair/2)*ones(size(num_j))<=lastfield2)); … … 1596 1596 end 1597 1597 1598 1599 1600 1598 %check mask if selecetd 1601 1599 if isequal(get(handles.get_mask_civ1,'Value'),1) … … 1624 1622 end 1625 1623 1626 %% initialize the waitbars 1624 %% initialize the waitbars: TO suppress, waitbar not used 1627 1625 set(handles.waitbar_1,'Position',[0.946 0.876 0.03 0.001]) 1628 1626 set(handles.waitbar_patch1,'Position',[0.946 0.439 0.03 0.001]) … … 1636 1634 [filecell,num1_civ1,num2_civ1,num_a_civ1,num_b_civ1,num1_civ2,num2_civ2,num_a_civ2,num_b_civ2,nom_type_nc]=... 1637 1635 set_civ_filenames(handles,compare,box_test); 1638 if isempty(filecell) 1636 if isempty(filecell)% (error message displayed in fct set_civ_filenames) 1639 1637 return 1640 1638 end 1641 filecell1642 1643 1639 nbfield=numel(num1_civ1); 1644 1640 nbslice=numel(num_a_civ1); … … 1887 1883 else 1888 1884 maskbase=[filecell.filebase '_' maskdispl]; % 1889 nbslice_mask=str2 num(maskdispl(1:end-4)); %1885 nbslice_mask=str2double(maskdispl(1:end-4)); % 1890 1886 num1_mask=mod(num1_civ1(ifile)-1,nbslice_mask)+1; 1891 1887 par_civ1.maskname=name_generator(maskbase,num1_mask,1,'.png','_i'); … … 1904 1900 gridname=get(handles.grid_civ1,'String'); 1905 1901 if isequal(gridname(end-3:end),'grid') 1906 nbslice_grid=str2 num(gridname(1:end-4)); %1907 if ~is empty(nbslice_grid)1902 nbslice_grid=str2double(gridname(1:end-4)); % 1903 if ~isnan(nbslice_grid) 1908 1904 num1_grid=mod(num1_civ1(ifile)-1,nbslice_grid)+1; 1909 1905 par_civ1.gridname=[filecell.filebase '_' name_generator(gridname,num1_grid,1,'.grid','_i')]; … … 1947 1943 else 1948 1944 maskdispl=get(handles.mask_fix1,'String'); 1949 nbslice_mask=str2 num(maskdispl(1:end-4)); %1945 nbslice_mask=str2double(maskdispl(1:end-4)); % 1950 1946 num1_mask=mod(num1_civ1(ifile)-1,nbslice_mask)+1; 1951 1947 maskbase=[filecell.filebase '_' maskdispl]; … … 1994 1990 gridname=get(handles.grid_patch1,'String'); 1995 1991 if isequal(gridname(end-3:end),'grid') 1996 nbslice_grid=str2 num(gridname(1:end-4)); %1997 if ~is empty(nbslice_grid)1992 nbslice_grid=str2double(gridname(1:end-4)); % 1993 if ~isnan(nbslice_grid) 1998 1994 num1_grid=mod(num1_civ1(ifile)-1,nbslice_grid)+1; 1999 1995 patch1.gridPatch=[filecell.filebase '_' name_generator(gridname,num1_grid,1,'.grid','_i')]; … … 2056 2052 else 2057 2053 maskbase=[filecell.filebase '_' maskdispl]; % 2058 nbslice_mask=str2 num(maskdispl(1:end-4)); %2054 nbslice_mask=str2double(maskdispl(1:end-4)); % 2059 2055 num1_mask=mod(num1_civ2(ifile)-1,nbslice_mask)+1; 2060 2056 par_civ2.maskname=name_generator(maskbase,num1_mask,1,'.png','_i'); … … 2068 2064 end 2069 2065 %TESTgrid 2070 test_grid=get(handles.browse_gridciv2,'Value');2066 %test_grid=get(handles.browse_gridciv2,'Value'); 2071 2067 gridname=get(handles.grid_civ2,'String'); 2072 gridflag='y';2068 %gridflag='y'; 2073 2069 if numel(gridname)>=4 && isequal(gridname(end-3:end),'grid') 2074 nbslice_grid=str2 num(gridname(1:end-4)); %2075 if ~is empty(nbslice_grid)2070 nbslice_grid=str2double(gridname(1:end-4)); % 2071 if ~isnan(nbslice_grid) 2076 2072 par_civ2.gridflag='y'; 2077 2073 num1_grid=mod(num1_civ2(ifile)-1,nbslice_grid)+1; … … 2123 2119 maskdispl=get(handles.mask_fix2,'String'); 2124 2120 maskbase=[filecell.filebase '_' maskdispl]; % 2125 nbslice_mask=str2 num(maskdispl(1:end-4)); %2121 nbslice_mask=str2double(maskdispl(1:end-4)); % 2126 2122 num1_mask=mod(num1_civ2(ifile)-1,nbslice_mask)+1; 2127 2123 maskname =name_generator(maskbase,num1_mask,1,'.png','_i'); … … 2169 2165 gridname=get(handles.grid_patch2,'String'); 2170 2166 if isequal(gridname(end-3:end),'grid') 2171 nbslice_grid=str2 num(gridname(1:end-4)); %2172 if ~is empty(nbslice_grid)2167 nbslice_grid=str2double(gridname(1:end-4)); % 2168 if ~isnan(nbslice_grid) 2173 2169 num1_grid=mod(num1_civ2(ifile)-1,nbslice_grid)+1; 2174 2170 patch2.gridPatch=[filecell.filebase '_' name_generator(gridname,num1_grid,1,'.grid','_i')]; … … 2241 2237 end 2242 2238 2243 2244 if ~batch%TODO: a revoir, cas 'run as background task' 2239 if ~batch 2245 2240 [Rootbat,Filebat,extbat]=fileparts(filename_cmx); 2246 2241 filename_superbat=fullfile(Rootbat,['job_list.bat']); … … 2255 2250 end 2256 2251 2257 2258 %save interface state 2252 %% save interface state 2259 2253 if isfield(filecell,'nc') 2260 2254 if isfield(filecell.nc,'civ2') … … 2294 2288 end 2295 2289 2296 filebase=regexprep(filebase,'\.fsnet','fsnet');% temporary fix for cluster Coriolis2290 %filebase=regexprep(filebase,'\.fsnet','fsnet');% temporary fix for cluster Coriolis 2297 2291 filecell.filebase=filebase; 2298 2292 … … 2308 2302 mode=mode_list{mode_value}; 2309 2303 end 2310 time=get(handles.RootName,'UserData'); %get the set of times2304 %time=get(handles.RootName,'UserData'); %get the set of times 2311 2305 ext_ima=get(handles.ImaExt,'String'); 2312 2306 nom_type_nc=browse.nom_type_nc; … … 2358 2352 ref=get(handles.ref_fix1,'UserData');%read data on the ref file stored by get_ref_fix1_Callback 2359 2353 if ~isempty(ref) 2360 first_i=str2 num(get(handles.first_i,'String'));2361 last_i=str2 num(get(handles.last_i,'String'));2362 incr_i=str2 num(get(handles.incr_i,'String'));2363 first_j=str2 num(get(handles.first_j,'String'));2364 last_j=str2 num(get(handles.last_j,'String'));2365 incr_j=str2 num(get(handles.incr_j,'String'));2354 first_i=str2double(get(handles.first_i,'String')); 2355 last_i=str2double(get(handles.last_i,'String')); 2356 incr_i=str2double(get(handles.incr_i,'String')); 2357 first_j=str2double(get(handles.first_j,'String')); 2358 last_j=str2double(get(handles.last_j,'String')); 2359 incr_j=str2double(get(handles.incr_j,'String')); 2366 2360 num_i_ref=first_i:incr_i:last_i; 2367 2361 num_j_ref=first_j:incr_j:last_j; … … 2485 2479 vers=0; 2486 2480 subdir_civ1_new=subdir_civ1; 2487 while detect==1 %create a new subdir if the netcdf files already exist 2481 ind_test=0; 2482 while detect==1 && ind_test<10%create a new subdir if the netcdf files already exist 2488 2483 for ifile=1:nbfield 2489 2484 for j=1:nbslice … … 2491 2486 detect=exist(filename,'file')==2; 2492 2487 if detect% if a netcdf file already exists 2493 indstr=regexp(subdir_civ1 ,'\D');2494 if indstr(end)<length(subdir_civ1 ) %subdir_civ1 ends by a number2495 vers=str2double(subdir_civ1 (indstr(end)+1:end))+1;2496 subdir_civ1_new=[subdir_civ1 (1:indstr(end)) num2str(vers)];2488 indstr=regexp(subdir_civ1_new,'\D'); 2489 if indstr(end)<length(subdir_civ1_new) %subdir_civ1 ends by a number 2490 vers=str2double(subdir_civ1_new(indstr(end)+1:end))+1; 2491 subdir_civ1_new=[subdir_civ1_new(1:indstr(end)) num2str(vers)]; 2497 2492 else 2498 2493 vers=vers+1; 2499 subdir_civ1_new=[subdir_civ1 (1:indstr(end)) '_' num2str(vers)];2494 subdir_civ1_new=[subdir_civ1_new(1:indstr(end)) '_' num2str(vers)]; 2500 2495 end 2501 subdir_civ2=subdir_civ1 ;2496 subdir_civ2=subdir_civ1_new; 2502 2497 break 2503 2498 end … … 2529 2524 end 2530 2525 if strcmp(compare,'stereo PIV')&&(strcmp(mode,'pair j1-j2')||strcmp(mode,'series(Dj)')||strcmp(mode,'series(Di)'))%check second nc series 2531 % vers=0;2532 % subdir_civ1_new=subdir_civ1;2533 2526 for ifile=1:nbfield 2534 2527 for j=1:nbslice … … 2536 2529 detect=exist(filename,'file')==2; 2537 2530 if detect% if a netcdf file already exists 2538 indstr=regexp(subdir_civ1 ,'\D');2539 if indstr(end)<length(subdir_civ1 ) %subdir_civ1 ends by a number2540 vers=str2double(subdir_civ1 (indstr(end)+1:end))+1;2541 subdir_civ1_new=[subdir_civ1 (1:indstr(end)) num2str(vers)];2531 indstr=regexp(subdir_civ1_new,'\D'); 2532 if indstr(end)<length(subdir_civ1_new) %subdir_civ1 ends by a number 2533 vers=str2double(subdir_civ1_new(indstr(end)+1:end))+1; 2534 subdir_civ1_new=[subdir_civ1_new(1:indstr(end)) num2str(vers)]; 2542 2535 else 2543 2536 vers=vers+1; 2544 subdir_civ1_new=[subdir_civ1 '_' num2str(vers)];2537 subdir_civ1_new=[subdir_civ1_new '_' num2str(vers)]; 2545 2538 end 2546 2539 subdir_civ2=subdir_civ1; … … 2553 2546 end 2554 2547 end 2555 % subdir_civ1=subdir_civ1_new;2556 2548 %create the new subdir_civ1 2557 2549 if exist(fullfile(Path_ima,subdir_civ1_new),'dir') … … 3093 3085 %------------------------------------------------------------------------ 3094 3086 % last_i_Callback(hObject, eventdata, handles) 3095 first_i=str2 num(get(handles.first_i,'String'));3087 first_i=str2double(get(handles.first_i,'String')); 3096 3088 % last_i=str2num(get(handles.last_i,'String')); 3097 3089 % ref_i=ceil((first_i+last_i)/2); … … 3123 3115 mode=mode_list{mode_value}; 3124 3116 if isequal (mode, 'series(Di)' ) 3125 ref_i=str2 num(get(handles.ref_i,'String'));3117 ref_i=str2double(get(handles.ref_i,'String')); 3126 3118 num1=ref_i-floor(index/2);% first image numbers 3127 3119 num2=ref_i+ceil(index/2); … … 3131 3123 num1=1; 3132 3124 num2=1; 3133 ref_j=str2 num(get(handles.ref_j,'String'));3125 ref_j=str2double(get(handles.ref_j,'String')); 3134 3126 num_a=ref_j-floor(index/2);% first image numbers 3135 3127 num_b=ref_j+ceil(index/2); 3136 3128 elseif isequal(mode,'pair j1-j2') %case of bursts (png_old or png_2D) 3137 ref_i=str2 num(get(handles.ref_i,'String'));3129 ref_i=str2double(get(handles.ref_i,'String')); 3138 3130 num1=ref_i; 3139 3131 num2=ref_i; … … 3142 3134 end 3143 3135 dt=time(num2,num_b)-time(num1,num_a); 3144 ibx=str2 num(get(handles.ibx,'String'));3145 iby=str2 num(get(handles.iby,'String'));3146 umin=dt*pxcmx*str2 num(get(handles.umin,'String'));3147 umax=dt*pxcmx*str2 num(get(handles.umax,'String'));3148 vmin=dt*pxcmy*str2 num(get(handles.vmin,'String'));3149 vmax=dt*pxcmy*str2 num(get(handles.vmax,'String'));3136 ibx=str2double(get(handles.ibx,'String')); 3137 iby=str2double(get(handles.iby,'String')); 3138 umin=dt*pxcmx*str2double(get(handles.umin,'String')); 3139 umax=dt*pxcmx*str2double(get(handles.umax,'String')); 3140 vmin=dt*pxcmy*str2double(get(handles.vmin,'String')); 3141 vmax=dt*pxcmy*str2double(get(handles.vmax,'String')); 3150 3142 shiftx=round((umin+umax)/2); 3151 3143 shifty=round((vmin+vmax)/2); … … 3379 3371 ind_mask=findstr('mask',Name); 3380 3372 i=ind_mask-1; 3381 while val(i)==0 & i>03373 while val(i)==0 && i>0 3382 3374 i=i-1; 3383 3375 end 3384 nbslice=str2 num(Name(i+1:ind_mask-1));3385 if ~is equal(nbslice,[])& Name(i)=='_'3376 nbslice=str2double(Name(i+1:ind_mask-1)); 3377 if ~isnan(nbslice) && Name(i)=='_' 3386 3378 flag_mask=1; 3387 3379 else … … 3411 3403 ind_mask=findstr('grid',Name); 3412 3404 i=ind_mask-1; 3413 while val(i)==0 & i>03405 while val(i)==0 && i>0 3414 3406 i=i-1; 3415 3407 end 3416 nbslice=str2 num(Name(i+1:ind_mask-1));3417 if ~is equal(nbslice,[])& Name(i)=='_'3408 nbslice=str2double(Name(i+1:ind_mask-1)); 3409 if ~isnan(nbslice) && Name(i)=='_' 3418 3410 flag_mask=1; 3419 3411 else
Note: See TracChangeset
for help on using the changeset viewer.