source: trunk/src/uvmat_doc/FUNCTIONS_DOC/update_obj.html @ 37

Last change on this file since 37 was 37, checked in by sommeria, 14 years ago

create_grid.fig ,
uvmat_doc and all the included files added

File size: 11.0 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2                "http://www.w3.org/TR/REC-html40/loose.dtd">
3<html>
4<head>
5  <title>Description of update_obj</title>
6  <meta name="keywords" content="update_obj">
7  <meta name="description" content="'update_obj': update the object graph representation and its projection field, record it in the uvmat interface">
8  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
9  <meta name="generator" content="m2html &copy; 2003 Guillaume Flandin">
10  <meta name="robots" content="index, follow">
11  <link type="text/css" rel="stylesheet" href="../m2html.css">
12</head>
13<body>
14<a name="_top"></a>
15<div><a href="../index.html">Home</a> &gt;  <a href="index.html">.</a> &gt; update_obj.m</div>
16
17<!--<table width="100%"><tr><td align="left"><a href="../index.html"><img alt="<" border="0" src="../left.png">&nbsp;Master index</a></td>
18<td align="right"><a href="index.html">Index for .&nbsp;<img alt=">" border="0" src="../right.png"></a></td></tr></table>-->
19
20<h1>update_obj
21</h1>
22
23<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
24<div class="box"><strong>'update_obj': update the object graph representation and its projection field, record it in the uvmat interface</strong></div>
25
26<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
27<div class="box"><strong>function Object_out=update_obj(UvData,IndexObj,ObjectData,PlotHandles) </strong></div>
28
29<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
30<div class="fragment"><pre class="comment">'update_obj': update the object graph representation and its projection field, record it in the uvmat interface
31-------------------------------------------------------------------
32Object=update_obj(UvData,IndexObj,ObjectData,PlotHandles);
33
34OUTPUT:
35UvData: data to be stored as 'Userdata' on the uvmat interface
36IndexObj: object index for a new object added to the list in UvData
37   the function updates UvData.Object{IndexObj}, and possibly adds a new plot (UvData.Plane or Line) in the list atached to the interface
38
39INPUT:
40UvIn: structure stored as 'Userdata' on the uvmat interface
41IndexObjIn: object index for an existing objects stored in UvData
42ObjectData: structure containing the input object properties
43PlotHandles: structure containing the handles of the plotting parameter buttons on the uvmat interface (obtained by get_plot_handles.m)
44-------------------------------------</pre></div>
45
46<!-- crossreference -->
47<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
48This function calls:
49<ul style="list-style-image:url(../matlabicon.gif)">
50<li><a href="plot_field.html" class="code" title="function [PlotType,PlotParamOut,haxes]= plot_field(Data,haxes,PlotParam,KeepLim,PosColorbar)">plot_field</a>  'plot_field': plot any field with the structure defined in the uvmat package</li><li><a href="plot_object.html" class="code" title="function [hh]=plot_object(ObjectDataIn,ProjObject,hplot,col)">plot_object</a>       'plot_object': draws a projection object (points, line, plane...)</li><li><a href="proj_field.html" class="code" title="function [ProjData,errormsg]=proj_field(FieldData,ObjectData,IndexObj)">proj_field</a>  'proj_field': projects the field on a projection object</li><li><a href="set_title.html" class="code" title="function TITLE=set_title(Style,ProjMode)">set_title</a>    'set_title': defines the 'TITLE' of a projection object</li></ul>
51This function is called by:
52<ul style="list-style-image:url(../matlabicon.gif)">
53<li><a href="mouse_up.html" class="code" title="function mouse_up(ggg,eventdata,handles)">mouse_up</a>  'mouse_up': function  activated when the mouse button is released</li><li><a href="set_grid.html" class="code" title="function varargout = set_grid(varargin)">set_grid</a>     'set_grid':produce grid for PIV with one or two images (stereo case)</li><li><a href="set_object.html" class="code" title="function varargout = set_object(varargin)">set_object</a>    'set_object': GUI to edit a projection object</li></ul>
54<!-- crossreference -->
55
56
57<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
58<div class="fragment"><pre>0001 <span class="comment">%'update_obj': update the object graph representation and its projection field, record it in the uvmat interface</span>
590002 <span class="comment">%-------------------------------------------------------------------</span>
600003 <span class="comment">%Object=update_obj(UvData,IndexObj,ObjectData,PlotHandles);</span>
610004 <span class="comment">%</span>
620005 <span class="comment">%OUTPUT:</span>
630006 <span class="comment">%UvData: data to be stored as 'Userdata' on the uvmat interface</span>
640007 <span class="comment">%IndexObj: object index for a new object added to the list in UvData</span>
650008 <span class="comment">%   the function updates UvData.Object{IndexObj}, and possibly adds a new plot (UvData.Plane or Line) in the list atached to the interface</span>
660009 <span class="comment">%</span>
670010 <span class="comment">%INPUT:</span>
680011 <span class="comment">%UvIn: structure stored as 'Userdata' on the uvmat interface</span>
690012 <span class="comment">%IndexObjIn: object index for an existing objects stored in UvData</span>
700013 <span class="comment">%ObjectData: structure containing the input object properties</span>
710014 <span class="comment">%PlotHandles: structure containing the handles of the plotting parameter buttons on the uvmat interface (obtained by get_plot_handles.m)</span>
720015 <span class="comment">%-------------------------------------</span>
730016
740017 <a name="_sub0" href="#_subfunctions" class="code">function Object_out=update_obj(UvData,IndexObj,ObjectData,PlotHandles)</a>
750018
760019 <span class="comment">%default input and output</span>
770020 Object_out=ObjectData;<span class="comment">%default</span>
780021 <span class="keyword">if</span>  isfield(UvData,<span class="string">'Object'</span>)
790022     Object_set=UvData.Object;
800023 <span class="keyword">else</span>
810024     Object_set={};<span class="comment">%create the object</span>
820025 <span class="keyword">end</span>
830026
840027 <span class="comment">% object representation in the different projected field plots</span>
850028 <span class="keyword">for</span> iview=1:length(Object_set) <span class="comment">%loop on projection planes iview</span>
860029       <span class="keyword">if</span> isfield(Object_set{iview},<span class="string">'plotaxes'</span>)
870030          haxes=Object_set{iview}.plotaxes;<span class="comment">% axes for the field plot</span>
880031          <span class="keyword">if</span> ishandle(haxes) &amp; isequal(get(haxes,<span class="string">'Type'</span>),<span class="string">'axes'</span>)<span class="comment">% update the representation of the object IndexObj on this axes if it exists</span>
890032              testupdate=0;
900033              HandlesDisplay=[];<span class="comment">%default</span>
910034              <span class="keyword">if</span> length(Object_set)&gt;= IndexObj &amp;&amp; isfield(Object_set{IndexObj},<span class="string">'HandlesDisplay'</span>)
920035                  HandlesDisplay=Object_set{IndexObj}.HandlesDisplay;<span class="comment">%list of handles of object representations</span>
930036              <span class="keyword">end</span>
940037              hplot_list=findobj(haxes,<span class="string">'Tag'</span>,<span class="string">'proj_object'</span>);
950038              <span class="keyword">for</span> ih=1:length(HandlesDisplay)
960039                  plot_detect=find(hplot_list==HandlesDisplay(ih));
970040                  <span class="keyword">if</span> ~isempty(plot_detect)
980041                      Object_out.HandlesDisplay(ih)=<a href="plot_object.html" class="code" title="function [hh]=plot_object(ObjectDataIn,ProjObject,hplot,col)">plot_object</a>(ObjectData,Object_set{iview},HandlesDisplay(ih),<span class="string">'m'</span>);<span class="comment">%update the the object representation</span>
990042                      testupdate=1;
1000043                      <span class="keyword">break</span>
1010044                  <span class="keyword">end</span>
1020045              <span class="keyword">end</span>
1030046              <span class="keyword">if</span> ~testupdate<span class="comment">% draw new object plot</span>
1040047                 hh=<a href="plot_object.html" class="code" title="function [hh]=plot_object(ObjectDataIn,ProjObject,hplot,col)">plot_object</a>(ObjectData,Object_set{iview},haxes,<span class="string">'m'</span>);<span class="comment">%draw the object with the new object data</span>
1050048                 Object_out.HandlesDisplay=[Object_out.HandlesDisplay hh];
1060049                 PlotData=get(hh,<span class="string">'UserData'</span>);
1070050                 PlotData.IndexObj=IndexObj;
1080051                 set(hh,<span class="string">'UserData'</span>,PlotData); <span class="comment">%record the object index in the graph</span>
1090052              <span class="keyword">end</span>
1100053          <span class="keyword">end</span>
1110054       <span class="keyword">end</span>
1120055 <span class="keyword">end</span>
1130056
1140057 <span class="comment">% plot the field projected on the object</span>
1150058 <span class="keyword">if</span> ~isempty(PlotHandles) <span class="comment">%&amp;&amp; ~testmask</span>
1160059     ProjData= <a href="proj_field.html" class="code" title="function [ProjData,errormsg]=proj_field(FieldData,ObjectData,IndexObj)">proj_field</a>(UvData.Field,ObjectData,IndexObj);<span class="comment">%project the current interface field on ObjectData</span>
1170060     <span class="keyword">if</span> ~isempty(ProjData)   
1180061         plotaxes=[];<span class="comment">%default</span>
1190062         <span class="keyword">if</span> length(Object_set)&gt;= IndexObj &amp;&amp; isfield(Object_set{IndexObj},<span class="string">'plotaxes'</span>)
1200063             plotaxes=Object_set{IndexObj}.plotaxes;
1210064         <span class="keyword">end</span>
1220065         [PlotType,Object_out.PlotParam,plotaxes]=<a href="plot_field.html" class="code" title="function [PlotType,PlotParamOut,haxes]= plot_field(Data,haxes,PlotParam,KeepLim,PosColorbar)">plot_field</a>(ProjData,plotaxes,PlotHandles);
1230066         Object_out.plotaxes=plotaxes;
1240067         plotfig=get(plotaxes,<span class="string">'parent'</span>);
1250068         name_str=get(plotfig,<span class="string">'Name'</span>);
1260069         <span class="keyword">if</span> ~isequal(name_str,<span class="string">'uvmat'</span>)
1270070             set(plotfig,<span class="string">'Name'</span>,[<span class="string">'Projection on'</span> num2str(IndexObj) <span class="string">'-'</span> <a href="set_title.html" class="code" title="function TITLE=set_title(Style,ProjMode)">set_title</a>(ObjectData.Style,ObjectData.ProjMode)]);
1280071         <span class="keyword">end</span>
1290072     <span class="keyword">end</span>
1300073 <span class="keyword">end</span>
1310074
1320075</pre></div>
133<hr><address>Generated on Fri 13-Nov-2009 11:17:03 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> &copy; 2003</address>
134</body>
135</html>
Note: See TracBrowser for help on using the repository browser.