Changeset 452 for trunk/src/read_field.m


Ignore:
Timestamp:
Jun 12, 2012, 8:53:51 PM (12 years ago)
Author:
sommeria
Message:

bugs repaired

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/read_field.m

    r450 r452  
    164164%% case of image
    165165if ~isempty(A)
     166    if isstruct(ParamOut)
    166167    ParamOut.FieldName='image';
    167168    ParamOut.FieldList={'image'};
     169    end
    168170    Npz=1;%default
    169171    npxy=size(A);
     
    178180            Field.AY=[npxy(1)-0.5 0.5];
    179181            Field.AX=[0.5 npxy(2)-0.5]; % coordinates of the first and last pixel centers
     182            if isstruct(ParamOut)
    180183            ParamOut.Npx=npxy(2);% display image size on the interface
    181184            ParamOut.Npy=npxy(1);
     185            end
    182186            Field.VarAttribute{3}.Mesh=1;
    183187        else
     
    188192            Field.AY=[npxy(2)-0.5 0.5];
    189193            Field.AX=[0.5 npxy(3)-0.5]; % coordinates of the first and last pixel centers
     194            if isstruct(ParamOut)
    190195            ParamOut.Npx=npxy(3);% display image size on the interface
    191196            ParamOut.Npy=npxy(2);
     197             end
    192198            Field.VarAttribute{4}.Mesh=1;
    193199        end
Note: See TracChangeset for help on using the changeset viewer.