- Timestamp:
- Jun 21, 2012, 7:27:59 PM (13 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/civ_matlab.m
r452 r466 51 51 check_civ1=0;%default 52 52 check_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 end53 % 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 59 59 % case of input Param set by an xml file (batch mode) 60 60 if ischar(Param) … … 103 103 else 104 104 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); 106 106 if ~isempty(errormsg) 107 107 errormsg=['error in civ_matlab/read_field:' errormsg]; … … 111 111 end 112 112 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); 114 114 if ~isempty(errormsg) 115 115 errormsg=['error in civ_matlab/read_field:' errormsg]; … … 247 247 if ~isfield (Param,'Civ1') || ~strcmp(Param.Civ1.ImageA,par_civ2.ImageA) 248 248 %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); 250 250 if ~isempty(errormsg) 251 251 errormsg=['error in civ_matlab/read_field:' errormsg]; … … 258 258 if ~isfield (Param,'Civ1') || ~strcmp(Param.Civ1.ImageB,par_civ2.ImageB) 259 259 %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); 261 261 if ~isempty(errormsg) 262 262 errormsg=['error in civ_matlab/read_field:' errormsg]; -
trunk/src/read_field.m
r452 r466 15 15 % 16 16 %INPUT 17 % ObjectName: name of the input file, or movie object when the Matlab function mmreader is used17 % FileName: name of the input file 18 18 % FileType: type of file 19 19 % = netcdf : netcdf file … … 28 28 % .ColorVar: variable used for vector color 29 29 % .Npx, .Npy: nbre of pixels along x and y (used for .vol input files) 30 % num: frame number for movies 31 30 32 function [Field,ParamOut,errormsg] = read_field(FileName,FileType,ParamIn,num) 31 33 Field=[]; … … 38 40 ParamOut=ParamIn;%default 39 41 errormsg=''; 40 if isfield(ParamIn,'VelType')41 VelType=ParamIn.VelType;42 end42 % if isfield(ParamIn,'VelType') 43 % VelType=ParamIn.VelType; 44 % end 43 45 A=[]; 44 46 %% distingush different input file types
Note: See TracChangeset
for help on using the changeset viewer.