Changeset 41 for trunk/src/civ.m


Ignore:
Timestamp:
Mar 10, 2010, 11:03:36 AM (15 years ago)
Author:
sommeria
Message:

-relabel_i_j: improve the question dlg box for image transform
-aver_stat,time_series,merge_proj: include modification of field transform and call of set_object.
-series: introduce a browser for set_object
-ima2vol: create volume images (png images of a slice concacened along y) for PIV 3D
-set_object: suppress TITLE, introduce Tooltip helps for parameters
-civ: fixed bug on BATCH sequences

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ.m

    r39 r41  
    721721
    722722        %%%%%%%%%%%  set the menus of image pairs and default selection for civ   %%%%%%%%%%%%%%%%%%%
    723 if isequal(nom_type_ima,'_i')| isequal(nom_type_nc,'_i1-i2')|~exist('nbfield2','var')|(nbfield2==1)
     723if isequal(nom_type_ima,'_i')|| isequal(nom_type_nc,'_i1-i2')||~(exist('nbfield2','var')&&(nbfield2~=1))
    724724    set(handles.mode,'String',{'series(Di)'})
    725725    set(handles.mode,'Value',1)
    726 elseif isequal(nom_type_ima,'png_old')|isequal(nom_type_nc,'netc_old')
     726elseif isequal(nom_type_ima,'png_old')||isequal(nom_type_nc,'netc_old')
    727727    set(handles.mode,'String',{'pair j1-j2'})
    728728    set(handles.mode,'Value',1)
     
    732732else
    733733    set(handles.mode,'String',{'pair j1-j2';'series(Dj)';'series(Di)'})%multiple choice
    734     if isequal(mode,'volume')
    735         set(handles.mode,'Value',3)
    736     elseif nbfield2 <= 5
    737         set(handles.mode,'Value',1)% advice 'pair j1-j2' for small bursts
    738     else
    739         set(handles.mode,'Value',2)% advice series Dj for long bursts, not volume
    740     end
     734    if nbfield2 <= 5
     735         set(handles.mode,'Value',1)% advice 'pair j1-j2' for small burst
     736    end
     737%     else
     738%     if isequal(mode,'volume')
     739%         set(handles.mode,'Value',3)
     740%     elseif nbfield2 <= 5
     741%         set(handles.mode,'Value',1)% advice 'pair j1-j2' for small bursts
     742%     else
     743%         set(handles.mode,'Value',2)% advice series Dj for long bursts, not volume
     744%     end
    741745end
    742746
     
    13311335list_civ1=get(handles.list_pair_civ1,'String');
    13321336index_civ1=get(handles.list_pair_civ1,'Value');
    1333 [num_i,num_j]=meshgrid(num_i,num_j);
    13341337str_civ1=list_civ1{index_civ1};%string defining the image pairs for civ1
    13351338if isempty(str_civ1)||isequal(str_civ1,'')
     
    14571460end
    14581461
     1462
    14591463%------------------------------------------------------------------------
    14601464% --- Executes on selection change in list_pair_civ1.
     
    16601664[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]=...
    16611665       set_civ_filenames(handles,compare,box_test);
    1662 nbfield=size(num1_civ1,2);
    1663 nbslice=size(num1_civ1,1);
     1666nbfield=numel(num1_civ1);
     1667nbslice=size(num_a_civ1);
    16641668
    16651669if isempty(filecell)
     
    21792183[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]=...
    21802184       set_civ_filenames(handles,compare,box_test);
     2185 
    21812186display('files OK, processing...') 
    2182 nbfield=size(num1_civ1,2);
    2183 nbslice=size(num1_civ1,1);
     2187nbfield=numel(num1_civ1);
     2188nbslice=numel(num_a_civ1);
    21842189
    21852190%GET PARAMETERS:
     
    23142319time=get(handles.displ_filebase,'UserData'); %get the set of times
    23152320civAll=get(handles.Experimental,'Value'); % Boolean for new civ excution method
     2321'TESTbatch'
     2322size(filecell.nc.civ1)
     2323nbslice
     2324nbfield
    23162325for ifile=1:nbfield
    23172326    for j=1:nbslice
     
    23302339        end
    23312340%         filecell.nc.civ1
    2332         filename_cmx=cell2mat(filecell.nc.civ1(ifile,j));%output netcdf file
    2333         filename_cmx([end-1:end])='cm';%name of cmx file
     2341        filename_cmx=filecell.nc.civ1{ifile,j}%output netcdf file
     2342        filename_cmx(end-1:end)='cm';%name of cmx file
    23342343        filename_cmx=[filename_cmx 'x'];
    23352344       
    23362345   %CIV1
    23372346        if box_test(1)==1
    2338             par_civ1.filename_ima_a=cell2mat(filecell.ima1.civ1(ifile,j));
     2347            par_civ1.filename_ima_a=filecell.ima1.civ1{ifile,j};
    23392348           % par_civ1.filename_ima_a([end-3:end])=[];%remove .png extension
    2340             par_civ1.filename_ima_b=cell2mat(filecell.ima2.civ1(ifile,j));
     2349            par_civ1.filename_ima_b=filecell.ima2.civ1{ifile,j};
    23412350           % par_civ1.filename_ima_b([end-3:end])=[];%remove .png extension
    23422351         
     
    27412750%         .ncA.civ1{i,j}, .ncA.civ2{i,j}; set of nc files for PIV results with camA (then .nc corresponds to camB)
    27422751%         .st{i,j};   set of nc files for the combined stereo fields
     2752% num1_civ1(i),num2_civ1(i): lists of first and last i indices for civ1
     2753% num_a_civ1(j),num_b_civ1(j): lists of first and last j indices for civ1
     2754% num1_civ2(i),num2_civ2(i): lists of first and last i indices for civ2
     2755% num_a_civ2(j),num_b_civ2(j): lists of first and last j indices for civ2
     2756% nom_type_nc: nomenclature type for velocity files
     2757% file_ref_fix1,file_ref_fix2: reference files possibly used by Fix1 and 2
    27432758function [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]=...
    27442759    set_civ_filenames(handles,compare,box_test)
Note: See TracChangeset for help on using the changeset viewer.