Changeset 655


Ignore:
Timestamp:
Jul 1, 2013, 9:12:01 PM (11 years ago)
Author:
sommeria
Message:

various bugs corrected

Location:
trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/check_files.m

    r654 r655  
    5454    'fill_GUI';...%  fill a GUI with a set of parameters from a Matlab structure
    5555    'filter_tps';...% find the thin plate spline coefficients for interpolation-smoothing
    56     'find_field_bounds': % find the boounds and typical meshs of coordinates
     56    'find_field_bounds';... % find the boounds and typical meshs of coordinates
    5757    'find_field_cells';...% group the variables of a 'field object' into 'field cells' and specify their structure
    5858    'find_file_series';...% check the content of an input file and find the corresponding file series
  • trunk/src/geometry_calib.m

    r654 r655  
    939939 huvmat=findobj(allchild(0),'Name','uvmat');%find the current uvmat interface handle
    940940UvData=get(huvmat,'UserData');%Data associated to the current uvmat interface
    941 Xima=0.8*[UvData.Field.XMin UvData.Field.XMax UvData.Field.XMax UvData.Field.XMin]';
    942 Yima=0.8*[UvData.Field.YMin UvData.Field.YMax UvData.Field.YMax UvData.Field.YMin]';
     941npy=size(UvData.Field.A,1);
     942npx=size(UvData.Field.A,2);
     943Xima=[0.25*npx 0.75*npx 0.75*npx 0.25*npx]';
     944Yima=[0.25*npy 0.25*npy 0.75*npy 0.75*npy]';
    943945x=Xima/str2num(answer);
    944946y=Yima/str2num(answer);
    945 for j=1:4
    946     for i=1:5
    947           Coord{j,1}=num2str(x);%
    948           Coord{j,2}=num2str(y);%
    949           Coord{j,3}='0';%
    950           Coord{j,4}=num2str(Xima);%
    951           Coord{j,5}=num2str(Yima);%
    952     end
    953 end
    954 
     947Coord={num2str(x(1)) num2str(y(1)) '0' num2str(Xima(1)) num2str(Yima(1));...
     948    num2str(x(2)) num2str(y(2)) '0' num2str(Xima(2)) num2str(Yima(2));...
     949    num2str(x(3)) num2str(y(3)) '0' num2str(Xima(3)) num2str(Yima(3));...
     950    num2str(x(4)) num2str(y(4)) '0' num2str(Xima(4)) num2str(Yima(4))};
    955951Tabchar=cell2tab(Coord,' | ');
    956952Tabchar=[Tabchar ;{'......'}];
     
    12111207GeometryCalib=s.GeometryCalib;
    12121208%GeometryCalib=load_calib(hObject, eventdata, handles)
    1213 calib=reshape(GeometryCalib.PointCoord,[],1);
     1209calib=reshape(GeometryCalib.SourceCalib.PointCoord,[],1);
    12141210for ilist=1:numel(calib)
    12151211    CoordCell{ilist}=num2str(calib(ilist));
  • trunk/src/plot_object.m

    r650 r655  
    131131
    132132%% determine the coordinates xline, yline,xsup,xinf, yinf,ysup determining the new object plot
    133 test_line= isequal(ObjectData.Type,'points')||isequal(ObjectData.Type,'line')||isequal(ObjectData.Type,'line_x')||isequal(ObjectData.Type,'line_y')||...
     133test_line= isequal(ObjectData.Type,'points')||isequal(ObjectData.Type,'line')||...
    134134    isequal(ObjectData.Type,'polyline')||isequal(ObjectData.Type,'polygon')|| isequal(ObjectData.Type,'plane')|| isequal(ObjectData.Type,'volume');
    135135test_patch=isequal(ObjectData.ProjMode,'inside')||isequal(ObjectData.ProjMode,'outside')||isequal(ObjectData.Type,'volume')...
     
    395395    if test_patch
    396396        for iobj=1:length(PlotData.SubObject)
    397             objtype=get(PlotData.SubObject(iobj),'Type');
    398             if isequal(objtype,'image')
    399                 set(PlotData.SubObject(iobj),'CData',imflag,'AlphaData',(flag)*0.2)
    400                 set(PlotData.SubObject(iobj),'XData',[xlim(1)+dx/2 xlim(2)-dx/2])
    401                 set(PlotData.SubObject(iobj),'YData',[ylim(1)+dy/2 ylim(2)-dy/2])
     397            if ~ishandle(PlotData.SubObject(iobj))
     398                hold on
     399                hhh=image([xlim(1)+dx/2 xlim(2)-dx/2],[ylim(1)+dy/2 ylim(2)-dy/2],imflag,'Tag','proj_object','HitTest','off');
     400                set(hhh,'AlphaData',(flag)*0.2)% set partial transparency to the filling color
     401                PlotData.SubObject(iobj)=hhh;
     402            else
     403                objtype=get(PlotData.SubObject(iobj),'Type');
     404                if isequal(objtype,'image')
     405                    set(PlotData.SubObject(iobj),'CData',imflag,'AlphaData',(flag)*0.2)
     406                    set(PlotData.SubObject(iobj),'XData',[xlim(1)+dx/2 xlim(2)-dx/2])
     407                    set(PlotData.SubObject(iobj),'YData',[ylim(1)+dy/2 ylim(2)-dy/2])
     408                end
     409            end
     410        end     
     411    else% no patch image requested, erase existing ones
     412        for iobj=1:length(PlotData.SubObject)
     413            if ishandle(PlotData.SubObject(iobj)) && strcmp(get(PlotData.SubObject(iobj),'Type'),'image')
     414                delete(PlotData.SubObject(iobj))
    402415            end
    403416        end
  • trunk/src/proj_field.m

    r654 r655  
    8888    return
    8989end
    90 ListProjMode={'projection','interp_lin','interp_tps'};%list of effective projection modes
    91 if isempty(strcmp(ObjectData.ProjMode,ListProjMode))
     90ListProjMode={'projection','interp_lin','interp_tps','inside','outside'};%list of effective projection modes
     91if isempty(find(strcmp(ObjectData.ProjMode,ListProjMode), 1))% no projection in case
    9292    return
    9393end
  • trunk/src/xml2struct.m

    r565 r655  
    4747        end
    4848    case 'char'   
    49         if isempty(regexp(ss,'^(-*\d+\.*\d*\ *)+$'))% if the string does not contains a set of numbers (with possible sign and decimal) separated by blanks
     49        out=str2num(ss);
     50        %if isempty(regexp(ss,'^(-*\d+\.*\d*\ *)+$'))% if the string does not contain a set of numbers (with possible sign and decimal) separated by blanks
     51        if isempty(out)
    5052            sep_ind=regexp(ss,'\s&\s');% check for separator ' & ' which indicates column separation in tables
    5153            if ~isempty(sep_ind)
     
    5759                out=ss; %reproduce the input string
    5860            end
    59         else
    60             out=str2num(ss);
     61%         else
     62%             out=str2num(ss);
    6163        end
    6264    case 'cell'
Note: See TracChangeset for help on using the changeset viewer.