Changeset 868 for trunk/src/series/histo_diff.m
- Timestamp:
- Feb 13, 2015, 11:22:01 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/histo_diff.m
r867 r868 166 166 rmpath(Param.FieldTransform.TransformPath) 167 167 end 168 if ~(isfield(Param,'ProjObject')&& ismember(Param.ProjObject. ProjMode,{'polygon','rectangle','ellipse'}))168 if ~(isfield(Param,'ProjObject')&& ismember(Param.ProjObject.Type,{'polygon','rectangle','ellipse'})) 169 169 disp_uvmat('ERROR','projection in a closed domain: polygon, rectangle or ellipse is needed for histograms',checkrun) 170 170 end … … 205 205 InputFields{2}=[];%default (case of images) 206 206 if isfield(Param,'InputFields') 207 InputFields{2}= Param.InputFields{1};%default207 InputFields{2}=InputFields{1};%default 208 208 if isfield(Param.InputFields,'FieldName_1') 209 209 InputFields{2}.FieldName=Param.InputFields.FieldName_1; … … 249 249 if ~isempty(transform_fct) 250 250 switch nargin(transform_fct) 251 case 4252 if length(Data)==2253 Field=transform_fct(Data{1},XmlData{1},Data{2},XmlData{2});254 else255 Field=transform_fct(Data{1},XmlData{1});256 end257 case 3258 if length(Data)==2259 Field=transform_fct(Data{1},XmlData{1},Data{2});260 else261 Field=transform_fct(Data{1},XmlData{1});262 end263 251 case 2 264 252 Field=transform_fct(Data{1},XmlData{1}); … … 268 256 end 269 257 270 %% calculate tps coefficients if needed 258 %% projection of the second (ref) field on the first one 259 % calculate tps coefficients if needed (spatial derivatives) 271 260 % if isfield(Param,'ProjObject')&&isfield(Param.ProjObject,'ProjMode')&& strcmp(Param.ProjObject.ProjMode,'interp_tps') 272 261 % Field=tps_coeff_field(Field,check_proj_tps); 273 % end 274 275 %field projection on an object 276 [Field,errormsg]=proj_field(Field,Param.ProjObject); 262 % end 263 Field.ListVarName={'X','Y','U','V'}; 264 Field.VarDimName={'nb_vector','nb_vector','nb_vector','nb_vector'}; 265 F.U=scatteredInterpolant(Data{2}.X,Data{2}.Y,Data{2}.U,'linear'); 266 Field.U=Field.U-F.U(Field.X,Field.Y);%substract the interpolated ref to U 267 F.V=scatteredInterpolant(Data{2}.X,Data{2}.Y,Data{2}.V,'linear'); 268 Field.V=Field.V-F.V(Field.X,Field.Y);%substract the interpolated ref to V 269 270 %field projection on a close object yielding histogram 271 [Histo,errormsg]=proj_field(Field,Param.ProjObject);% calculate histogram 277 272 if ~isempty(errormsg) 278 273 disp_uvmat('ERROR',['error in histo_diff/proj_field:' errormsg],checkrun)
Note: See TracChangeset
for help on using the changeset viewer.