Changeset 1080
- Timestamp:
- Apr 17, 2020, 5:58:49 PM (5 years ago)
- Location:
- trunk/src
- Files:
-
- 1 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/angle2normal.m
r1078 r1080 3 3 % this gives the equation of the plane as norm_plane(1)x + norm_plane(2)y + norm_plane(2)z = 0 4 4 5 function norm_plane=angle2normal(PlaneAngle) 5 function norm_plane=rotate(PlaneAngle) 6 6 7 om=norm(PlaneAngle);%norm of rotation angle in degrees 7 8 OmAxis=PlaneAngle/om; %unit vector marking the rotation axis -
trunk/src/get_field.m
r1072 r1080 136 136 end 137 137 if isempty(CellInfo) 138 Field.MaxDim=max(cellfun(@numel,Field.Display.VarDimName)); 138 [Field.MaxDim,imax]=max(cellfun(@numel,Field.Display.VarDimName));% maximum number of dimensions for the input fields 139 ListDim=Field.Display.VarDimName{imax}; 139 140 check_cellinfo=false; 140 141 else 141 [Field.MaxDim,imax]=max(NbDim); 142 [Field.MaxDim,imax]=max(NbDim);% maximum number of dimensions for the input fields identified by attributes 142 143 check_cellinfo=true; 143 144 end … … 171 172 172 173 %% select the Time attribute from input 173 if isfield(ParamIn,'TimeAttrName') 174 time_index=find(strcmp(ParamIn.TimeAttrName,Field.Display.ListGlobalAttribute),1); 174 if Field.MaxDim >=2 175 variable_index=find(strcmp('variable',ListSwitchVarIndexTime),1); 176 set(handles.SwitchVarIndexTime,'Value',variable_index); 175 177 else 176 time_index=find(~cellfun('isempty',regexp(Field.Display.ListGlobalAttribute,'Time')),1);% look for global attribute containing name 'Time' 177 end 178 if isempty(time_index) 179 set(handles.SwitchVarIndexTime,'Value',1); 180 else 181 set(handles.SwitchVarIndexTime,'Value',2); 182 set(handles.TimeName,'UserData',time_index) 178 if isfield(ParamIn,'TimeAttrName') 179 time_index=find(strcmp(ParamIn.TimeAttrName,Field.Display.ListGlobalAttribute),1); 180 else 181 time_index=find(~cellfun('isempty',regexp(Field.Display.ListGlobalAttribute,'Time')),1);% look for global attribute containing name 'Time' 182 end 183 if isempty(time_index) 184 set(handles.SwitchVarIndexTime,'Value',1); 185 else 186 set(handles.SwitchVarIndexTime,'Value',2); 187 set(handles.TimeName,'UserData',time_index) 188 end 183 189 end 184 190 set(handles.SwitchVarIndexTime,'String',ListSwitchVarIndexTime) … … 258 264 %% fill menus for coordinates and time 259 265 FieldOption_Callback(handles.variables,[], handles)% list the global attributes 260 261 %% Make choices of coordinates from input262 % check_menu=false(1,numel(Data.ListVarName));263 % ListCoordMenu=1:numel(Data.ListVarName);264 % CoordIndex=CellInfo{icell}.CoordIndex(CellInfo{icell}.CoordIndex~=0);265 %266 % for ivar=find(check_coord_names)267 % check_dim=strcmp(Data.VarDimName{ivar},DimCell_var);268 % if ~isempty(find(check_dim))269 % check_menu(ivar)=true;270 % end271 % end272 % CellInfo{icell}.CoordMenu=[CoordIndex find(check_menu)];273 % ListCoordMenu(CoordIndex)=[];274 % for ivar=ListCoordMenu275 % DimCell=Data.VarDimName{ivar};276 % if isequal(DimCell,DimCell_var)277 % check_menu(ivar)=true;278 % end279 % end280 % CellInfo{icell}.CoordMenu=[CellInfo{icell}.CoordMenu find(check_menu)];281 %282 % if isfield(CellInfo{imax},'CoordIndex')283 % CoordIndex=CellInfo{imax}.CoordIndex;284 % if numel(CoordIndex)==2285 % if isfield(ParamIn,'Coord_x')&& isfield(ParamIn,'Coord_y')286 % YName=ParamIn.Coord_y;287 % XName=ParamIn.Coord_x;288 % else289 % YName=Field.ListVarName{CoordIndex(1)};290 % XName=Field.ListVarName{CoordIndex(2)};291 % end292 % ListCoord=get(handles.Coord_x,'String');293 % XIndex=find(strcmp(XName,ListCoord));294 % if ~isempty(XIndex)295 % set(handles.Coord_x,'Value',XIndex)296 % end297 % YIndex=find(strcmp(YName,ListCoord));298 % if ~isempty(YIndex)299 % set(handles.Coord_y,'Value',YIndex)300 % end301 % end302 % end303 266 304 267 %% put the GUI on the lower right of the sceen … … 663 626 var_component(var_component==scalar_index)=[]; 664 627 ListCoord=Field.Display.ListVarName([var_coord var_component]); 665 666 %% set default coord selection 628 coord_val=zeros(size(ListCoord)); 629 630 %% set default selection for grid coordinates 631 coord_val(1)=var_coord(end); 632 coord_val(2)=var_coord(end-1); 633 if numel(var_coord)>=3 634 coord_val(3)=var_coord(end-2); 635 end 667 636 % if numel(find(test_coord))>3 668 637 % SwitchVarIndexTime=get(handles.SwitchVarIndexTime,'String'); … … 675 644 % end 676 645 677 coord_val=[0 0]; 678 % look for labelled unstructured coordinates 646 %% default selection for labelled unstructured coordinates 679 647 for ilist=1:numel(var_component) 680 648 ivar=var_component(ilist); … … 696 664 coord_val([1 2])=[1 2]; 697 665 end 666 667 %% set menu and default selection for coordinates 698 668 set(handles.Coord_x,'Value',coord_val(1)) 699 669 set(handles.Coord_x,'String',ListCoord) 700 701 670 set(handles.Coord_y,'Value',coord_val(2)) 702 671 set(handles.Coord_y,'String',ListCoord) 703 704 672 if numel(coord_val)>=3 705 673 set(handles.Coord_z,'Value',coord_val(3)) … … 956 924 if ~isempty(PreviousList) 957 925 PreviousAttr=PreviousList{get(handles.TimeName, 'Value')}; 958 index=find(strcmp(PreviousAttr,Field.Display.ListGlobalAttribute s),1);926 index=find(strcmp(PreviousAttr,Field.Display.ListGlobalAttribute),1); 959 927 end 960 928 end … … 1011 979 VarIndex_y=[]; 1012 980 if ischar(cell_str) 1013 for ivar=1:length(ListVarName) 1014 varlist=ListVarName{ivar}; 1015 if isequal(varlist,cell_str) 1016 VarIndex_y= ivar; 1017 break 1018 end 1019 end 981 VarIndex_y=find(strcmp(cell_str,ListVarName),1); 1020 982 elseif iscell(cell_str) 1021 983 for isel=1:length(cell_str) … … 1030 992 end 1031 993 1032 % --- Executes on button press in CheckDimensionY. 1033 % function CheckDimensionX_Callback(hObject, eventdata, handles) 1034 % CheckDimensionX=get(handles.CheckDimensionX,'value') 1035 % if CheckDimensionX 1036 % set(handles.Coordinates,'visible','off') 1037 % else 1038 % set(handles.Coordinates,'visible','on') 1039 % end 1040 % FieldList=get(handles.FieldOption,'String'); 1041 % FieldOption=FieldList{get(handles.FieldOption,'Value')}; 1042 % switch FieldOption 1043 % case '1D plot' 1044 % 1045 % case {'scalar'} 1046 % scalar_Callback(hObject, eventdata, handles) 1047 % case 'vectors' 1048 % end 994 1049 995 1050 996 % % --- Executes on button press in CheckDimensionY. … … 1118 1064 end 1119 1065 1120 1066 %----------------------------------------------------------------------- 1121 1067 % --- Executes on button press in Check3D. 1068 %----------------------------------------------------------------------- 1122 1069 function Check3D_Callback(hObject, eventdata, handles) 1123 1070 if get(handles.Check3D,'Value')% 3D fields … … 1132 1079 set(handles.vector_z,'Visible',status) 1133 1080 set(handles.W_title,'Visible',status) 1134 if strcmp(status,'on')% ask for 3D input 1135 Field=get(handles.get_field,'UserData'); 1081 Field=get(handles.get_field,'UserData'); 1082 if strcmp(status,'on')% ask for 3D input 1136 1083 if Field.MaxDim>3% for 4D fields, propose to use the fourth variable as time 1137 1084 %set(handles.Time,'Visible','on') … … 1143 1090 else 1144 1091 set(handles.SwitchVarIndexTime,'Value',1) 1145 set(handles.SwitchVarIndexTime,'String',{'file index' })1146 end 1147 else 1092 set(handles.SwitchVarIndexTime,'String',{'file index';'attribute'}) 1093 end 1094 else 1148 1095 set(handles.SwitchVarIndexTime,'String',get(handles.SwitchVarIndexTime,'UserData')) 1096 if Field.MaxDim >=3 1097 var_index=find(strcmp('variable',get(handles.SwitchVarIndexTime,'UserData'))); 1098 set(handles.SwitchVarIndexTime,'Value',var_index) 1099 end 1149 1100 end 1150 1101 SwitchVarIndexTime_Callback(handles.SwitchVarIndexTime,[], handles) -
trunk/src/mouse_down.m
r1078 r1080 37 37 return % no action if a calculation is running 38 38 end 39 hhCurrentGUI=guidata(hCurrentGUI);% tags of the children of the current GUI 39 hhCurrentGUI=guidata(hCurrentGUI);% tags of the children of the current GUI (uvmat or view_field) 40 40 CheckZoom=0; 41 41 if isfield(hhCurrentGUI,'CheckZoom') && get(hhCurrentGUI.CheckZoom,'Value');%test for zoom action, first priority … … 48 48 49 49 %% determine the currently selected items 50 hcurrentobject=gco;% current object handle (selected by the mouse )50 hcurrentobject=gco;% current object handle (selected by the mouse: it can be a drawn object, a plot axis, ..;) 51 51 CurrentGUI_tag=get(hCurrentGUI,'Tag'); 52 52 obj_tag=get(gco,'Tag');%tag of the currently selected object … … 60 60 test_create=0; 61 61 test_edit_vect=0; 62 huvmat=findobj(allchild(0),'tag','uvmat');%find the uvmat interface handle which controls the option of 62 huvmat=findobj(allchild(0),'tag','uvmat');%find the uvmat interface handle which controls the option of mouse action 63 63 if ~isempty(huvmat) 64 64 hhuvmat=guidata(huvmat);%handles of elements in uvmat 65 UvData=get(huvmat,'UserData'); 65 UvData=get(huvmat,'UserData');% contains the input field as UvData.Field 66 66 test_ruler=isequal(get(hhuvmat.MenuRuler,'checked'),'on');%test for ruler action, second priority; 67 67 test_edit=get(hhuvmat.CheckEditObject,'Value');%&& (isequal(obj_tag,'proj_object')||isequal(obj_tag,'DeformPoint'));%test for object editing, third priority … … 209 209 end 210 210 end 211 212 213 211 if ~strcmp(htype,'axes') 212 currentaxes=get(hObject,'CurrentAxes'); 213 if ~isempty(currentaxes) 214 214 AxeData=get(currentaxes,'UserData');% data attached to the axis 215 215 AxeData.Enable='off';% desactivate current axes for mouse up action 216 216 set(currentaxes,'UserData',AxeData); 217 218 217 end 218 end 219 219 220 220 %% zoom has first priority, stop here … … 380 380 end 381 381 382 %% create projection object 382 %% create projection object within the GUI uvmat 383 383 if test_create && ~isempty(xy) && ~strcmp(get(hCurrentGUI,'SelectionType'),'alt') 384 384 % activate this option if the GUI set_object is opened … … 417 417 if isempty(ObjectData.Coord)||(isfield(ObjectData,'RangeX') && size(ObjectData.RangeX,2)==2)% draw a new plane 418 418 ObjectData.Coord=xy(1,1:2);% record the coordinates marked by the mouse as origin of the new plane 419 420 if isfield(FigData,'PlotAxes') 421 Field=FigData.PlotAxes;% field represented on the plot (already projected) 422 if isfield(Field,'ProjObjectType') && strcmp(Field.ProjObjectType,'plane') && isfield(Field,'ProjObjectCoord') && length(Field.ProjObjectCoord)>=3 423 zpos=Field.ProjObjectCoord(1,3); 424 if isfield(Field,'ProjObjectAngle')&&~isequal(Field.ProjObjectAngle,[0 0 0]) 425 norm_plane=rotate_vector(Field.ProjObjectAngle,0,0,1);%angle2normal(Field.ProjObjectAngle); 426 zpos=zpos-(norm_plane(1)*(xy(1,1)-Field.ProjObjectCoord(1))+norm_plane(2)*(xy(1,2)-Field.ProjObjectCoord(2)))/norm_plane(3); 427 end 428 ObjectData.Coord(3)=zpos; 429 end 430 end 431 419 432 set(hh_set_object.Coord,'Data',ObjectData.Coord);%append the current mouse cordinates in the GUI set_object 420 433 set(hh_set_object.num_RangeX_2,'String','') … … 422 435 drawing_status='create'; 423 436 else 437 424 438 Delta_x=(xy(1,1)-ObjectData.Coord(1,1));%displacement along x 425 439 Delta_y=(xy(1,2)-ObjectData.Coord(1,2));%displacement along y 426 ObjectData.Angle(1)=(180/pi)*angle(Delta_x+i*Delta_y); 427 ObjectData.Angle(2)=90; 428 ObjectData.RangeX(1)=0; 429 ObjectData.RangeX(2)=abs(Delta_x+i*Delta_y); 430 set(hh_set_object.num_Angle_1,'String',num2str(ObjectData.Angle(1))) 431 set(hh_set_object.num_Angle_2,'String',num2str(ObjectData.Angle(2))) 432 set(hh_set_object.num_RangeX_1,'String',num2str(ObjectData.RangeX(1))) 433 set(hh_set_object.num_RangeX_2,'String',num2str(ObjectData.RangeX(2))) 440 theta=angle(Delta_x+1i*Delta_y); 441 M2=[cos(theta) -sin(theta) 0;sin(theta) cos(theta) 0;0 0 1];% rotation matrix around the vertical axis with angle theta 442 M1=[1 0 0;0 0 -1; 0 1 0]; % rotation matrix around the x axis with angle pi/2 443 Angle=rodrigues(M2*M1); 444 [RangeX,RangeY]=set_plane_bounds(theta,ObjectData.Coord(1,:),UvData.Field); 445 set(hh_set_object.num_Angle_1,'String',num2str(Angle(1))) 446 set(hh_set_object.num_Angle_2,'String',num2str(Angle(2))) 447 set(hh_set_object.num_Angle_3,'String',num2str(Angle(3))) 448 set(hh_set_object.num_RangeX_1,'String',num2str(RangeX(1))) 449 set(hh_set_object.num_RangeX_2,'String',num2str(RangeX(2))) 450 set(hh_set_object.num_RangeY_1,'String',num2str(RangeY(1))) 451 set(hh_set_object.num_RangeY_2,'String',num2str(RangeY(2))) 434 452 drawing_status='off'; 435 453 end … … 439 457 drawing_status='create'; 440 458 end 441 drawing_status='create';459 %drawing_status='create'; 442 460 %TODO replace 0 by z coord for 3D 443 461 hobject=UvData.ProjObject{IndexObj}.DisplayHandle.(CurrentGUI_tag); … … 544 562 set(haxes,'UserData',AxeData); 545 563 564 function [RangeX,RangeY]=set_plane_bounds(theta,OriginCoord,Field) 565 566 iX=[1;0;0]; 567 iY=[0;1;0]; 568 iZ=[0;0;1]; 569 % [iX_proj,iY_proj]=rotate_vector(-PlaneAngle,iX,iY,iZ);%initial coordinates of the new base vector along X and Y 570 maxnX=[]; 571 minnX=[]; 572 Max_vec=[Field.XMax Field.YMax Field.ZMax]; 573 Min_vec=[Field.XMin Field.YMin Field.ZMin]; 574 RangeY=[Field.ZMin Field.ZMax]-OriginCoord(3);% bound on Z become bound on the new z axis at 90 ? 575 iX_proj(1)=cos(theta);%cosine of the angle of the new axis with x 576 iX_proj(2)=sin(theta); 577 OriginCoord(3)=[];% work of the bounds in x, y 578 %bounds from the input field acting on the new X axis 579 ind_bound=find(iX_proj~=0);% dimensions for which the bound acts 580 Max_vec_X=(Max_vec(ind_bound)-OriginCoord(ind_bound))./iX_proj(ind_bound);%Abscissa of upper edge in the new coordinates 581 Min_vec_X=(Min_vec(ind_bound)-OriginCoord(ind_bound))./iX_proj(ind_bound);%Abscissa of lower edge in the new coordinates 582 %lower bound of X 583 RangeX(1)=max(min(Max_vec_X,Min_vec_X)); 584 %upper bound of X 585 RangeX(2)=min(max(Max_vec_X,Min_vec_X));%must be with the field range along each coordinate x,y,z 586 587 588 589 590 -
trunk/src/mouse_motion.m
r1078 r1080 220 220 pos=[xy(1,1) xy(1,2) 0];%coordinates on the graph 221 221 if isfield(Field,'ProjObjectAngle')&&~isequal(Field.ProjObjectAngle,[0 0 0]) 222 norm_plane= angle2normal(Field.ProjObjectAngle);222 norm_plane=rotate_vector(Field.ProjObjectAngle,0,0,1);%angle2normal(Field.ProjObjectAngle); 223 223 pos(3)=-(norm_plane(1)*(pos(1)-Field.ProjObjectCoord(1))+norm_plane(2)*(pos(2)-Field.ProjObjectCoord(2)))/norm_plane(3); 224 224 end … … 390 390 end 391 391 XYData=AxeData.CurrentOrigin; 392 392 393 if isequal(AxeData.Drawing,'create') && isfield(AxeData,'CurrentOrigin') && ~isempty(AxeData.CurrentOrigin) 393 394 switch ObjectData.Type 394 395 case {'line','polyline','polygon','points'} 395 396 ObjectData.Coord=[ObjectData.Coord ;xy(1,1:2)]; 396 % ObjectData.Coord(end,:)=xy(1,:);397 plot_object(ObjectData,ProjObject,AxeData.CurrentObject,'m'); 397 398 case {'rectangle','ellipse','volume'} 398 399 ObjectData.Coord=(AxeData.CurrentOrigin+xy(1,1:2))/2;% keep only the first point coordinate 399 400 ObjectData.RangeX=abs(ObjectData.Coord(1,1)-xy(1,1));%rectangle width 400 401 ObjectData.RangeY=abs(ObjectData.Coord(1,2)-xy(1,2));%rectangle height 402 plot_object(ObjectData,ProjObject,AxeData.CurrentObject,'m'); 401 403 case 'plane' %case of 'plane' 402 404 DX=(xy(1,1)-ObjectData.Coord(1,1)); … … 409 411 end 410 412 end 411 end 412 plot_object(ObjectData,ProjObject,AxeData.CurrentObject,'m'); 413 hline=findobj(hPlotAxes,'Tag','mouse_line'); 414 if isempty(hline) 415 hline=line([AxeData.CurrentOrigin(1) xy(1,1)],[AxeData.CurrentOrigin(2) xy(1,2)],'Tag','mouse_line'); 416 else 417 set(hline,'XData',[AxeData.CurrentOrigin(1) xy(1,1)]) 418 set(hline,'YData',[AxeData.CurrentOrigin(2) xy(1,2)]) 419 end 420 end 421 413 422 pointershape='crosshair'; 414 423 elseif test_edit_object && isequal(AxeData.Drawing,'translate') -
trunk/src/mouse_up.m
r1072 r1080 199 199 hparentfig=hcurrentfig; 200 200 %open or update a new zoom figure if a rectangle has been drawn 201 if ishandle(hcurrentaxes) ;201 if ishandle(hcurrentaxes) 202 202 if isfield(AxeData,'CurrentRectZoom') && ~isempty(AxeData.CurrentRectZoom) && ishandle(AxeData.CurrentRectZoom) 203 203 %PosRect=get(AxeData.CurrentRectZoom,'Position'); -
trunk/src/phys_XYZ.m
r1078 r1080 86 86 Ty=Calib.Tx_Ty_Tz(2); 87 87 Tz=Calib.Tx_Ty_Tz(3); 88 f=Calib.fx_fy(1);%dpy=1; sx=189 %dpx=Calib.fx_fy(2)/Calib.fx_fy(1);90 88 Dx=R(5)*R(7)-R(4)*R(8); 91 89 Dy=R(1)*R(8)-R(2)*R(7); … … 101 99 A21=-R(7)*Ty+R(4)*Tz+Z21*Z0virt; 102 100 A22=-R(1)*Tz+R(7)*Tx+Z22*Z0virt; 103 % X0=Calib.fx_fy(1)*(R(5)*Tx-R(2)*Ty+Zx0*Z0virt);104 % Y0=Calib.fx_fy(2)*(-R(4)*Tx+R(1)*Ty+Zy0*Z0virt);105 101 X0=(R(5)*Tx-R(2)*Ty+Zx0*Z0virt); 106 102 Y0=(-R(4)*Tx+R(1)*Ty+Zy0*Z0virt); 107 103 %px to camera: 108 % Xd=dpx*(X-Calib.Cx_Cy(1)); % sensor coordinates109 % Yd=(Y-Calib.Cx_Cy(2));110 104 Xd=(X-Calib.Cx_Cy(1))/Calib.fx_fy(1); % sensor coordinates 111 105 Yd=(Y-Calib.Cx_Cy(2))/Calib.fx_fy(2); 112 dist_fact=1+Calib.kc*(Xd.*Xd+Yd.*Yd);%/(f*f); %distortion factor 113 Xu=Xd./dist_fact;%undistorted sensor coordinates 114 Yu=Yd./dist_fact; 106 dist_fact=1+Calib.kc*(Xd.*Xd+Yd.*Yd);% distortion factor, first approximation Xu,Yu=Xd,Yd 107 test=0; 108 niter=0; 109 while test==0 && niter<10 110 dist_fact_old=dist_fact; 111 Xu=Xd./dist_fact;%undistorted sensor coordinates, second iteration 112 Yu=Yd./dist_fact; 113 dist_fact=1+Calib.kc*(Xu.*Xu+Yu.*Yu);% distortion factor,next approximation 114 test=max(max(abs(dist_fact-dist_fact_old)))<0.00001; % reducing the relative error to 10^-5 forthe inversion of the quadraticcorrection 115 niter=niter+1; 116 end 115 117 denom=Dx*Xu+Dy*Yu+D0; 116 118 Xphys=(A11.*Xu+A12.*Yu+X0)./denom;%world coordinates -
trunk/src/plot_object.m
r1071 r1080 150 150 xline=[xline; ObjectData.Coord(1,1)];%closing the line 151 151 yline=[yline; ObjectData.Coord(1,2)]; 152 case {'plane',' plane_z','volume'}152 case {'plane','volume'} 153 153 if ~isfield(ObjectData,'Angle') 154 ObjectData.Angle=[0 0 ];155 end 156 cosphi=cos(ObjectData.Angle( 1)*pi/180);%angle in radians157 sinphi=sin(ObjectData.Angle( 1)*pi/180);%angle in radians154 ObjectData.Angle=[0 0 0]; 155 end 156 cosphi=cos(ObjectData.Angle(3)*pi/180);%angle in radians 157 sinphi=sin(ObjectData.Angle(3)*pi/180);%angle in radians 158 158 x0=xline(1); y0=yline(1); 159 159 xlim=get(haxes,'XLim'); … … 331 331 332 332 %% MODIFY AN EXISTING OBJECT PLOT 333 if test_newobj==0 ;333 if test_newobj==0 334 334 hh=hplot; 335 335 PlotData=get(hplot,'UserData'); … … 375 375 NbDeformPoint=length(PlotData.DeformPoint); 376 376 if NbDeformPoint>nbpoints% fpoints in excess on the graph 377 for ii=nbpoints+1:NbDeformPoint ;377 for ii=nbpoints+1:NbDeformPoint 378 378 if ishandle(PlotData.DeformPoint(ii)) 379 379 delete(PlotData.DeformPoint(ii)) … … 472 472 col,'LineStyle','none','Marker','.','Tag','DeformPoint','SelectionHighlight','off','UserData',hh); 473 473 end 474 case {'plane','volume' ,'plane_z'}474 case {'plane','volume'} 475 475 hh=line(xline,yline,'Color',col); 476 476 PlotData.SubObject(1)=line(xsup,ysup,'Color',col,'LineStyle',SubLineStyle,'Tag','proj_object'); -
trunk/src/proj_field.m
r1078 r1080 807 807 808 808 if max(NbDim)==3 % 3D case 809 AZName=FieldData.ListVarName{CellInfo{icell}.CoordIndex(end)}; 810 AYName=FieldData.ListVarName{CellInfo{icell}.CoordIndex(end-1)}; 811 AXName=FieldData.ListVarName{CellInfo{icell}.CoordIndex(end-2)}; 812 AX=FieldData.(AXName);% set of x positions 813 AY=FieldData.(AYName);% set of y positions 814 AZ=FieldData.(AZName);% set of z positions 815 AName=FieldData.ListVarName{VarIndex(1)}; 816 npxy=size(FieldData.(AName)); 817 npz=npxy(1); 818 npy=npxy(2); 819 npx=npxy(1); 820 AXI=linspace(AX(1),AX(end), npx);%set of x positions for the interpolated input data 821 AYI=linspace(AY(1),AY(end), npy);%set of x positions for the interpolated input data 822 AZI=linspace(AZ(1),AZ(end), npy);%set of x positions for the interpolated input data 809 AXName=FieldData.ListVarName{CellInfo{icell}.CoordIndex(3)}; 810 Coord{1}=FieldData.(FieldData.ListVarName{CellInfo{icell}.CoordIndex(1)});%initial z coordinates 811 Coord{2}=FieldData.(FieldData.ListVarName{CellInfo{icell}.CoordIndex(2)});%initial y coordinates 812 Coord{3}=FieldData.(AXName);%initial x coordinates 813 if size(ObjectData.Coord,2)<3 814 ObjectData.Coord(1,3)=0; 815 end 816 dline=ObjectData.Coord(2,:)-ObjectData.Coord(1,:); 817 linelength=norm(dline); 818 if isfield(FieldData,'RangeX') 819 XMin=min(FieldData.RangeX);%shift of the origin on the line 820 else 821 XMin=0; 822 end 823 ProjData.(AXName)=XMin:ObjectData.DX:XMin+linelength;%abscissa of the projected data along the line 824 825 XI_proj=ObjectData.Coord(1,1)*ones(size(ProjData.(AXName))); 826 YI_proj=ObjectData.Coord(1,2)*ones(size(ProjData.(AXName))); 827 ZI_proj=ObjectData.Coord(1,3)*ones(size(ProjData.(AXName))); 828 if dline(1,1)~=0 829 XI_proj=XI_proj+ProjData.(AXName)/dline(1,1); 830 end 831 if dline(1,2)~=0 832 YI_proj=YI_proj+ProjData.(AXName)/dline(1,2); 833 end 834 if dline(1,3)~=0 835 ZI_proj=ZI_proj+ProjData.(AXName)/dline(1,3); 836 end 823 837 for ivar=VarIndex 824 VarName=FieldData.ListVarName{ivar}; 825 FieldData.(VarName)=interp3(FieldData.(AXName),FieldData.(AYName),FieldData.(AZName),FieldData.(VarName),AXI,AYI,AZI); 826 827 % vec_A=reshape(squeeze(FieldData.(FieldData.ListVarName{ivar})),npx*npy,nbcolor); %put the original image in colum 828 % if nbcolor==1 829 % vec_B(ind_in)=vec_A(ICOMB); 830 % vec_B(ind_out)=zeros(size(ind_out)); 831 % A_out=reshape(vec_B,npY,npX); 832 % ProjData.(FieldData.ListVarName{ivar}) =sum(A_out,1)/npY; 833 % elseif nbcolor==3 834 % vec_B(ind_in,1:3)=vec_A(ICOMB,:); 835 % vec_B(ind_out,1)=zeros(size(ind_out)); 836 % vec_B(ind_out,2)=zeros(size(ind_out)); 837 % vec_B(ind_out,3)=zeros(size(ind_out)); 838 % A_out=reshape(vec_B,npY,npX,nbcolor); 839 % ProjData.(FieldData.ListVarName{ivar})=squeeze(sum(A_out,1)/npY); 840 % end 838 VarName=FieldData.ListVarName{ivar}; 839 % ListVarName=[ListVarName VarName]; 840 % VarDimName=[VarDimName {{'coord_y','coord_x'}}]; 841 % VarAttribute{length(ListVarName)}=FieldData.VarAttribute{ivar}; %reproduce the variable attributes 841 842 ProjData.ListVarName=[ProjData.ListVarName FieldData.ListVarName{ivar}]; 842 843 ProjData.VarDimName=[ProjData.VarDimName {AXName}];%to generalize with the initial name of the x coordinate 843 844 ProjData.VarAttribute{ivar}.Role='continuous';% for plot with continuous line 844 end 845 845 846 FieldData.(VarName)=permute(FieldData.(VarName),[2 3 1]); %coordinate permutation needed to use interp3 847 indexnan=isnan(FieldData.(VarName)); 848 FieldData.(VarName)(indexnan)=0;%set to zero the undefined values 849 ProjData.(VarName)=interp3(Coord{3},Coord{2},Coord{1},double(FieldData.(VarName)),XI_proj,YI_proj,ZI_proj,'*linear'); 850 ProjData.(VarName)=squeeze(ProjData.(VarName)); 851 end 852 846 853 else 847 854 AYName=FieldData.ListVarName{CellInfo{icell}.CoordIndex(end-1)}; … … 959 966 ProjData.VarDimName{end}={AXName,'rgb'}; 960 967 end 961 962 963 964 965 966 967 968 969 968 end 969 970 end 971 % for vector fields, take the components longitudinal and tranverse to the projection line 972 if ~isempty(ivar_U) && ~isempty(ivar_V) 973 vector_x =ProjData.(ProjData.ListVarName{ivar_U}); 974 ProjData.(ProjData.ListVarName{ivar_U}) =cos(theta)*vector_x+sin(theta)*ProjData.(ProjData.ListVarName{ivar_V}); 975 ProjData.(ProjData.ListVarName{ivar_V}) =-sin(theta)*vector_x+cos(theta)*ProjData.(ProjData.ListVarName{ivar_V}); 976 end 970 977 end 971 978 … … 1002 1009 1003 1010 %% rotation matrix 1004 PlaneAngle=[0 0 ];1011 PlaneAngle=[0 0 0]; 1005 1012 norm_plane=[0 0 1]; 1006 test90x=0;%=1 for 90 degree rotation alround x axis 1007 test90y=0;%=1 for 90 degree rotation alround y axis 1008 1009 if isfield(ObjectData,'Angle') 1010 checkM2=0; 1011 if numel(ObjectData.Angle)==2 && ~isequal(ObjectData.Angle,[0 0]) 1012 checkM2=1; 1013 test90y=0;%isequal(ObjectData.Angle,[0 90 0]); 1014 end 1015 PlaneAngle=(pi/180)*ObjectData.Angle; 1016 if PlaneAngle==0 1017 PlaneAngle=[0 0]; 1018 end 1019 M1=[cos(PlaneAngle(1)) -sin(PlaneAngle(1)) 0;sin(PlaneAngle(1)) cos(PlaneAngle(1)) 0;0 0 1]; 1020 M=M1; 1021 if checkM2 1022 M2=[1 0 0;0 cos(PlaneAngle(2)) -sin(PlaneAngle(2));0 sin(PlaneAngle(2)) cos(PlaneAngle(2))]; 1023 M=M1*M2;% first rotate in the x,y plane with angle PlaneAngle(1), then slant around the new x axis0 with angle PlaneAngle(2) 1024 end 1013 testangle=0; 1014 test90x=0; 1015 test90y=0; 1016 if isfield(ObjectData,'Angle') && size(ObjectData.Angle,2)==3 1017 test90x=isequal(ObjectData.Angle,[90 0 0]);%=1 for 90 degree rotation alround x axis 1018 test90y=isequal(ObjectData.Angle,[0 90 0]);%=1 for 90 degree rotation alround y axis 1019 %test90z=isequal(PlaneAngle,[90 0 0]);%=1 for 90 degree rotation alround x axis 1020 PlaneAngle=(pi/180)*ObjectData.Angle; 1021 M=rodrigues(PlaneAngle); 1025 1022 norm_plane=M*[0 0 1]'; 1026 end 1027 testangle=~isequal(PlaneAngle,[0 0])||~isequal(ObjectData.Coord(1:2),[0 0 ]) ;% && ~test90y && ~test90x;%=1 for slanted plane 1023 testangle= (~isequal(PlaneAngle,[0 0 0]) && ~test90x && ~test90y);%=1 for slanted plane 1024 end 1028 1025 1029 1026 %% mesh sizes DX and DY … … 1235 1232 VarAttribute={};% initiate coresponding list of var attributes for cell # icell 1236 1233 %%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1237 switch CellInfo{icell}.CoordType1238 1234 check3D=(numel(CellInfo{icell}.CoordIndex)==3); 1235 switch CellInfo{icell}.CoordType 1239 1236 case 'scattered' 1240 1237 %% case of input fields with unstructured coordinates (applies for projMode ='projection' or 'interp_lin') … … 1244 1241 coord_x=FieldData.(CellInfo{icell}.XName);% initial x coordinates 1245 1242 coord_y=FieldData.(CellInfo{icell}.YName);% initial y coordinates 1246 check3D=(numel(CellInfo{icell}.CoordIndex)==3);1243 1247 1244 if check3D 1248 1245 coord_z=FieldData.(CellInfo{icell}.ZName); … … 1271 1268 1272 1269 %rotate coordinates if needed: coord_X,coord_Y= = coordinates in the new plane 1273 Phi=PlaneAngle(1); 1274 % Theta=PlaneAngle(2); 1275 % Phi=PlaneAngle(3); 1276 if testangle && ~test90y && ~test90x;%=1 for slanted plane 1277 coord_X=coord_x *cos(Phi) + coord_y* sin(Phi); 1278 coord_Y=-coord_x *sin(Phi) + coord_y *cos(Phi); 1279 if checkM2 1280 coord_Y=coord_Y*cos(PlaneAngle(2)); 1281 coord_Y=coord_Y+coord_z *sin(PlaneAngle(2)); 1282 coord_X=(coord_X *cos(Psi) - coord_Y* sin(Psi));%A VERIFIER 1283 coord_Y=(coord_X *sin(Psi) + coord_Y* cos(Psi)); 1270 1271 Phi=PlaneAngle(3); 1272 if testangle 1273 if check3D 1274 [coord_X,coord_Y]=rotate_vector(PlaneAngle,coord_x,coord_y,coord_z); 1275 else 1276 coord_X=coord_x *cos(Phi) + coord_y* sin(Phi); 1277 coord_Y=-coord_x *sin(Phi) + coord_y *cos(Phi); 1284 1278 end 1285 1279 else … … 1415 1409 1416 1410 %rotate coordinates if needed: coord_X,coord_Y= = coordinates in the new plane 1417 Phi=PlaneAngle( 1);1411 Phi=PlaneAngle(3); 1418 1412 if testangle && ~test90y && ~test90x %=1 for slanted plane 1419 1413 new_XI=XI *cos(Phi) - YI* sin(Phi)+ObjectData.Coord(1); … … 1688 1682 % determine the boundaries of the projected field, 1689 1683 % first find the 8 summits of the initial volume in the 1690 PlaneAngle=[0 0 0];% default1691 PlaneAngle(1:numel(ObjectData.Angle))=ObjectData.Angle*pi/180;1684 % PlaneAngle=[0 0 0];% default 1685 % PlaneAngle(1:numel(ObjectData.Angle))=ObjectData.Angle*pi/180; 1692 1686 % new coordinates 1693 1687 Coord{1}=FieldData.(FieldData.ListVarName{CellInfo{icell}.CoordIndex(1)});%initial z coordinates 1694 1688 Coord{2}=FieldData.(FieldData.ListVarName{CellInfo{icell}.CoordIndex(2)});%initial y coordinates 1695 1689 Coord{3}=FieldData.(FieldData.ListVarName{CellInfo{icell}.CoordIndex(3)});%initial x coordinates 1696 % summit=zeros(3,8);% initialize summit coordinates 1697 % summit(1,1:4)=[Coord{3}(1) Coord{3}(end) Coord{3}(1) Coord{3}(end)];%square 1698 % summit(2,1:4)=[Coord{2}(1) Coord{2}(1) Coord{2}(end) Coord{2}(end)];% square at z= Coord{1}(1) 1699 % summit(1:2,5:8)=summit(1:2,1:4); 1700 % summit(3,:)=[Coord{1}(1)*ones(1,4) Coord{1}(end)*ones(1,4)]; 1701 % %Mrot_inv=rodrigues(-PlaneAngle); 1702 % newsummit=zeros(3,8);% initialize the rotated summit coordinates 1703 ObjectData.Coord=ObjectData.Coord';% set ObjectData.Coord as a vertical vector 1704 if size(ObjectData.Coord,1)<3 1705 ObjectData.Coord=[ObjectData.Coord; 0];%add z origin at z=0 by default 1706 end 1690 1691 coord_x_proj=ObjectData.RangeX(1):InterpMesh:ObjectData.RangeX(2);% set of coordinates in the projection plane 1692 coord_y_proj=ObjectData.RangeY(1):InterpMesh:ObjectData.RangeY(2); 1693 %coord_z_proj=-floor(ObjectData.RangeInterp/InterpMesh):InterpMesh:floor(ObjectData.RangeInterp/InterpMesh); 1694 M=rodrigues(ObjectData.Angle); 1695 [XI,YI]=meshgrid(coord_x_proj,coord_y_proj); 1696 XI_proj=M(1,1)*XI+M(2,1)*YI+ObjectData.Coord(1,1); 1697 YI_proj=M(2,1)*XI+M(2,2)*YI+ObjectData.Coord(1,2); 1698 ZI_proj=M(3,1)*XI+M(3,2)*YI+ObjectData.Coord(1,3); 1707 1699 1708 % M1=[cos(PlaneAngle(1)) sin(PlaneAngle(1)) 0;-sin(PlaneAngle(1)) cos(PlaneAngle(1)) 0;0 0 1]; 1709 % M2=[1 0 0;0 cos(PlaneAngle(2)) sin(PlaneAngle(2));0 -sin(PlaneAngle(2)) cos(PlaneAngle(2))]; 1710 % M=M1*M2; 1711 M_inv=inv(M); 1712 1713 % for isummit=1:8% TODO: introduce a function for rotation of n points (to use also for scattered data) 1714 % newsummit(:,isummit)=M*(summit(:,isummit)-(ObjectData.Coord)); 1715 % end 1716 % coord_x_proj=min(newsummit(1,:)):InterpMesh: max(newsummit(1,:));% set of coordinqtes in the projection plane 1717 % coord_y_proj=min(newsummit(2,:)):InterpMesh: max(newsummit(2,:)); 1718 % coord_z_proj=-width:width; 1719 coord_x_proj=ObjectData.RangeX(1):InterpMesh:ObjectData.RangeX(2);% set of coordinqtes in the projection plane 1720 coord_y_proj=ObjectData.RangeY(1):InterpMesh:ObjectData.RangeY(2); 1721 coord_z_proj=-floor(ObjectData.RangeInterp/InterpMesh):InterpMesh:floor(ObjectData.RangeInterp/InterpMesh); 1722 %Mrot=rodrigues(PlaneAngle);% inverse rotation matrix 1723 %Origin=M_inv*[coord_x_proj(1);coord_y_proj(1);coord_z_proj(1)]+ObjectData.Coord; 1724 npx=numel(coord_x_proj); 1725 npy=numel(coord_y_proj); 1726 npz=numel(coord_z_proj); 1727 1728 %modangle=sqrt(PlaneAngle(1)*PlaneAngle(1)+PlaneAngle(2)*PlaneAngle(2)); 1729 % cosphi=PlaneAngle(1)/modangle; 1730 % sinphi=PlaneAngle(2)/modangle; 1731 iX=[coord_x_proj(end)-coord_x_proj(1);0;0]/(npx-1); 1732 iY=[0;coord_y_proj(end)-coord_y_proj(1);0]/(npy-1); 1733 if npz==1 1734 iZ=[0;0;0]; 1735 else 1736 iZ=[0;0;coord_z_proj(end)-coord_z_proj(1)]/(npz-1); 1737 end 1738 % iX(1:2)=[cosphi -sinphi;sinphi cosphi]*iX(1:2); 1739 % iY(1:2)=[-cosphi -sinphi;sinphi cosphi]*iY(1:2); 1740 1741 ix=M_inv*iX;% vector along the new x coordinates transformed into old coordinates 1742 iy=M_inv*iY;% vector along y coordinates 1743 iz=M_inv*iZ;% vector along z coordinates 1744 1745 [Grid_x,Grid_y,Grid_z]=meshgrid(0:npx-1,0:npy-1,0:npz-1); 1746 %[Grid_x,Grid_y,Grid_z]=meshgrid(0:npz-1,0:npy-1,0:npx-1); 1747 if ismatrix(Grid_x)% add a singleton in case of a single z value 1748 Grid_x=shiftdim(Grid_x,-1); 1749 Grid_y=shiftdim(Grid_y,-1); 1750 Grid_z=shiftdim(Grid_z,-1); 1751 end 1752 XI=ObjectData.Coord(1)+ix(1)*Grid_x+iy(1)*Grid_y+iz(1)*Grid_z; 1753 YI=ObjectData.Coord(2)+ix(2)*Grid_x+iy(2)*Grid_y+iz(2)*Grid_z; 1754 ZI=ObjectData.Coord(3)+ix(3)*Grid_x+iy(3)*Grid_y+iz(3)*Grid_z; 1755 % [X,Y,Z]=meshgrid(Coord{3},Coord{2},Coord{1});% grid of initial coordinates 1700 1756 1701 for ivar=VarIndex 1757 1702 VarName=FieldData.ListVarName{ivar}; … … 1764 1709 ProjData.coord_x=coord_x_proj; 1765 1710 ProjData.coord_y=coord_y_proj; 1766 ProjData.(VarName)=interp3(Coord{3},Coord{2},Coord{1},double(FieldData.(VarName)), ZI,YI,XI,'*linear');1767 ProjData.(VarName)=nanmean(ProjData.(VarName), 1);1711 ProjData.(VarName)=interp3(Coord{3},Coord{2},Coord{1},double(FieldData.(VarName)),XI_proj,YI_proj,ZI_proj,'*linear'); 1712 ProjData.(VarName)=nanmean(ProjData.(VarName),3); 1768 1713 ProjData.(VarName)=squeeze(ProjData.(VarName)); 1769 1714 end … … 1797 1742 UName=ListVarName{ivar_U}; 1798 1743 VName=ListVarName{ivar_V}; 1799 if check M21744 if check3D 1800 1745 UValue=cos(PlaneAngle(1))*ProjData.(UName)+ sin(PlaneAngle(1))*ProjData.(VName); 1801 1746 ProjData.(VName)=(-sin(PlaneAngle(1))*ProjData.(UName)+ cos(PlaneAngle(1))*ProjData.(VName)); -
trunk/src/series/LIF_series.m
r1071 r1080 1 1 %---------------------------------------------------------------------- 2 % -process LIF images 2 % -process LIF images:old function to update 3 3 %---------------------------------------------------------------------- 4 4 … … 21 21 %======================================================================= 22 22 23 function GUI_input=LIF_series(num_i1,num_i2,num_j1,num_j2,Series);23 function ParamOut=LIF_series(Param) 24 24 25 25 %requests for the visibility of input windows in the GUI series (activated directly by the selection in the menu ACTION) 26 26 if ~exist('num_i1','var') 27 GUI_input={'RootPath';'two';...%nbre of possible input series (options 'on'/'two'/'many', default:'one')27 ParamOut={'RootPath';'two';...%nbre of possible input series (options 'on'/'two'/'many', default:'one') 28 28 'SubDir';'on';... % subdirectory of derived files (PIV fields), ('on' by default) 29 29 'RootFile';'on';... %root input file name ('on' by default) … … 40 40 return %exit the function 41 41 end 42 43 %-------------------------------------------------44 hseries=guidata(Series.hseries);%handles of the GUI series45 WaitbarPos=get(hseries.waitbar_frame,'Position'); %positiopn of waitbar frame46 %-------------------------------------------------47 addpath '/fsnet/project/coriolis/2006/06ICEBOX/0_MATLAB_WORK/LIF'% define path for concentration.m48 % cpath=which('series');49 42 50 43 %mode=''; %default -
trunk/src/set_object.m
r1072 r1080 38 38 function varargout = set_object(varargin) 39 39 40 % Last Modified by GUIDE v2.5 0 9-Nov-2016 15:46:0440 % Last Modified by GUIDE v2.5 01-Apr-2020 22:25:49 41 41 42 42 % Begin initialization code - DO NOT REFRESH … … 96 96 ZBounds=0; %default 97 97 end 98 test3D=(ZBounds~=0); % =1 for 3D fleds 98 99 set(hObject,'WindowButtonDownFcn',{'mouse_down'})%set mouse click action function 99 100 set(hObject,'DeleteFcn',{@closefcn}) … … 137 138 end 138 139 end 139 if isfield(data,'RangeX') && ~strcmp(data.Type,'plane_z')%TODO: generalise140 if isfield(data,'RangeX') 140 141 if ischar(data.RangeX) 141 142 data.RangeX=str2num(data.RangeX); … … 160 161 end 161 162 end 162 if ~ isfield(data,'Angle')163 data.Angle=[0 0 ];163 if ~(isfield(data,'Angle') && size(data.Angle,2)==3) 164 data.Angle=[0 0 0]; 164 165 end 165 166 set(handles.num_Angle_1,'String',num2str(data.Angle(1))) 166 if numel(data.Angle)==2 167 set(handles.num_Angle_2,'Visible','on') 168 set(handles.num_Angle_2,'String',num2str(data.Angle(2))) 167 set(handles.num_Angle_2,'String',num2str(data.Angle(2))) 168 set(handles.num_Angle_3,'String',num2str(data.Angle(3))) 169 if test3D 170 set(handles.num_Angle_1,'Visible','on') 171 set(handles.num_Angle_2,'Visible','on') 169 172 end 170 173 end … … 286 289 value=get(handles.Type,'Value'); 287 290 ObjectStyle=menu{value}; 288 %%%%%%%%% TODO 289 test3D=strcmp(ObjectStyle,'plane_z'); %TODO: generalize 290 %%%%%%%%% 291 291 292 %default setting 292 set(handles.num_Angle_1,'Visible','off')293 set(handles.num_Angle_2,'Visible','off')294 % set(handles.num_Angle_3,'Visible','off')293 % set(handles.num_Angle_1,'Visible','off') 294 % set(handles.num_Angle_2,'Visible','off') 295 % set(handles.num_Angle_3,'Visible','off') 295 296 set(handles.num_RangeX_1,'Visible','off') 296 297 set(handles.num_RangeY_1,'Visible','off') 297 % if isequal(ProjMode,'interp_lin')|| isequal(ProjMode,'interp_tps')298 % set(handles.num_RangeY_2,'Visible','off')299 % else300 % set(handles.num_RangeY_2,'Visible','on')301 298 302 299 set(handles.num_RangeZ_1,'Visible','off') … … 336 333 set(handles.num_RangeInterp,'Visible','on') 337 334 end 338 case {'plane' ,'plane_z'}339 set(handles.num_Angle_ 1,'Visible','on')335 case {'plane'} 336 set(handles.num_Angle_3,'Visible','on') 340 337 set(handles.num_RangeX_1,'Visible','on') 341 338 set(handles.num_RangeX_2,'Visible','on') … … 343 340 set(handles.num_RangeY_2,'Visible','on') 344 341 set(handles.num_RangeZ_2,'TooltipString','num_ZMax: range of projection normal to the plane') 345 if test3D346 set(handles.num_Angle_2,'Visible','on')347 set(handles.num_Angle_1,'Visible','on')348 349 %set(handles.Coord,'Data',[0 0 0])350 set(handles.num_RangeZ_2,'Visible','on')351 end342 % if test3D 343 % set(handles.num_Angle_2,'Visible','on') 344 % set(handles.num_Angle_1,'Visible','on') 345 % %set(handles.num_Angle_1,'String','90') 346 % %set(handles.Coord,'Data',[0 0 0]) 347 % set(handles.num_RangeZ_2,'Visible','on') 348 % end 352 349 if isequal(ProjMode,'interp_lin')|| isequal(ProjMode,'interp_tps') 353 350 set(handles.num_DX,'Visible','on') … … 826 823 827 824 828 829 825 function num_RangeInterp_Callback(hObject, eventdata, handles) 830 831 832 %833 826 834 827 … … 836 829 function suggest_refresh(hObject, eventdata, handles) 837 830 set(handles.REFRESH,'BackgroundColor',[1 0 1]) 831 832 833 function num_Angle_3_Callback(hObject, eventdata, handles) -
trunk/src/uvmat.m
r1078 r1080 1024 1024 return 1025 1025 end 1026 data.Angle=[ 0 90];1026 data.Angle=[90 0 0]; 1027 1027 data.DX=UvData.Field.CoordMesh; 1028 1028 data.DY=UvData.Field.CoordMesh; … … 6099 6099 end 6100 6100 for iobj=IndexObj+1:length(UvData.ProjObject) 6101 hdisplay=UvData.ProjObject{iobj}.DisplayHandle.uvmat; 6101 hdisplay=UvData.ProjObject{iobj}.DisplayHandle.uvmat;%handle of the object drawing 6102 6102 for iview=1:length(hdisplay) 6103 6103 if ishandle(hdisplay(iview)) && ~isequal(hdisplay(iview),0)
Note: See TracChangeset
for help on using the changeset viewer.