Changeset 309 for trunk/src/mouse_motion.m
- Timestamp:
- Nov 30, 2011, 11:09:12 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/mouse_motion.m
r292 r309 218 218 % case of PIV correlation display 219 219 if test_piv 220 par=civ('read_param_civ1',hhciv); 220 %par=civ('read_param_civ1',hhciv); 221 par=read_GUI(hhciv.Civ1); 221 222 [dd,ind_pt]=min(abs(Field.X-xy(1,1))+abs(Field.Y-xy(1,2))); 222 223 xround=Field.X(ind_pt); 223 224 yround=Field.Y(ind_pt); 225 par.PointCoord=[xround size(Field.A,1)-yround+1]; 224 226 % mark the correlation box with a rectangle 225 ibx2=floor((str2double(par.ibx)-1)/2); 226 iby2=floor((str2double(par.iby)-1)/2); 227 isx2=floor((str2double(par.isx)-1)/2); 228 isy2=floor((str2double(par.isy)-1)/2); 229 shiftx=str2double(par.shiftx); 230 shifty=str2double(par.shifty); 227 par.filename_ima_a=Field.A; 228 par.filename_ima_b=Field.B; 229 Param.Civ1=par; 230 ibx2=floor((par.Bx-1)/2); 231 iby2=floor((par.By-1)/2); 232 isx2=floor((par.Searchx-1)/2); 233 isy2=floor((par.Searchy-1)/2); 234 shiftx=par.Shiftx; 235 shifty=par.Shifty; 231 236 hhh=findobj(haxes,'Tag','PIV_box_marker'); 232 237 hhhh=findobj(haxes,'Tag','PIV_search_marker'); … … 244 249 set(hhhh,'Position',[xround-isx2+shiftx yround-isy2+shifty 2*isx2 2*isy2]) 245 250 end 246 [xtable ytable utable vtable ctable typevector result_conv] = pivlab (Field.A,Field.B,ibx2,iby2,isx2,isy2,shiftx,shifty,[xround size(Field.A,1)-yround+1], 1, []); 251 %[xtable, ytable, utable, vtable, ctable, typevector, result_conv] = ... 252 % pivlab (Field.A,Field.B,ibx2,iby2,isx2,isy2,shiftx,shifty,[xround size(Field.A,1)-yround+1], 1, []); 253 [Data,errormsg,result_conv]= civ_matlab(Param) 247 254 rangx(1)=-(isx2-ibx2)+shiftx; 248 255 rangx(2)=isx2-ibx2+shiftx; … … 261 268 set(0,'CurrentFigure',corrfig(1)) 262 269 AxeData.CurrentCorrImage=imagesc(rangx,-rangy,result_conv,[0 1]); 263 AxeData.CurrentVector=line([0 utable],[0 vtable],'Tag','vector');270 AxeData.CurrentVector=line([0 Data.Civ1_U],[0 -Data.Civ1_V],'Tag','vector'); 264 271 265 272 colorbar … … 271 278 set(AxeData.CurrentCorrImage,'XData',rangx) 272 279 set(AxeData.CurrentCorrImage,'YData',-rangy) 273 set(AxeData.CurrentVector,'XData',[0 utable],'YData',[0 -vtable])280 set(AxeData.CurrentVector,'XData',[0 Data.Civ1_U],'YData',[0 -Data.Civ1_V]) 274 281 end 275 282 end
Note: See TracChangeset
for help on using the changeset viewer.