Changeset 73 for trunk/src


Ignore:
Timestamp:
Mar 30, 2010, 11:50:35 PM (15 years ago)
Author:
sommeria
Message:

ima2vol: provides volume images in 16 bit (presently needed for the software 3D3C)
set_grid: small bug repairs
uvmat: small bug repairs.
civ: bug repair following previous changes (RUN and BATCH functions merged)
plot_field: cleaning of parameter transmission. Introduction of a parameter handle of a text box (not yet used)

Location:
trunk/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ.m

    r71 r73  
    5151% handles    structure with handles and user data (see GUIDATA)
    5252% varargin   command line arguments to civ (see VARARGIN)
    53 global test_batch patch_newBin%=1 if patch processing available
     53global test_batch patch_newBin CivBin%=1 if patch processing available
    5454%filebase: root name
    5555%nom_type: nomencalture used ('png_old','_i_j'...)
     
    295295   end
    296296end
    297 [RootPath,RootFile,str1,str2,str_a,str_b,ext,nom_type,subdir]=name2display(fileinput);
     297[RootPath,RootFile,str1,str2,str_a,str_b,ext,nom_type,subdir]=name2display(fileinput)
    298298filebase=fullfile(RootPath,RootFile);
    299299% if isequal(nom_type,'*')% all fields in a single file ( movie files)
     
    303303if isempty(num_i1),num_i1=1;end
    304304num_i2=stra2num(str2);
    305 if isempty(num_i2),num_i2=1;end
     305if isempty(num_i2),num_i2=num_i1;end
    306306num_j1=stra2num(str_a);
    307307if isempty(num_j1),num_j1=1;end
    308308num_j2=stra2num(str_b);
    309 if isempty(num_j2),num_j2=1;end
     309if isempty(num_j2),num_j2=num_j1;end
    310310if isequal(get(handles.compare,'Value'),1)
    311311    browse=[];%initialisation
     
    355355set(handles.ImaDoc,'String',ext);
    356356if ~isempty(num_i1)
    357     ref_i=num_i1;
     357    ref_i=num_i1
     358    'TEStbrowse'
     359    num_i2
    358360    if ~isempty(num_i2)
    359361        ref_i=floor((ref_i+num_i2)/2);% reference image number corresponding to the file
     
    537539    end
    538540elseif isequal(ext,'.xml')
    539     [XmlData,warntext]=imadoc2struct([filebase '.xml'])
     541    [XmlData,warntext]=imadoc2struct([filebase '.xml']);
    540542    if isfield(XmlData,'Time')
    541543        time=XmlData.Time;
     
    10471049if isequal(mode,'series(Di)') %| isequal(mode,'st_series(Di)')
    10481050    if testpair
    1049               displ_pair{1}=['Di= ' num2str(-floor(browse.incr_pair(1)/2)) '|' num2str(ceil(browse.incr_pair(1)/2))];       
    1050 %     elseif ~isequal(get(handles.root_txt,'String'),'dt(ms)=')
    1051 %        for ipair=1:nbpair
    1052 %           if select(ipair) 
    1053 %               if size(time,1)>=ref_i+displ_num(4,ipair) && size(time,2)>=ref_j+displ_num(2,ipair)
    1054 %               dt=time(ref_i+displ_num(4,ipair),ref_j+displ_num(2,ipair))-time(ref_i+displ_num(3,ipair),ref_j+displ_num(1,ipair));%time interval dt
    1055 %               displ_pair{ipair}=['Di= ' num2str(-floor(ipair/2)) '|' num2str(ceil(ipair/2)) ' :dt= ' num2str(dt*1000)];
    1056 %               end
    1057 %           else
    1058 %              displ_pair{ipair}='...'; %pair not displayed in the menu
    1059 %           end
    1060 %        end
     1051        displ_pair{1}=['Di= ' num2str(-floor(browse.incr_pair(1)/2)) '|' num2str(ceil(browse.incr_pair(1)/2))];
     1052        %     elseif ~isequal(get(handles.root_txt,'String'),'dt(ms)=')
     1053        %        for ipair=1:nbpair
     1054        %           if select(ipair)
     1055        %               if size(time,1)>=ref_i+displ_num(4,ipair) && size(time,2)>=ref_j+displ_num(2,ipair)
     1056        %               dt=time(ref_i+displ_num(4,ipair),ref_j+displ_num(2,ipair))-time(ref_i+displ_num(3,ipair),ref_j+displ_num(1,ipair));%time interval dt
     1057        %               displ_pair{ipair}=['Di= ' num2str(-floor(ipair/2)) '|' num2str(ceil(ipair/2)) ' :dt= ' num2str(dt*1000)];
     1058        %               end
     1059        %           else
     1060        %              displ_pair{ipair}='...'; %pair not displayed in the menu
     1061        %           end
     1062        %        end
    10611063    else
    1062        for ipair=1:nbpair
    1063          if select(ipair)
    1064             displ_pair{ipair}=['Di= ' num2str(-floor(ipair/2)) '|' num2str(ceil(ipair/2)) ' :dt= ' num2str(dt_unit*ipair)];
    1065          else
    1066             displ_pair{ipair}='...'; %pair not displayed in the menu
    1067          end
    1068        end
     1064        for ipair=1:nbpair
     1065            if select(ipair)
     1066                if size(time,1)>=ref_i+displ_num(4,ipair) && size(time,2)>=ref_j+displ_num(2,ipair)
     1067                    dt=time(ref_i+displ_num(4,ipair),ref_j+displ_num(2,ipair))-time(ref_i+displ_num(3,ipair),ref_j+displ_num(1,ipair));%time interval dt
     1068                    displ_pair{ipair}=['Di= ' num2str(-floor(ipair/2)) '|' num2str(ceil(ipair/2)) ' :dt= ' num2str(dt*1000)];
     1069                else
     1070                    displ_pair{ipair}='...'; %pair not displayed in the menu
     1071                end
     1072            end
     1073        end
    10691074    end
    10701075elseif isequal(mode,'series(Dj)')%|isequal(mode,'st_series(Dj)')% series on the j index
     
    11901195end
    11911196%dt_unit=str2num(get(handles.dt,'String'));% used when there is no image documentation file
    1192 dt_unit=1000;
     1197%dt_unit=1000;
    11931198displ_num=get(handles.list_pair_civ1,'UserData');
    11941199
     
    20012006%------------------------------------------------------------------------
    20022007% global civ1_exe civ2_exe patch_exe patch_new_exe sge
    2003 
     2008set(handles.RUN, 'Enable','Off')
     2009set(handles.RUN,'BackgroundColor',[0.831 0.816 0.784])
    20042010batch=0;
    20052011launch_jobs(hObject, eventdata, handles,batch);
    2006 
     2012set(handles.RUN, 'Enable','On')
     2013set(handles.RUN,'BackgroundColor',[1 0 0])
    20072014
    20082015%------------------------------------------------------------------------
     
    20112018%------------------------------------------------------------------------
    20122019%global civ1_exe civ2_exe patch_exe patch_new_exe fix_exe todo_path sge Civ_exe % probabely to remove
     2020set(handles.BATCH, 'Enable','Off')
     2021set(handles.BATCH,'BackgroundColor',[0.831 0.816 0.784])
    20132022batch=1;
    20142023launch_jobs(hObject, eventdata, handles, batch)
     2024set(handles.BATCH, 'Enable','On')
     2025set(handles.BATCH,'BackgroundColor',[1 0 0])
    20152026
    20162027%------------------------------------------------------------------------
     
    20862097    s=convert(t);
    20872098end
    2088 % else
    2089 %     xmlfile=fullfile(path_UVMAT,'PARAM_WIN.xml');
    2090 %     if exist(xmlfile,'file')
    2091 %         t=xmltree(xmlfile);
    2092 %         sparam=convert(t);
    2093 %     end
    2094 % end
    2095 % batch=0;
    20962099if batch
    20972100    if isfield(s,'BatchParam')
     
    21132116end
    21142117if isfield(sparam,'CivBin')
    2115     CivBin=sparam.CivBin;
     2118    CivBin=sparam.CivBin
    21162119end
    21172120if isfield(sparam,'Civ1Bin')
     
    21212124    civ2Bin=sparam.Civ2Bin;
    21222125end
    2123 if isfield(sparam,'PatchBin')
    2124     patchBin=sparam.PatchBin;
    2125 end
    2126  if isfield(sparam,'PatchNewBin')
    2127     patch_newBin=sparam.PatchNewBin;
    2128  end
    2129  if isfield(sparam,'FixBin')
     2126test_interp=get(handles.test_interp,'Value');
     2127if ~test_interp && isfield(sparam,'PatchBin')
     2128    PatchBin=sparam.PatchBin;
     2129end
     2130if test_interp && isfield(sparam,'PatchNewBin')
     2131    PatchBin=sparam.PatchNewBin;
     2132end
     2133if isfield(sparam,'FixBin')
    21302134    fixBin=sparam.FixBin;
    2131  end
    2132 %  if isfield(sparam,'Todo_path')
    2133 %     todo_path=sparam.Todo_path;
    2134 %  end
     2135end
    21352136if batch
    21362137    if isfield(sparam,'BatchMode')
     
    21492150set(handles.waitbar_civ2,'Position',[0.946 0.219 0.03 0.001])
    21502151set(handles.waitbar_patch2,'Position',[0.946 0.0 0.03 0.001])
    2151 set(handles.BATCH, 'Enable','Off')
    2152 set(handles.BATCH,'BackgroundColor',[0.831 0.816 0.784])
     2152
    21532153drawnow
    21542154%get the filename root, nomenclature and numbers
     
    22662266        subdomain_patch1=get(handles.subdomain_patch1,'String');
    22672267        thresh_patch1=get(handles.thresh_patch1,'String');
    2268         test_interp=get(handles.test_interp,'Value');
    22692268 end
    22702269 
     
    22912290
    22922291
     2292
    22932293%get patch2 parameters
    22942294if box_test(6)==1
     
    23122312    subdomain_patch2=get(handles.subdomain_patch2,'String');
    23132313    thresh_patch2=get(handles.thresh_patch2,'String');
    2314              test_interp=get(handles.test_interp,'Value');
    2315 end
    2316 
    2317 % if ~sge
    2318 %       
    2319 %     %OPEN THE WAIT LIST FOR BATCH PROCESSES
    2320 %     name_lock=fullfile(todo_path,'lock'); %lock file
    2321 %     iwait=0;
    2322 %     while(exist(name_lock) & iwait<15)
    2323 %         pause(1); %wait 1 second
    2324 %         iwait=iwait+1;
    2325 %     end
    2326 %     if iwait==15
    2327 %         msgbox_uvmat('ERROR',['I''m tired to wait for the lock file, please delete it then click again on BATCH' name_lock ])
    2328 %         set(handles.BATCH, 'Enable','On')
    2329 %         set(handles.BATCH,'BackgroundColor',[1 0 0])
    2330 %         return
    2331 %     end
    2332 %     p0=fopen(name_lock,'w'); %create the file name_lock: prevents other users to interfere
    2333 %     name_todo=fullfile(todo_path,'TODO.txt');
    2334 %     p1=fopen(name_todo,'a');
    2335 %     if (p1<0)
    2336 %         msgbox_uvmat('ERROR',['error in opening ' name_todo])
    2337 %         set(handles.BATCH, 'Enable','On')
    2338 %         set(handles.BATCH,'BackgroundColor',[1 0 0])
    2339 %         return;
    2340 %     end
    2341 % end
     2314%              test_interp=get(handles.test_interp,'Value');
     2315end
    23422316
    23432317%MAIN LOOP
     
    23502324        i_cmd=0;
    23512325        cmd='';
    2352         if batch
     2326        if isunix % check: necessaire aussi en RUN?
    23532327           %fid=fopen([filename '.cmx'],'w')
    23542328           cmd='#!/bin/bash';
     
    23582332        if civAll
    23592333            civAllxml=xmltree;% xml contents,  all parameters
    2360             civAllCmd=[];
     2334            civAllCmd='';
    23612335            civAllxml=set(civAllxml,1,'name','CivDoc');
    23622336        end
    2363 %         filecell.nc.civ1
    2364         filename_cmx=filecell.nc.civ1{ifile,j}%output netcdf file
     2337        filename_cmx=filecell.nc.civ1{ifile,j};%output netcdf file
    23652338        filename_cmx(end-1:end)='cm';%name of cmx file
    23662339        filename_cmx=[filename_cmx 'x'];
     
    23692342        if box_test(1)==1
    23702343            par_civ1.filename_ima_a=filecell.ima1.civ1{ifile,j};
    2371            % par_civ1.filename_ima_a([end-3:end])=[];%remove .png extension
    2372             par_civ1.filename_ima_b=filecell.ima2.civ1{ifile,j};
    2373            % par_civ1.filename_ima_b([end-3:end])=[];%remove .png extension
    2374          
     2344            par_civ1.filename_ima_b=filecell.ima2.civ1{ifile,j};         
    23752345            namelog=[filename_cmx([1:end-3]) 'log'];
    23762346            par_civ1.Dt=num2str(time(num2_civ1(ifile),num_b_civ1(j))-time(num1_civ1(ifile),num_a_civ1(j)));
     
    24822452    if box_test(3)==1
    24832453        if isequal(civAll,0)
    2484             cmd_PATCH=RUN_PATCH(filecell.nc.civ1{ifile,j},nx_patch1,ny_patch1,rho_patch1,subdomain_patch1,thresh_patch1,test_interp);
     2454            cmd_PATCH=RUN_PATCH(filecell.nc.civ1{ifile,j},nx_patch1,ny_patch1,rho_patch1,subdomain_patch1,thresh_patch1,test_interp,PatchBin);
    24852455            cmd=[cmd '\n' cmd_PATCH];
    24862456        else
     
    26012571            else
    26022572                 civAllCmd=[civAllCmd ' civ2 '];
    2603                  str=BATCH_CIV2_Unified(filename_cmx([1:end-4]),namelog,par_civ2,sparam);
     2573                 str=BATCH_CIV2_Unified(filename_cmx([1:end-4]),namelog,par_civ2);
    26042574                 fieldnames=fields(str);
    26052575                [civAllxml,uid_civ2]=add(civAllxml,1,'element','civ2');
     
    26542624       if box_test(6)==1
    26552625            if isequal(civAll,0)
    2656                 cmd_PATCH=RUN_PATCH(filecell.nc.civ2{ifile,j},nx_patch2,ny_patch2,rho_patch2,subdomain_patch2,thresh_patch2,test_interp);
     2626                cmd_PATCH=RUN_PATCH(filecell.nc.civ2{ifile,j},nx_patch2,ny_patch2,rho_patch2,subdomain_patch2,thresh_patch2,test_interp,PatchBin);
    26572627                cmd=[cmd '\n' cmd_PATCH];
    26582628            else
     
    27002670        if isequal(civAll,1)
    27012671            save(civAllxml,[filename_cmx([1:end-4]) '.xml']);
    2702             cmd=char({cmd;[CivBin ' -f ' [filename_cmx([1:end-4]) '.xml'] ' ' civAllCmd]});
     2672            %cmd=char({cmd;[CivBin ' -f ' [filename_cmx([1:end-4]) '.xml'] ' ' civAllCmd]});
     2673            cmd=[cmd '\n' CivBin ' -f ' filename_cmx(1:end-4) '.xml '  civAllCmd]
    27032674        end
    27042675      % create the .bat file:
     
    27192690                    pvalue=num2str((1-ind_answer)*500);
    27202691                    namelog=[filename_bat '.patch.log'];
    2721                     ['!qsub -p ' pvalue ' -q civ.q -e ' filename_cmx(1:end-4) '.errors -o ' filename_cmx(1:end-4) '.log' ' ' filename_bat];
     2692                    display(['!qsub -p ' pvalue ' -q civ.q -e ' filename_cmx(1:end-4) '.errors -o ' filename_cmx(1:end-4) '.log' ' ' filename_bat]);
    27222693                    eval(  ['!qsub -p ' pvalue ' -q civ.q -e ' filename_cmx(1:end-4) '.errors -o ' filename_cmx(1:end-4) '.log' ' ' filename_bat]);
    27232694            end
    2724        
    2725            
    2726 
    27272695        else
    27282696%% to lauch the jobs locally :
    27292697            if(isunix)
    27302698              eval(['!. ' filename_bat ' &']);
     2699              display(['!. ' filename_bat ' &'])
    27312700            else
    27322701              eval(['!' filename_bat ' &']);
     2702              display(['!' filename_bat ' &'])
    27332703            end
    27342704%             if(isunix)
     
    34303400
    34313401%------------------------------------------------------------------------
    3432 %CIV1  CIV1  CIV1 CIV1
     3402%CIV1  CIV1  CIV1 CIV1 NOT USED: replaced by RUN_BATCH
    34333403function RUN_CIV1(handles,filecell,filecell_1,filecell_nc1,num1,num2,num_a,num_b,nom_type_nc)
    34343404%------------------------------------------------------------------------
     
    38073777%------------------------------------------------------------------------
    38083778% --- PATCH
    3809 function cmd_PATCH=RUN_PATCH(filename_nc,nx_patch,ny_patch,rho_patch,subdomain_patch,thresh_value,test_interp)
    3810 %------------------------------------------------------------------------
    3811 global patchBin patch_newBin
     3779function cmd_PATCH=RUN_PATCH(filename_nc,nx_patch,ny_patch,rho_patch,subdomain_patch,thresh_value,test_interp,PatchBin)
     3780%------------------------------------------------------------------------
     3781%global patchBin patch_newBin
     3782
     3783
    38123784        namelog=[filename_nc([1:end-3]) '_patch.log'];
    38133785        if test_interp==0
    3814             cmd_PATCH=[patchBin ' -f ' filename_nc ' -m ' nx_patch  ' -n ' ny_patch ' -ro ' rho_patch ' -nopt ' subdomain_patch ...
     3786            cmd_PATCH=[PatchBin ' -f ' filename_nc ' -m ' nx_patch  ' -n ' ny_patch ' -ro ' rho_patch ' -nopt ' subdomain_patch ...
    38153787            '  > ' namelog ' 2>&1']; % redirect standard output to the log file
    38163788         else %nouveau programme patch
    3817              cmd_PATCH=[patch_newBin ' -f ' filename_nc ' -m ' nx_patch  ' -n ' ny_patch ' -ro ' rho_patch ...
     3789             cmd_PATCH=[PatchBin ' -f ' filename_nc ' -m ' nx_patch  ' -n ' ny_patch ' -ro ' rho_patch ...
    38183790                ' -max ' thresh_value ' -nopt ' subdomain_patch  '  > ' namelog ' 2>&1']; % redirect standard output to the log file
    38193791        end
     
    48954867fclose(fid);
    48964868 
    4897 % if sge 
    4898     cmd_CIV1=[sparam.Civ1Bin ' -f ' filename '.cmx' ]; % redirect standard output to the log file
    4899 % else
    4900 %     cmd_CIV1=[civ1Bin ' -f ' filename_cmx ' > ' namelog ' 2>&1']; % redirect standard output to the log file
    4901 % end
     4869cmd_CIV1=[sparam.Civ1Bin ' -f ' filename '.cmx' ]; % redirect standard output to the log file
    49024870if(isunix)
    49034871    [Rootbat,Filebat,extbat]=fileparts(namelog);
     
    49134881%------------------------------------------------------------------------
    49144882%pixels per cm and matrix of the image times, read from the .civ file by uvmat
    4915 global civ1Bin CivBin%name of the executable for civ1 calculation
     4883%global CivBin%name of the executable for civ1 calculation
    49164884
    49174885    civ1.image1=par.filename_ima_a;
     
    49524920%------------------------------------------------------------------------
    49534921%pixels per cm and matrix of the image times, read from the .civ file by uvmat
    4954 global civ2Bin CivBin%name of the executable for civ1 calculation
     4922%global CivBin%name of the executable for civ1 calculation
    49554923
    49564924civ2.image1=par.filename_ima_a;
  • trunk/src/plot_field.m

    r72 r73  
    455455end
    456456if test_newplot && ~isequal(plotstr,'plot(')
    457     plotstr=[plotstr '''tag'',''plot_line'')']
     457    plotstr=[plotstr '''tag'',''plot_line'');'];
    458458                %execute plot (instruction  plotstr) 
    459459    eval(plotstr)
     
    914914    vec_U=reshape(vec_U,1,numel(vec_U));
    915915    vec_V=reshape(vec_V,1,numel(vec_V));
    916     MinMaxX=max(vec_X)-min(vec_X)
    917     MinMaxY=max(vec_Y)-min(vec_Y)
     916    MinMaxX=max(vec_X)-min(vec_X);
     917    MinMaxY=max(vec_Y)-min(vec_Y);
    918918    AxeData.Mesh=sqrt((MinMaxX*MinMaxY)/length(vec_X));
    919919    if  ~isfield(PlotParam.Vectors,'AutoVec') || isequal(PlotParam.Vectors.AutoVec,0)|| ~isfield(PlotParam.Vectors,'VecScale')...
  • trunk/src/series/ima2vol.m

    r72 r73  
    6060%main loop
    6161 vol=[];
    62 for ifile=1:nbfield1*nbfield2
    63     update_waitbar(hseries.waitbar,WaitbarPos,ifile/(nbfield1*nbfield2))
    64     filename=name_generator(basename,ifile-1,1,Series.FileExt,Series.NomType);
    65     num_j=mod(ifile-1,nbfield2)+1;
    66     num_i=floor((ifile-1)/nbfield2)+1;
    67     A=imread(filename);
    68     if test_level
    69          A=levels(A);
    70     end
    71     vol=[vol;A];%concacene along y
    72     if num_j==nbfield2
    73          filename_new=name_generator(basename_new,num_i,1,'.vol','_i');
    74          imwrite(vol,filename_new,'png','BitDepth',16)% WRITE IN 16 bits
    75          vol=[];
    76     end     
    77 end
     62 for ifile=1:nbfield1*nbfield2
     63     update_waitbar(hseries.waitbar,WaitbarPos,ifile/(nbfield1*nbfield2))
     64     stopstate=get(hseries.RUN,'BusyAction');
     65     if isequal(stopstate,'queue') % enable STOP command
     66         filename=name_generator(basename,ifile-1,1,Series.FileExt,Series.NomType);
     67         num_j=mod(ifile-1,nbfield2)+1;
     68         num_i=floor((ifile-1)/nbfield2)+1;
     69         A=imread(filename);
     70         Atype=class(A);
     71         if test_level
     72             A=levels(A,16);
     73             display(num2str(num_i))
     74         end
     75         vol=[vol;A];%concacene along y
     76         if num_j==nbfield2
     77             filename_new=name_generator(basename_new,num_i,1,'.vol','_i');
     78             imwrite(vol,filename_new,'png','BitDepth',16)% WRITE IN 16 bits: needed for the current version of civ3C3D
     79             display([filename_new 'written (16bits image)'])
     80             vol=[];
     81         end
     82     end
     83 end
    7884
    7985
    8086
    81 function C=levels(A)
     87function C=levels(A,bitdepth)
    8288%whos A;
    8389B=double(A(:,:,1));
     
    115121cmin=min(c_select);
    116122cmax=max(c_select);
    117 C=(C-cmin)/(cmax-cmin)*256;
    118 %C=uint8(C);
     123if isequal(bitdepth,16)
     124    C=((C-cmin)/(cmax-cmin))*256*256;
     125    C=uint16(C);
     126else
     127    C=((C-cmin)/(cmax-cmin))*256;
     128    C=uint8(C);
     129end
  • trunk/src/set_grid.m

    r46 r73  
    482482     tsaiA=[];
    483483end
    484 [grid_imaA(:,1),grid_imaA(:,2)]=px_XYZ(tsaiA,grid_real(:,1),grid_real(:,2),0);
     484size(grid_real)
     485tsaiA
     486if isempty(tsaiA)
     487    grid_imaA(:,1)=grid_real(:,1);
     488    grid_imaA(:,2)=grid_real(:,2);
     489else
     490    [grid_imaA(:,1),grid_imaA(:,2)]=px_XYZ(tsaiA,grid_real(:,1),grid_real(:,2),0);
     491end
    485492    A=imread(imageA);
    486493   siz=size(A);
     
    537544grid_real2(:,2)=grid_real_y;
    538545grid_real2(:,3)=zeros(nx_patch_new,1);
    539 [grid_pix_A(:,1),grid_pix_A(:,2)]=px_XYZ(tsaiA,grid_real2(:,1),grid_real2(:,2));
     546if isempty(tsaiA)
     547    grid_pix_A(:,1)=grid_real2(:,1);
     548   grid_pix_A(:,2)= grid_real2(:,2);
     549else
     550    [grid_pix_A(:,1),grid_pix_A(:,2)]=px_XYZ(tsaiA,grid_real2(:,1),grid_real2(:,2));
     551end
    540552if testB
    541553    [grid_pix_B(:,1),grid_pix_B(:,2)]=px_XYZ(tsaiB,grid_real2(:,1),grid_real2(:,2));
  • trunk/src/uvmat.m

    r72 r73  
    419419end
    420420[FileName, PathName] = uigetfile( ...
    421        {'*.xml;*.xls;*.civ;*.png;*.jpg;*.tif;*.avi;*.AVI;*.nc;*.cmx;*.fig;*.log;*.dat', ' (*.xml,*.xls,*.civ,*.jpg ,*.png, .tif, *.avi,*.nc,*.cmx ,*.fig,*.log,*.dat)';
     421       {'*.xml;*.xls;*.civ;*.png;*.jpg;*.tif;*.avi;*.AVI;*.vol;*.nc;*.cmx;*.fig;*.log;*.dat;*.bat;', ' (*.xml,*.xls,*.civ,*.jpg ,*.png, .tif, *.avi,*.vol,*.nc,*.cmx ,*.fig,*.log,*.dat,*.bat)';
    422422       '*.xml',  '.xml files '; ...
    423423        '*.xls',  '.xls files '; ...
     
    427427        '*.tif','.tif image files'; ...
    428428        '*.avi;*.AVI','.avi movie files'; ...
     429        '*.vol','.volume images (png)'; ...
    429430        '*.nc','.netcdf files'; ...
    430431        '*.cdf','.netcdf files'; ...
     
    434435        '*.log','.log text files ';...
    435436        '*.dat','.dat text files ';...
     437        '*.bat','.bat system command text files';...
    436438        '*.*',  'All Files (*.*)'}, ...
    437439        'Pick a file',oldfile);
     
    541543end
    542544switch ext_test
    543     case {'.civ','.log','.cmx','.cmx2','.txt'}  %display text file
     545    case {'.civ','.log','.cmx','.cmx2','.txt','.bat'}  %display text file
    544546        edit(fileinput) 
    545547    case '.fig'                           %display matlab figure
     
    795797               set(handles.slices,'Value',1)
    796798           end
    797            if isequal(GeometryCalib.NbSlice,'volume')
     799           if isfield(GeometryCalib,'NbSlice') && isequal(GeometryCalib.NbSlice,'volume')
    798800               set(handles.nb_slice,'String','volume')
    799801           else
     
    41374139
    41384140%suppress the other options if grid is chosen
    4139 % set(handles.create,'Value',0)
    4140 % set(handles.create,'BackgroundColor',[0 1 0])
    41414141set(handles.edit_vect,'Value',0)
    41424142edit_vect_Callback(hObject, eventdata, handles)
     
    41464146set(handles.edit,'BackgroundColor',[0.7 0.7 0.7])
    41474147set(handles.list_object_1,'Value',1)     
    4148 % set(handles.cal,'Value',0)
    4149 % set(handles.cal,'BackgroundColor',[0 1 0])   
    41504148
    41514149%prepare display of the set_grid GUI
     
    41534151FileName=read_file_boxes(handles);
    41544152[hset_object,UvData.sethandles]=set_grid(FileName);% call the set_object interface
    4155 set(huvmat,'UserData',UvData);
     4153set(handles.uvmat,'UserData',UvData);
    41564154
    41574155
Note: See TracChangeset for help on using the changeset viewer.