Changeset 88 for trunk/src/plot_field.m


Ignore:
Timestamp:
May 9, 2010, 10:40:18 AM (14 years ago)
Author:
sommeria
Message:

plot_field: test for multicomponent image (-> errormsg)
creat_grid: possibility of changing the figure name (for detect_grid)
geometry_calib: detect_grid improved (range of search adjusted from grid mesh)

bug repaired in translate points

uvmat: bug repair: dela with the case with several get_field GUI opened

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/plot_field.m

    r85 r88  
    698698    % distinguish B/W and color images
    699699    np=size(A);%size of image
    700     siz=size(np);
     700    siz=numel(np);
     701    if siz>3
     702        msgbox_uvmat('ERROR','unrecognized scalar type ')
     703            return
     704    end
     705    if siz==3
     706        if np(3)==1
     707            siz=2;%B W image
     708        elseif np(3)==3
     709            siz=3;%color image
     710        else
     711             msgbox_uvmat('ERROR',['unrecognized scalar type: ' num2str(np(3)) ' color components'])
     712            return
     713        end
     714    end
    701715    %set the color map
    702     if siz(2)==2 %for black and white images
     716    if siz==2 %for black and white images
    703717        if ~isfield(PlotParam.Scalar,'AutoScal')
    704718            PlotParam.Scalar.AutoScal=0;%default
     
    781795            end
    782796        end
    783     elseif siz(2)==3 %color images
     797    else %color images
    784798        axes(haxes)
    785799        B=uint8(A);
     
    832846    test_ima=1;
    833847    %display the colorbar code for B/W images if Poscolorbar not empty
    834     if siz(2)==2 & exist('PosColorbar','var')& ~isempty(PosColorbar)
     848    if siz==2 & exist('PosColorbar','var')& ~isempty(PosColorbar)
    835849        if isempty(hcol)|~ishandle(hcol)
    836850             hcol=colorbar;%create new colorbar
Note: See TracChangeset for help on using the changeset viewer.