Changeset 466


Ignore:
Timestamp:
Jun 21, 2012, 7:27:59 PM (12 years ago)
Author:
sommeria
Message:

bugs corrected

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ_matlab.m

    r452 r466  
    5151check_civ1=0;%default
    5252check_patch1=0;%default
    53         ImageFileA=Param.Civ1.ImageA;
    54         ImageFileB=Param.Civ1.ImageB;
    55         if isfield(Param,'Civ2')
    56             ImageFileA_civ2=Param.Civ2.ImageA;
    57              ImageFileB_civ2=Param.Civ2.ImageB;
    58         end
     53%         ImageFileA=Param.Civ1.ImageA;
     54%         ImageFileB=Param.Civ1.ImageB;
     55%         if isfield(Param,'Civ2')
     56%             ImageFileA_civ2=Param.Civ2.ImageA;
     57%              ImageFileB_civ2=Param.Civ2.ImageB;
     58%         end
    5959% case of input Param set by an xml file (batch mode)
    6060if ischar(Param)
     
    103103    else
    104104        if isfield(par_civ1,'ImageA')&&(ischar(par_civ1.ImageA)||strcmp(class(par_civ1.ImageA),'VideoReader')) % case with no image: only the PIV grid is calculated           
    105             [Field,ParamOut,errormsg] = read_field(ImageFileA,par_civ1.FileTypeA,par_civ1.ImageA,par_civ1.FrameIndexA);
     105            [Field,ParamOut,errormsg] = read_field(Param.Civ1.ImageA,par_civ1.FileTypeA,par_civ1.ImageA,par_civ1.FrameIndexA);
    106106            if ~isempty(errormsg)
    107107                errormsg=['error in civ_matlab/read_field:' errormsg];
     
    111111        end
    112112        if isfield(par_civ1,'ImageB')&& (ischar(par_civ1.ImageB)||strcmp(class(par_civ1.ImageB),'VideoReader'))
    113             [Field,ParamOut,errormsg] = read_field(ImageFileB,par_civ1.FileTypeB,par_civ1.ImageB,par_civ1.FrameIndexB);
     113            [Field,ParamOut,errormsg] = read_field(Param.Civ1.ImageB,par_civ1.FileTypeB,par_civ1.ImageB,par_civ1.FrameIndexB);
    114114            if ~isempty(errormsg)
    115115                errormsg=['error in civ_matlab/read_field:' errormsg];
     
    247247    if ~isfield (Param,'Civ1') || ~strcmp(Param.Civ1.ImageA,par_civ2.ImageA)
    248248        %read first image if not already done for civ1
    249         [Field,ParamOut,errormsg] = read_field(ImageFileA_civ2,par_civ2.FileTypeA,par_civ2.ImageA,par_civ2.FrameIndexA);
     249        [Field,ParamOut,errormsg] = read_field(Param.Civ2.ImageA,par_civ2.FileTypeA,par_civ2.ImageA,par_civ2.FrameIndexA);
    250250                    if ~isempty(errormsg)
    251251                errormsg=['error in civ_matlab/read_field:' errormsg];
     
    258258    if ~isfield (Param,'Civ1') || ~strcmp(Param.Civ1.ImageB,par_civ2.ImageB)
    259259        %read first image if not already done for civ1
    260         [Field,ParamOut,errormsg] = read_field(ImageFileB_civ2,par_civ2.FileTypeB,par_civ2.ImageB,par_civ2.FrameIndexB);
     260        [Field,ParamOut,errormsg] = read_field(Param.Civ2.ImageB,par_civ2.FileTypeB,par_civ2.ImageB,par_civ2.FrameIndexB);
    261261         if ~isempty(errormsg)
    262262                errormsg=['error in civ_matlab/read_field:' errormsg];
  • trunk/src/read_field.m

    r452 r466  
    1515%
    1616%INPUT
    17 % ObjectName: name of the input file, or movie object when the Matlab function mmreader is used
     17% FileName: name of the input file
    1818% FileType: type of file
    1919%     = netcdf : netcdf file
     
    2828%     .ColorVar: variable used for vector color
    2929%     .Npx, .Npy: nbre of pixels along x and y (used for .vol input files)
     30% num: frame number for movies
     31
    3032function [Field,ParamOut,errormsg] = read_field(FileName,FileType,ParamIn,num)
    3133Field=[];
     
    3840ParamOut=ParamIn;%default
    3941errormsg='';
    40 if isfield(ParamIn,'VelType')
    41 VelType=ParamIn.VelType;
    42 end
     42% if isfield(ParamIn,'VelType')
     43% VelType=ParamIn.VelType;
     44% end
    4345A=[];
    4446%% distingush different input file types
Note: See TracChangeset for help on using the changeset viewer.