Changeset 61 for trunk/src/view_field.m


Ignore:
Timestamp:
Mar 24, 2010, 12:51:51 AM (14 years ago)
Author:
sommeria
Message:

gestion of projection objects improved. Implementation of view_field.fig
introduction of a circle to mark vectors with the mouse
various cleaning and debugging

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/view_field.m

    r60 r61  
    7070% set the position of colorbar and ancillary GUIs:
    7171set(hObject,'Units','Normalized')
    72 movegui(hObject,'center')
    73 UvData.PosColorbar=[0.805 0.022 0.019 0.445];
    74 UvData.SetObjectOrigin=[-0.05 -0.03]; %position for set_object
    75 UvData.SetObjectSize=[0.3 0.7];
    76 UvData.CalOrigin=[0.95 -0.03];%position for geometry_calib (TO IMPROVE)
    77 UvData.CalSize=[0.28 1];
    7872handles_mouse=handles;
    7973huvmat=findobj(allchild(0),'Name','uvmat');
    8074hhuvmat=guidata(huvmat);
    81 handles_mouse.create=hhuvmat.create;
     75set(hhuvmat.list_object_2,'Visible','on')
     76% handles_mouse.create=hhuvmat.create;
    8277handles_mouse.edit=hhuvmat.edit;
     78pos_uvmat=get(huvmat,'Position');
     79pos_view_field(1)=pos_uvmat(1)+pos_uvmat(3)/2;
     80pos_view_field(2)=pos_uvmat(2)-pos_uvmat(3)/4;
     81pos_view_field(3:4)=pos_uvmat(3:4);
     82set(hObject,'Position',pos_view_field)
     83
     84
    8385
    8486%functions for the mouse and keyboard
     
    8789set(hObject,'WindowButtonDownFcn',{'mouse_down'})%set mouse click action function
    8890set(hObject,'WindowButtonUpFcn',{'mouse_up',handles_mouse})
    89 
     91% set(hObject,'CloseRequestFcn ',{'close_fcn'})
    9092
    9193[PlotType,PlotParamOut,haxes]= plot_field(Field,handles.axes3)%,PlotParam,KeepLim,PosColorbar)
     
    9496function varargout = view_field_OutputFcn(hObject, eventdata, handles)
    9597varargout{1} = handles.output;% the only output argument is the handle to the GUI figure
     98
    9699
    97100%-------------------------------------------------------------------
     
    19881991end
    19891992
    1990 %------------------------------------------------
    1991 function create_Callback(hObject,eventdata,handles)
    1992 %------------------------------------------------
    1993 if ishandle(handles.VIEW_FIELD_title)
    1994     delete(handles.VIEW_FIELD_title)
    1995 end
    1996 huvmat=get(handles.create,'parent');
    1997 UvData=get(huvmat,'UserData');%read UvData properties stored on the view_field interface (handles huvmat)
    1998 if isequal(get(handles.create,'Value'),1)
    1999     set(handles.zoom,'Value',0)
    2000     zoom_Callback(hObject, eventdata, handles)
    2001      set(handles.create,'BackgroundColor',[1 1 0]) %visualise in yellow
    2002     set(handles.edit_vect,'Value',0) 
    2003     edit_vect_Callback(hObject, eventdata, handles)
    2004     set(handles.edit,'Value',0)
    2005     set(handles.edit,'BackgroundColor',[0.7 0.7 0.7])
    2006     list_object=get(handles.list_object,'String');
    2007     if ~isempty(list_object)
    2008         set(handles.list_object,'Value',length(list_object))
    2009     end
    2010     MouseAction='create_object';
    2011     hset_object=findobj(allchild(0),'Name','set_object');
    2012     uistack(hset_object,'top')
    2013 else
    2014     set(handles.create,'BackgroundColor',[0 1 0])
    2015     set(handles.edit,'Value',1)
    2016     set(handles.edit,'BackgroundColor',[1 1 0])
    2017     MouseAction='none';
    2018 end
    2019 
    2020 UvData.MouseAction=MouseAction;
    2021 set(huvmat,'UserData',UvData);
    2022 
    2023 %------------------------------------------------
    2024 function POINTS_Callback(hObject,eventdata,handles)
    2025 %------------------------------------------------
    2026 if ishandle(handles.VIEW_FIELD_title)
    2027     delete(handles.VIEW_FIELD_title)
    2028 end
    2029 huvmat=get(handles.create,'parent');
    2030 UvData=get(huvmat,'UserData');%read UvData properties stored on the view_field interface (handles huvmat)
    2031 if isequal(get(handles.create,'Value'),1)
    2032     set(handles.zoom,'Value',0)
    2033     zoom_Callback(hObject, eventdata, handles)
    2034     set(handles.edit_vect,'Value',0) 
    2035     edit_vect_Callback(hObject, eventdata, handles)
    2036     set(handles.edit,'Value',0)
    2037     set(handles.edit,'BackgroundColor',[0.7 0.7 0.7])
    2038     %set(handles.grid,'Value',0)
    2039     %set(handles.grid,'BackgroundColor',[0 1 0])
    2040     % initiate set_object GUI
    2041      data.TITLE='POINTS';
    2042     if isfield(UvData,'CoordType')
    2043         data.CoordType=UvData.CoordType;
    2044     end
    2045     if isfield(UvData,'Mesh')&~isempty(UvData.Mesh)
    2046         data.RangeY=UvData.Mesh;
    2047     elseif isfield(UvData,'AX')&isfield(UvData,'AY')& isfield(UvData,'A')%only image
    2048         np=size(UvData.Field.A);
    2049         meshx=(UvData.Field.AX(end)-UvData.Field.AX(1))/np(2);
    2050         meshy=abs(UvData.Field.AY(end)-UvData.Field.AY(1))/np(1);
    2051         data.RangeY=max(meshx,meshy);
    2052         data.DX=max(meshx,meshy);
    2053     end
    2054     data.Coord=[0 0 0]; %default
    2055     data.ParentButton=handles.create;
    2056     PlotHandles=get_plot_handles(handles);%get the handles of the graphic objects setting the plotting parameters
    2057     [hset_object,UvData.sethandles]=set_object(data,PlotHandles);% call the set_object interface
    2058     if isfield(UvData,'SetObjectOrigin')
    2059     pos_view_field=get(huvmat,'Position');
    2060     pos_set_object(1:2)=UvData.SetObjectOrigin + pos_view_field(1:2);
    2061     pos_set_object(3:4)=UvData.SetObjectSize .* pos_view_field(3:4);
    2062     set(hset_object,'Position',pos_set_object)
    2063     end
    2064     %set(hset_object,'Position',[pos_view_field(1) pos_view_field(2)-0.05*pos_view_field(4) 0.2*pos_view_field(3)  0.5*pos_view_field(4)]);
    2065     list_object=get(handles.list_object,'String');
    2066     if ~isempty(list_object)
    2067         set(handles.list_object,'Value',length(list_object))
    2068     end
    2069     MouseAction='create_object';
    2070     %UvData.ZoomOn=0;
    2071 else
    2072     set(handles.create,'BackgroundColor',[0 1 0])
    2073     set(handles.edit,'Value',1)
    2074     set(handles.edit,'BackgroundColor',[1 1 0])
    2075     MouseAction='none';
    2076 end
    2077 
    2078 UvData.MouseAction=MouseAction;
    2079 set(huvmat,'UserData',UvData);
    2080 
    2081 %-----------------------------------------------------------
    2082 function LINE_Callback(hObject, eventdata, handles)
    2083 %-------------------------------------------------
    2084 if ishandle(handles.VIEW_FIELD_title)
    2085     delete(handles.VIEW_FIELD_title)
    2086 end
    2087 % handles.view_field
    2088 huvmat=get(handles.create,'parent');
    2089 UvData=get(huvmat,'UserData');%read UvData properties stored on the view_field interface
    2090 set(handles.zoom,'Value',0)
    2091 zoom_Callback(hObject, eventdata, handles)
    2092 set(handles.edit_vect,'BackgroundColor',[0.7 0.7 0.7])
    2093 set(handles.edit_vect,'Value',0)
    2094 edit_vect_Callback(hObject, eventdata, handles)
    2095 set(handles.edit,'BackgroundColor',[0.7 0.7 0.7])
    2096 set(handles.edit,'Value',0)
    2097 set(handles.list_object,'Value',1);
    2098 edit_vect_Callback(hObject, eventdata, handles)
    2099 set(handles.edit,'BackgroundColor',[0.7 0.7 0.7])
    2100 set(handles.cal,'Value',0)
    2101 set(handles.cal,'BackgroundColor',[0 1 0])
    2102 %  initiate the set_object GUI
    2103 data.TITLE='LINE';
    2104 if isfield(UvData,'CoordType')
    2105     data.CoordType=UvData.CoordType;
    2106 end
    2107 if isfield(UvData,'Mesh')&~isempty(UvData.Mesh)
    2108     data.RangeX=UvData.Mesh;
    2109     data.RangeY=UvData.Mesh;
    2110     data.DX=UvData.Mesh;
    2111     data.DY=UvData.Mesh;
    2112 elseif isfield(UvData.Field,'AX')&isfield(UvData.Field,'AY')& isfield(UvData.Field,'A')%only image
    2113     np=size(UvData.Field.A);
    2114     meshx=(UvData.Field.AX(end)-UvData.Field.AX(1))/np(2);
    2115     meshy=abs(UvData.Field.AY(end)-UvData.Field.AY(1))/np(1);
    2116     data.RangeY=max(meshx,meshy);
    2117     data.RangeX=max(meshx,meshy);
    2118     data.DX=max(meshx,meshy);
    2119 end
    2120 if isfield(data,'DX')
    2121     data.Coord=[[0 0 0];[data.DX 0 0]]; %default
    2122 else
    2123     data.Coord=[[0 0 0];[1 0 0]]; %default
    2124 end
    2125 data.ParentButton=handles.create;
    2126 PlotHandles=get_plot_handles(handles);%get the handles of the interface elements setting the plotting parameters
    2127 [hset_object,UvData.sethandles]=set_object(data,PlotHandles);% call the set_object interface with action on haxes,
    2128                                                   % associate the set_edit interface handle to the plotting axes
    2129 pos_view_field=get(huvmat,'Position');
    2130 if isfield(UvData,'SetObjectOrigin')
    2131     pos_set_object(1:2)=UvData.SetObjectOrigin + pos_view_field(1:2);
    2132     pos_set_object(3:4)=UvData.SetObjectSize .* pos_view_field(3:4); 
    2133     set(hset_object,'Position',pos_set_object)
    2134 end
    2135 list_object=get(handles.list_object,'String');
    2136 if ~isempty(list_object)
    2137     set(handles.list_object,'Value',length(list_object))
    2138 end
    2139 MouseAction='create_object';
    2140 UvData.MouseAction=MouseAction;
    2141 set(huvmat,'UserData',UvData)
    2142 
    2143 %-----------------------------------------------------------
    2144 function PATCH_Callback(hObject, eventdata, handles)
    2145 %-----------------------------------------------------------
    2146 if ishandle(handles.VIEW_FIELD_title)
    2147     delete(handles.VIEW_FIELD_title)
    2148 end
    2149 huvmat=get(handles.create,'parent');
    2150 UvData=get(huvmat,'UserData');%read UvData properties stored on the view_field interface
    2151 % if isequal(get(handles.PATCH,'Value'),1)
    2152     set(handles.zoom,'Value',0)
    2153     set(handles.zoom,'BackgroundColor',[0.7 0.7 0.7])
    2154 %     set(handles.create,'Value',0)%suppress the other options if LINE is chosen
    2155 %     set(handles.create,'BackgroundColor',[0 1 0])
    2156 %     set(handles.LINE,'Value',0)
    2157 %     set(handles.LINE,'BackgroundColor',[0 1 0])
    2158 %     set(handles.PATCH,'Value',1)
    2159 %     set(handles.PATCH,'BackgroundColor',[1 1 0])
    2160 %     set(handles.PLANE,'Value',0)
    2161 %     set(handles.PLANE,'BackgroundColor',[0 1 0])%put activated buttons to yellow
    2162 %     set(handles.VOLUME,'Value',0)
    2163 %     set(handles.VOLUME,'BackgroundColor',[0 1 0])
    2164     %set(handles.makemask,'Value',0)
    2165     %makemask_Callback(hObject, eventdata, handles)
    2166     set(handles.edit_vect,'Value',0)
    2167     edit_vect_Callback(hObject, eventdata, handles)
    2168     set(handles.edit,'Value',0)
    2169     set(handles.edit,'BackgroundColor',[0.7 0.7 0.7])
    2170     set(handles.edit_vect,'Value',0) 
    2171     edit_vect_Callback(hObject, eventdata, handles)
    2172     set(handles.cal,'Value',0)
    2173     set(handles.cal,'BackgroundColor',[0 1 0])
    2174     %set(handles.grid,'Value',0)
    2175     %set(handles.grid,'BackgroundColor',[0 1 0])
    2176     %initiate set_object GUI
    2177     data.TITLE='PATCH';
    2178     if isfield(UvData,'CoordType')
    2179         data.CoordType=UvData.CoordType;
    2180     end
    2181     if isfield(UvData,'Mesh')&~isempty(UvData.Mesh)
    2182         data.YMax=UvData.Mesh;
    2183     elseif isfield(UvData.Field,'AX')&isfield(UvData.Field,'AY')& isfield(UvData.Field,'A')%only image
    2184         np=size(UvData.Field.A);
    2185         meshx=(UvData.Field.AX(end)-UvData.Field.AX(1))/(np(2)-1);
    2186         meshy=abs(UvData.Field.AY(end)-UvData.Field.AY(1))/(np(1)-1);
    2187         data.YMax=max(meshx,meshy);
    2188         data.DX=max(meshx,meshy);
    2189     end
    2190     data.Coord=[0 0 0]; %default
    2191     data.ParentButton=handles.create;
    2192     PlotHandles=get_plot_handles(handles);%get the handles of the graphic objects setting the plotting parameters
    2193     [hset_object,UvData.sethandles]=set_object(data,PlotHandles);% call the set_object interface
    2194     pos_view_field=get(huvmat,'Position');
    2195     if isfield(UvData,'SetObjectOrigin')
    2196         pos_set_object(1:2)=UvData.SetObjectOrigin + pos_view_field(1:2);
    2197         pos_set_object(3:4)=UvData.SetObjectSize .* pos_view_field(3:4);
    2198         set(hset_object,'Position',pos_set_object)
    2199     end
    2200     list_object=get(handles.list_object,'String');
    2201     if ~isempty(list_object)
    2202         set(handles.list_object,'Value',length(list_object))
    2203     end
    2204     UvData.MouseAction='create_object';
    2205     set(huvmat,'UserData',UvData);
    2206 %-------------------------------------------------------
    2207 function PLANE_Callback(hObject, eventdata, handles)
    2208 %-------------------------------------------------------
    2209 if ishandle(handles.VIEW_FIELD_title)
    2210     delete(handles.VIEW_FIELD_title)
    2211 end
    2212 huvmat=get(handles.create,'parent');
    2213 UvData=get(huvmat,'UserData');%read UvData properties stored on the view_field interface
    2214 set(handles.zoom,'Value',0)
    2215 set(handles.zoom,'BackgroundColor',[0.7 0.7 0.7])
    2216 set(handles.edit_vect,'Value',0)
    2217 edit_vect_Callback(hObject, eventdata, handles)
    2218 set(handles.edit,'Value',0)
    2219 set(handles.edit,'BackgroundColor',[0.7 0.7 0.7])
    2220 set(handles.cal,'Value',0)
    2221 set(handles.cal,'BackgroundColor',[0 1 0])
    2222 %set(handles.grid,'Value',0)
    2223 %set(handles.grid,'BackgroundColor',[0 1 0])
    2224 %initiate set_object GUI
    2225 data.TITLE='PLANE';
    2226 if isfield(UvData,'CoordType')
    2227     data.CoordType=UvData.CoordType;
    2228 end
    2229 %Si 3D data.nbdim=3;
    2230 %Si 2D
    2231 if isfield(UvData,'Mesh')&~isempty(UvData.Mesh)
    2232     data.ZMax=UvData.Mesh;
    2233     data.DX=UvData.Mesh;
    2234     data.DY=UvData.Mesh;
    2235 elseif isfield(UvData.Field,'AX')&isfield(UvData.Field,'AY')& isfield(UvData.Field,'A')%only image
    2236     np=size(UvData.Field.A);
    2237     meshx=(UvData.Field.AX(end)-UvData.Field.AX(1))/(np(2)-1);
    2238     meshy=abs(UvData.Field.AY(end)-UvData.Field.AY(1))/(np(1)-1);
    2239     data.DX=max(meshx,meshy);
    2240 end
    2241 if isfield(UvData,'DX')
    2242     data.DX=UvData.DX;
    2243 end
    2244 if isfield(UvData,'DY')
    2245     data.DY=UvData.DY;
    2246 elseif isfield(UvData,'Mesh')
    2247     data.DY=UvData.Mesh;
    2248 end
    2249 if isfield(UvData.Field,'X')& isfield(UvData.Field,'Y')
    2250     data.Coord=[0 0 0];
    2251     data.Style='plane';
    2252     data.Phi=0;
    2253     data.IndexObj=1; %act on the first reference plane by default
    2254     haxes= handles.axes3;%GENERALISER
    2255     plot_object(data,[],haxes,'m'); %plot the axes of the default plane 
    2256 end
    2257 data.ParentButton=handles.create;
    2258 PlotHandles=get_plot_handles(handles);%get the handles of the graphic objects setting the plotting parameters
    2259 ZBounds=0; % default
    2260 if isfield(UvData,'ZMin') && isfield(UvData,'ZMax')
    2261     ZBounds(1)=UvData.ZMin; %minimum for the Z slider
    2262     ZBounds(2)=UvData.ZMax;%maximum for the Z slider
    2263 end
    2264 [hset_object,UvData.sethandles]=set_object(data,PlotHandles,ZBounds);% call the set_object interface with action on haxes,
    2265 if isfield(UvData,'SetObjectOrigin')
    2266 pos_view_field=get(huvmat,'Position');
    2267 pos_set_object(1:2)=UvData.SetObjectOrigin + pos_view_field(1:2);
    2268 pos_set_object(3:4)=UvData.SetObjectSize .* pos_view_field(3:4); 
    2269 set(hset_object,'Position',pos_set_object)
    2270 end
    2271 list_object=get(handles.list_object,'String');
    2272 nbobject=length(list_object);
    2273 set(handles.list_object,'Value',nbobject)
    2274 UvData.MouseAction='create_object';
    2275 set(huvmat,'UserData',UvData)
    2276 
    2277 %-------------------------------------------------------
    2278 % --- Executes on button press in MENUVOLUME.
    2279 %-------------------------------------------------------
    2280 function VOLUME_Callback(hObject, eventdata, handles)
    2281 %errordlg('command VOL not implemented yet')
    2282 if ishandle(handles.VIEW_FIELD_title)
    2283     delete(handles.VIEW_FIELD_title)
    2284 end
    2285 huvmat=get(handles.create,'parent');
    2286 UvData=get(huvmat,'UserData');%read UvData properties stored on the view_field interface
    2287 if isequal(get(handles.VOLUME,'Value'),1)
    2288     set(handles.zoom,'Value',0)
    2289     set(handles.zoom,'BackgroundColor',[0.7 0.7 0.7])
    2290     set(handles.edit_vect,'Value',0)
    2291     edit_vect_Callback(hObject, eventdata, handles)
    2292     set(handles.edit,'Value',0)
    2293     set(handles.edit,'BackgroundColor',[0.7 0.7 0.7])
    2294     set(handles.cal,'Value',0)
    2295     set(handles.cal,'BackgroundColor',[0 1 0])
    2296     set(handles.edit_vect,'Value',0)
    2297     edit_vect_Callback(hObject, eventdata, handles)
    2298     %initiate set_object GUI
    2299     data.TITLE='VOLUME';
    2300     if isfield(UvData,'CoordType')
    2301         data.CoordType=UvData.CoordType;
    2302     end
    2303     if isfield(UvData,'Mesh')&~isempty(UvData.Mesh)
    2304         data.RangeY=UvData.Mesh;
    2305         data.RangeX=UvData.Mesh;
    2306         data.DX=UvData.Mesh;
    2307         data.DY=UvData.Mesh;
    2308     elseif isfield(UvData.Field,'AX')&isfield(UvData.Field,'AY')& isfield(UvData.Field,'A')%only image
    2309         np=size(UvData.Field.A);
    2310         meshx=(UvData.Field.AX(end)-UvData.Field.AX(1))/np(2);
    2311         meshy=abs(UvData.Field.AY(end)-UvData.Field.AY(1))/np(1);
    2312         data.RangeY=max(meshx,meshy);
    2313         data.RangeX=max(meshx,meshy);
    2314         data.DX=max(meshx,meshy);
    2315     end
    2316     data.ParentButton=handles.VOLUME;
    2317     PlotHandles=get_plot_handles(handles);%get the handles of the interface elements setting the plotting parameters
    2318     [hset_object,UvData.sethandles]=set_object(data,PlotHandles);% call the set_object interface with action on haxes,
    2319                                                       % associate the set_edit interface handle to the plotting axes
    2320     if isfield(UvData,'SetObjectOrigin')                                               
    2321     pos_view_field=get(huvmat,'Position');
    2322     pos_set_object(1:2)=UvData.SetObjectOrigin + pos_view_field(1:2);
    2323     pos_set_object(3:4)=UvData.SetObjectSize .* pos_view_field(3:4); 
    2324     set(hset_object,'Position',pos_set_object)
    2325     end
    2326     UvData.MouseAction='create_object';
    2327 else
    2328     set(handles.VOLUME,'BackgroundColor',[0 1 0])
    2329     UvData.MouseAction='none';
    2330 end
    2331 set(huvmat,'UserData',UvData)
    2332 
    2333 %-------------------------------------------------------
    2334 function edit_vect_Callback(hObject, eventdata, handles)
    2335 %-------------------------------------------------------
    2336 
    2337 UvData=get(handles.view_field,'UserData');%read UvData properties stored on the view_field interface
    2338 if isequal(get(handles.edit_vect,'Value'),1)
    2339     test_civ2=isequal(get(handles.civ2,'BackgroundColor'),[1 1 0]);
    2340     test_civ1=isequal(get(handles.civ1,'BackgroundColor'),[1 1 0]);
    2341     if ~test_civ2 && ~test_civ1
    2342         msgbox_view_field('ERROR','manual correction only possible for CIV1 or CIV2 velocity fields')
    2343     end
    2344     set(handles.record,'Visible','on')
    2345     set(handles.edit_vect,'BackgroundColor',[1 1 0])
    2346     set(handles.edit,'Value',0)
    2347     set(handles.create,'Value',0)
    2348     set(handles.create,'BackgroundColor',[0 1 0])
    2349     set(handles.edit,'BackgroundColor',[0.7 0.7 0.7])
    2350     set(gcf,'Pointer','arrow')
    2351     UvData.MouseAction='edit_vect';
    2352 else
    2353     set(handles.record,'Visible','off')
    2354     set(handles.edit_vect,'BackgroundColor',[0.7 0.7 0.7])
    2355     UvData.MouseAction='none';
    2356 end
    2357 set(handles.view_field,'UserData',UvData)
    2358 
    2359 %----------------------------------------------
    2360 function save_mask_Callback(hObject, eventdata, handles)
    2361 %-----------------------------------------------------------------------
    2362 huvmat=get(handles.save_mask,'parent');
    2363 UvData=get(huvmat,'UserData');
    2364 
    2365 hpatch=findobj(huvmat,'Type','patch');
    2366 flag=1;
    2367 npx=size(UvData.Field.A,2);
    2368 npy=size(UvData.Field.A,1);
    2369 xi=[0.5:npx-0.5];
    2370 yi=[0.5:npy-0.5];
    2371 [Xi,Yi]=meshgrid(xi,yi);
    2372 if isfield(UvData,'Object')
    2373     for iobj=1:length(UvData.Object)
    2374         ObjectData=UvData.Object{iobj};
    2375         if isfield(ObjectData,'ProjMode') &&(isequal(ObjectData.ProjMode,'mask_inside')||isequal(ObjectData.ProjMode,'mask_outside'));
    2376             flagobj=1;
    2377             testphys=0; %coordinates in pixels by default
    2378             if isfield(ObjectData,'CoordType') && isequal(ObjectData.CoordType,'phys')
    2379                 if isfield(UvData,'XmlData')&& isfield(UvData.XmlData,'GeometryCalib')
    2380                     Calib=UvData.XmlData.GeometryCalib;
    2381                     testphys=1;
    2382                 end
    2383             end
    2384             if isfield(ObjectData,'Coord')& isfield(ObjectData,'Style')
    2385                 if isequal(ObjectData.Style,'polygon')
    2386                     X=ObjectData.Coord(:,1);
    2387                     Y=ObjectData.Coord(:,2);
    2388                     if testphys
    2389                         [X,Y]=px_XYZ(Calib,X,Y,0);% to generalise with 3D cases
    2390                     end
    2391                     flagobj=~inpolygon(Xi,Yi,X,Y);%=0 inside the polygon, 1 outside                 
    2392                 elseif isequal(ObjectData.Style,'ellipse')
    2393                     if testphys
    2394                         %[X,Y]=px_XYZ(Calib,X,Y,0);% TODO:create a polygon boundary and transform to phys
    2395                     end
    2396                     RangeX=max(ObjectData.RangeX);
    2397                     RangeY=max(ObjectData.RangeY);
    2398                     X2Max=RangeX*RangeX;
    2399                     Y2Max=RangeY*RangeY;
    2400                     distX=(Xi-ObjectData.Coord(1,1));
    2401                     distY=(Yi-ObjectData.Coord(1,2));
    2402                     flagobj=(distX.*distX/X2Max+distY.*distY/Y2Max)>1;
    2403                 elseif isequal(ObjectData.Style,'rectangle')
    2404                     if testphys
    2405                         %[X,Y]=px_XYZ(Calib,X,Y,0);% TODO:create a polygon boundary and transform to phys
    2406                     end
    2407                     distX=abs(Xi-ObjectData.Coord(1,1));
    2408                     distY=abs(Yi-ObjectData.Coord(1,2));
    2409                     flagobj=distX>max(ObjectData.RangeX) | distY>max(ObjectData.RangeY);
    2410                 end
    2411                 if isequal(ObjectData.ProjMode,'mask_outside')
    2412                     flagobj=~flagobj;
    2413                 end
    2414                 flag=flag & flagobj;
    2415             end
    2416         end
    2417     end
    2418 end
    2419 % flag=~flag;
    2420 %mask name
    2421 RootPath=get(handles.RootPath,'String');
    2422 RootFile=get(handles.RootFile,'String');
    2423 if ~isempty(RootFile)&(isequal(RootFile(1),'/')| isequal(RootFile(1),'\'))
    2424         RootFile(1)=[];
    2425 end
    2426 filebase=fullfile(RootPath,RootFile);
    2427 list=get(handles.masklevel,'String');
    2428 masknumber=num2str(length(list));
    2429 maskindex=get(handles.masklevel,'Value');
    2430 mask_name=name_generator([filebase '_' masknumber 'mask'],maskindex,1,'.png','_i');
    2431 imflag=uint8(255*(0.392+0.608*flag));% =100 for flag=0 (vectors not computed when 20<imflag<200)
    2432 imflag=flipdim(imflag,1);
    2433 % imflag=uint8(255*flag);% =0 for flag=0 (vectors=0 when 20<imflag<200)
    2434 msgbox_view_field('CONFIRMATION',[mask_name ' saved'])
    2435 imwrite(imflag,mask_name,'BitDepth',8);
    2436 
    2437 %display the mask
    2438 %update_mask(handles,num_i1,num_j1)
    2439 figure;
    2440 vec=linspace(0,1,256);%define a linear greyscale colormap
    2441 map=[vec' vec' vec'];
    2442 colormap(map)
    2443 
    2444 image(imflag);
    24451993
    24461994%-------------------------------------------------------------------
     
    26082156% set(handles.vec_col_bar,'Cdata',A)
    26092157
    2610 %--------------------------------------------------------
    2611 % --- Executes on button press in cal.
    2612 function cal_Callback(hObject, eventdata, handles)
    2613 
    2614 huvmat=get(handles.cal,'parent');%handles of the view_field interface
    2615 UvData=get(huvmat,'UserData');%read UvData properties stored on the view_field interface
    2616 %reinitialize the edit interface associated with view_field
    2617 value=get(handles.cal,'Value');
    2618 if value
    2619         set(handles.cal,'BackgroundColor',[1 1 0])
    2620         %suppress the other options if MENULINE is chosen
    2621         set(handles.zoom,'Value',0)
    2622         set(handles.zoom,'BackgroundColor',[0.7 0.7 0.7])
    2623         set(handles.create,'Value',0)
    2624         set(handles.create,'BackgroundColor',[0 1 0])
    2625         set(handles.create,'enable','off')     
    2626         set(handles.edit_vect,'Value',0)
    2627         set(handles.edit_vect,'enable','off')
    2628         edit_vect_Callback(hObject, eventdata, handles)
    2629         set(handles.edit,'Value',0)
    2630         set(handles.edit,'BackgroundColor',[0.7 0.7 0.7])
    2631         set(handles.edit,'enable','off')
    2632         set(handles.list_object,'Value',1)     
    2633         % initiate display of GUI geometry_calib
    2634         data=[]; %default
    2635                 if isfield(UvData,'CoordType')
    2636             data.CoordType=UvData.CoordType;
    2637         end
    2638         %data.ParentButton=handles.cal; % transmit the handles of the calling button to the GUI geometry_calib
    2639                 pos=get(huvmat,'Position');
    2640                 pos(1)=pos(1)+pos(3)-0.311+0.04; %0.311= width of the geometry_calib interface (units relative to the srcreen)
    2641                 pos(2)=pos(2)-0.02;
    2642         [FileName,RootPath,FileBase,FileIndices,FileExt,SubDir]=read_file_boxes(handles);
    2643 %         [filebase,num_i1,num_j1,num_i2,num_j2,Ext,NomType,SubDir]=read_input_file(handles);
    2644 %         [inputfile,idetect]=name_generator(filebase,num_i1,num_j1,Ext,NomType,1,num_i2,num_j2,SubDir);
    2645                 [UvData.hset_object,UvData.sethandles]=geometry_calib(handles,pos,FileName);% call the set_object interface     
    2646         pos_view_field=get(huvmat,'Position');
    2647         %pos_cal(1:2)=UvData.CalOrigin + pos_view_field(1:2);
    2648         if isfield(UvData,'CalOrigin')
    2649             pos_cal(1)=pos_view_field(1)+UvData.CalOrigin(1)*pos_view_field(3);
    2650             pos_cal(2)=pos_view_field(2)+UvData.CalOrigin(2)*pos_view_field(4);
    2651             pos_cal(3:4)=UvData.CalSize .* pos_view_field(3:4);
    2652             set(UvData.hset_object,'Position',pos_cal)
    2653         end
    2654         UvData.MouseAction='calib';
    2655 else
    2656      UvData.MouseAction='none';     
    2657      hgeometry_calib=findobj(allchild(0),'Name','geometry_calib');
    2658 %      if ~isempty(hgeometry_calib)
    2659 %          answer=questdlg('close the GUI geometry-calib?');
    2660 %          if isequal(answer,'Yes')
    2661 %              delete(hgeometry_calib)
    2662 %              set(handles.cal,'BackgroundColor',[0 1 0])
    2663 %          else
    2664 %              set(handles.cal,'Value',1)% keep the calibration function active
    2665 %          end
    2666 %      end
    2667      set(handles.edit_vect,'enable','on')
    2668      set(handles.edit,'enable','on')
    2669      set(handles.create,'enable','on')
    2670 %      set(handles.LINE,'enable','on')
    2671 %      set(handles.PATCH,'enable','on')
    2672 %      set(handles.PLANE,'enable','on')
    2673 %      set(handles.VOLUME,'enable','on')
    2674      %set(handles.makemask,'enable','on')
    2675      hh=findobj(handles.axes3,'Tag','calib_points');
    2676      if ~isempty(hh)
    2677          delete(hh)
    2678      end
    2679      hhh=findobj(handles.axes3,'Tag','calib_marker');
    2680      if ~isempty(hhh)
    2681          delete(hhh)
    2682      end   
    2683 end
    2684 set(huvmat,'UserData',UvData);
    2685 
    2686 %-------------------------------------------------------------
    2687 % --- Executes on selection change in transform_fct.
    2688 function transform_fct_Callback(hObject, eventdata, handles)
    2689 %-------------------------------------------------------------
    2690 global nb_builtin
    2691 
    2692 huvmat=get(handles.transform_fct,'parent');
    2693 menu=get(handles.transform_fct,'String');
    2694 ind_coord=get(handles.transform_fct,'Value');
    2695 coord_option=menu{ind_coord};
    2696 list_transform=get(handles.transform_fct,'UserData');
    2697 ff=functions(list_transform{end}); 
    2698 if isequal(coord_option,'more...');
    2699     coord_fct='';
    2700 
    2701 %     if exist(profil_perso,'file')
    2702 %           h=load (profil_perso);
    2703 %          if isfield(h,'transform_fct')
    2704 %                 transform_fct=h.transform_fct;
    2705 %          end
    2706 %     end
    2707     prompt = {'Enter the name of the transform function'};
    2708     dlg_title = 'user defined transform';
    2709     num_lines= 1;
    2710     [FileName, PathName, filterindex] = uigetfile( ...
    2711        {'*.m', ' (*.m)';
    2712         '*.m',  '.m files '; ...
    2713         '*.*', 'All Files (*.*)'}, ...
    2714         'Pick a file', ff.file);
    2715     if isequal(PathName(end),'/')||isequal(PathName(end),'\')
    2716         PathName(end)=[];
    2717     end
    2718     transform_selected =fullfile(PathName,FileName);
    2719     if ~exist(transform_selected,'file')
    2720 %            msgbox_view_field('ERROR',['procesing fct ' transform_selected ' not found'])
    2721            return
    2722     end
    2723    [ppp,transform,ext_fct]=fileparts(FileName);% removes extension .m
    2724    if ~isequal(ext_fct,'.m')
    2725         msgbox_view_field('ERROR','a Matlab function .m must be introduced');
    2726         return
    2727    end
    2728    menu=update_menu(handles.transform_fct,transform);%add the selected fct to the menu
    2729    ind_coord=get(handles.transform_fct,'Value');
    2730    addpath(PathName)
    2731    list_transform{ind_coord}=str2func(transform);% create the function handle corresponding to the newly seleced function
    2732    set(handles.transform_fct,'UserData',list_transform)
    2733    rmpath(PathName)
    2734    % save the new menu in the personal file 'view_field_perso.mat'
    2735    dir_perso=prefdir;%personal Matalb directory
    2736    profil_perso=fullfile(dir_perso,'view_field_perso.mat');
    2737    if exist(profil_perso,'file')
    2738        for ilist=nb_builtin+1:numel(list_transform)
    2739            ff=functions(list_transform{ilist});
    2740            transform_fct{ilist-nb_builtin}=ff.file;
    2741        end
    2742         save (profil_perso,'transform_fct','-append'); %store the root name for future opening of view_field
    2743    end   
    2744 end
    2745 
    2746 %check the current path to the selected function
    2747 if isa(list_transform{ind_coord},'function_handle')
    2748     func=functions(list_transform{ind_coord});
    2749     set(handles.path_transform,'String',fileparts(func.file)); %show the path to the senlected function
    2750 else
    2751     set(handles.path_transform,'String','')
    2752 end
    2753 %CurrentPath=fileparts(which(coord_option));
    2754 % if ~isequal(PathName,CurrentPath)
    2755 %     addpath(PathName)
    2756 %     errormsg=check_functions;
    2757 %     msgbox_view_field('WARNING',[['path ' PathName ' added to the current Matlab pathes'];errormsg])
    2758 % end
    2759 %set(handles.path_transform,'String',fullfile(PathName,' ')); %show the path to the senlected function
    2760 set(handles.FixedLimits,'Value',0)
    2761 set(handles.FixedLimits,'BackgroundColor',[0.7 0.7 0.7])
    2762 
    2763 UvData=get(huvmat,'UserData');
    2764 
    2765 %delete drawn objects
    2766 hother=findobj('Tag','proj_object');%find all the proj objects
    2767 for iobj=1:length(hother)
    2768     delete_object(hother(iobj))
    2769 end
    2770 hother=findobj('Tag','DeformPoint');%find all the proj objects
    2771 for iobj=1:length(hother)
    2772     delete_object(hother(iobj))
    2773 end
    2774 hh=findobj('Tag','calib_points');
    2775 if ~isempty(hh)
    2776     delete(hh)
    2777 end
    2778 hhh=findobj('Tag','calib_marker');
    2779 if ~isempty(hhh)
    2780     delete(hhh)
    2781 end
    2782 if isfield(UvData,'Object')
    2783     nbobject=length(UvData.Object);
    2784     UvData.Object([2:nbobject])=[];
    2785 end
    2786 
    2787 %delete mask if it is displayed
    2788 if isequal(get(handles.mask_test,'Value'),1)%if the mask option is on
    2789    UvData=rmfield(UvData,'MaskName'); %will impose mask refresh 
    2790 end
    2791 set(huvmat,'UserData',UvData)
    2792 run0_Callback(hObject, eventdata, handles)
    2793 
    2794 %--------------------------------------------
    2795 function histo1_menu_Callback(hObject, eventdata, handles)
    2796 %--------------------------------------------
    2797 %plot first histo
    2798 huvmat=get(handles.histo1_menu,'parent');
    2799 histo_menu=get(handles.histo1_menu,'String');
    2800 histo_value=get(handles.histo1_menu,'Value');
    2801 FieldName=histo_menu{histo_value};
    2802 UvData=get(huvmat,'UserData');
    2803 update_histo(handles.histo_u,huvmat,FieldName)
    2804 
    2805 %----------------------------------------------
    2806 function histo2_menu_Callback(hObject, eventdata, handles)
    2807 %----------------------------------------------
    2808 %plot second histo
    2809 huvmat=get(handles.histo2_menu,'parent');
    2810 histo_menu=get(handles.histo2_menu,'String');
    2811 histo_value=get(handles.histo2_menu,'Value');
    2812 FieldName=histo_menu{histo_value};
    2813 UvData=get(huvmat,'UserData');
    2814 update_histo(handles.histo_v,huvmat,FieldName)
    2815 
    2816 
    2817 %--------------------------------------------
    2818 %read the field .Fieldname stored in UvData and plot its histogram
    2819 function update_histo(haxes,huvmat,FieldName)
    2820 UvData=get(huvmat,'UserData');
    2821 
    2822 if ~isfield(UvData.Field,FieldName)
    2823     msgbox_view_field('ERROR',['no field  ' FieldName ' for histogram'])
    2824     return
    2825 end
    2826 Field=UvData.Field;
    2827 FieldHisto=eval(['Field.' FieldName]);
    2828 if isfield(Field,'FF') & ~isempty(Field.FF) & isequal(size(Field.FF),size(FieldHisto))
    2829     indsel=find(Field.FF==0);%find values marked as false
    2830     if ~isempty(indsel)
    2831         FieldHisto=FieldHisto(indsel);
    2832     end
    2833 end
    2834 if isempty(Field)
    2835     msgbox_view_field('ERROR',['empty field ' FieldName])
    2836 else
    2837     nxy=size(FieldHisto);
    2838     Amin=double(min(min(min(FieldHisto))));%min of image
    2839     Amax=double(max(max(max(FieldHisto))));%max of image
    2840     if isequal(Amin,Amax)
    2841        Histo.Txt=['uniform field =' num2str(Amin)];
    2842     else
    2843     Histo.ListVarName={FieldName,'histo'};
    2844     if numel(nxy)==2
    2845         Histo.VarDimName={FieldName,FieldName}; %dimensions for the histogram
    2846     else %color images
    2847         Histo.VarDimName={FieldName,{FieldName,'rgb'}}; %dimensions for the histogram
    2848     end
    2849     %unit
    2850     units=[]; %default
    2851     for ivar=1:numel(Field.ListVarName)   
    2852         if strcmp(Field.ListVarName{ivar},FieldName)
    2853             if isfield(Field,'VarAttribute') && numel(Field.VarAttribute)>=ivar && isfield(Field.VarAttribute{ivar},'units')
    2854                 units=Field.VarAttribute{ivar}.units;
    2855                 break
    2856             end
    2857         end
    2858     end
    2859     if ~isempty(units)
    2860         Histo.VarAttribute{1}.units=units;
    2861     end
    2862     eval(['Histo.' FieldName '=linspace(Amin,Amax,50);'])%absissa values for histo
    2863     for col=1:size(FieldHisto,3)
    2864         B=FieldHisto(:,:,col);
    2865         C=reshape(double(B),1,nxy(1)*nxy(2));% reshape in a vector
    2866        eval(['Histo.histo(:,col)=hist(C, Histo.' FieldName ');']);  %calculate histogram
    2867     end
    2868     set(haxes,'XLimMode','auto')%reset auto mode (after zoom effect)
    2869     set(haxes,'YLimMode','auto')
    2870     plot_field(Histo,haxes);
    2871     end
    2872 end
    2873 
    2874 
    28752158
    28762159%------------------------------------------------
     
    30832366
    30842367
    3085 function edit84_Callback(hObject, eventdata, handles)
    3086 % hObject    handle to edit84 (see GCBO)
     2368function npx_Callback(hObject, eventdata, handles)
     2369% hObject    handle to npx (see GCBO)
    30872370% eventdata  reserved - to be defined in a future version of MATLAB
    30882371% handles    structure with handles and user data (see GUIDATA)
    30892372
    3090 % Hints: get(hObject,'String') returns contents of edit84 as text
    3091 %        str2double(get(hObject,'String')) returns contents of edit84 as a double
     2373% Hints: get(hObject,'String') returns contents of npx as text
     2374%        str2double(get(hObject,'String')) returns contents of npx as a double
    30922375
    30932376
    30942377% --- Executes during object creation, after setting all properties.
    3095 function edit84_CreateFcn(hObject, eventdata, handles)
    3096 % hObject    handle to edit84 (see GCBO)
     2378function npx_CreateFcn(hObject, eventdata, handles)
     2379% hObject    handle to npx (see GCBO)
    30972380% eventdata  reserved - to be defined in a future version of MATLAB
    30982381% handles    empty - handles not created until after all CreateFcns called
     
    31062389
    31072390
    3108 function edit85_Callback(hObject, eventdata, handles)
    3109 % hObject    handle to edit85 (see GCBO)
     2391function npy_Callback(hObject, eventdata, handles)
     2392% hObject    handle to npy (see GCBO)
    31102393% eventdata  reserved - to be defined in a future version of MATLAB
    31112394% handles    structure with handles and user data (see GUIDATA)
    31122395
    3113 % Hints: get(hObject,'String') returns contents of edit85 as text
    3114 %        str2double(get(hObject,'String')) returns contents of edit85 as a double
     2396% Hints: get(hObject,'String') returns contents of npy as text
     2397%        str2double(get(hObject,'String')) returns contents of npy as a double
    31152398
    31162399
    31172400% --- Executes during object creation, after setting all properties.
    3118 function edit85_CreateFcn(hObject, eventdata, handles)
    3119 % hObject    handle to edit85 (see GCBO)
     2401function npy_CreateFcn(hObject, eventdata, handles)
     2402% hObject    handle to npy (see GCBO)
    31202403% eventdata  reserved - to be defined in a future version of MATLAB
    31212404% handles    empty - handles not created until after all CreateFcns called
     
    31302413
    31312414function edit86_Callback(hObject, eventdata, handles)
    3132 % hObject    handle to edit86 (see GCBO)
     2415% hObject    handle to MaxA (see GCBO)
    31332416% eventdata  reserved - to be defined in a future version of MATLAB
    31342417% handles    structure with handles and user data (see GUIDATA)
    31352418
    3136 % Hints: get(hObject,'String') returns contents of edit86 as text
    3137 %        str2double(get(hObject,'String')) returns contents of edit86 as a double
     2419% Hints: get(hObject,'String') returns contents of MaxA as text
     2420%        str2double(get(hObject,'String')) returns contents of MaxA as a double
    31382421
    31392422
    31402423% --- Executes during object creation, after setting all properties.
    3141 function edit86_CreateFcn(hObject, eventdata, handles)
    3142 % hObject    handle to edit86 (see GCBO)
     2424function MaxA_CreateFcn(hObject, eventdata, handles)
     2425% hObject    handle to MaxA (see GCBO)
    31432426% eventdata  reserved - to be defined in a future version of MATLAB
    31442427% handles    empty - handles not created until after all CreateFcns called
     
    31532436
    31542437function edit87_Callback(hObject, eventdata, handles)
    3155 % hObject    handle to edit87 (see GCBO)
     2438% hObject    handle to MinA (see GCBO)
    31562439% eventdata  reserved - to be defined in a future version of MATLAB
    31572440% handles    structure with handles and user data (see GUIDATA)
    31582441
    3159 % Hints: get(hObject,'String') returns contents of edit87 as text
    3160 %        str2double(get(hObject,'String')) returns contents of edit87 as a double
     2442% Hints: get(hObject,'String') returns contents of MinA as text
     2443%        str2double(get(hObject,'String')) returns contents of MinA as a double
    31612444
    31622445
    31632446% --- Executes during object creation, after setting all properties.
    3164 function edit87_CreateFcn(hObject, eventdata, handles)
    3165 % hObject    handle to edit87 (see GCBO)
     2447function MinA_CreateFcn(hObject, eventdata, handles)
     2448% hObject    handle to MinA (see GCBO)
    31662449% eventdata  reserved - to be defined in a future version of MATLAB
    31672450% handles    empty - handles not created until after all CreateFcns called
     
    31742457
    31752458
    3176 % --- Executes on button press in checkbox39.
    3177 function checkbox39_Callback(hObject, eventdata, handles)
    3178 % hObject    handle to checkbox39 (see GCBO)
     2459% --- Executes on button press in auto_sclar.
     2460function auto_sclar_Callback(hObject, eventdata, handles)
     2461% hObject    handle to auto_sclar (see GCBO)
    31792462% eventdata  reserved - to be defined in a future version of MATLAB
    31802463% handles    structure with handles and user data (see GUIDATA)
    31812464
    3182 % Hint: get(hObject,'Value') returns toggle state of checkbox39
     2465% Hint: get(hObject,'Value') returns toggle state of auto_sclar
    31832466
    31842467
    31852468
    31862469function edit88_Callback(hObject, eventdata, handles)
    3187 % hObject    handle to edit88 (see GCBO)
     2470% hObject    handle to IncrA (see GCBO)
    31882471% eventdata  reserved - to be defined in a future version of MATLAB
    31892472% handles    structure with handles and user data (see GUIDATA)
    31902473
    3191 % Hints: get(hObject,'String') returns contents of edit88 as text
    3192 %        str2double(get(hObject,'String')) returns contents of edit88 as a double
     2474% Hints: get(hObject,'String') returns contents of IncrA as text
     2475%        str2double(get(hObject,'String')) returns contents of IncrA as a double
    31932476
    31942477
    31952478% --- Executes during object creation, after setting all properties.
    3196 function edit88_CreateFcn(hObject, eventdata, handles)
    3197 % hObject    handle to edit88 (see GCBO)
     2479function IncrA_CreateFcn(hObject, eventdata, handles)
     2480% hObject    handle to IncrA (see GCBO)
    31982481% eventdata  reserved - to be defined in a future version of MATLAB
    31992482% handles    empty - handles not created until after all CreateFcns called
     
    32062489
    32072490
    3208 % --- Executes on button press in checkbox40.
     2491% --- Executes on button press in AutoScal.
    32092492function checkbox40_Callback(hObject, eventdata, handles)
    3210 % hObject    handle to checkbox40 (see GCBO)
     2493% hObject    handle to AutoScal (see GCBO)
    32112494% eventdata  reserved - to be defined in a future version of MATLAB
    32122495% handles    structure with handles and user data (see GUIDATA)
    32132496
    3214 % Hint: get(hObject,'Value') returns toggle state of checkbox40
     2497% Hint: get(hObject,'Value') returns toggle state of AutoScal
    32152498
    32162499
     
    32402523
    32412524function edit83_Callback(hObject, eventdata, handles)
    3242 % hObject    handle to edit83 (see GCBO)
     2525% hObject    handle to min_vec (see GCBO)
    32432526% eventdata  reserved - to be defined in a future version of MATLAB
    32442527% handles    structure with handles and user data (see GUIDATA)
    32452528
    3246 % Hints: get(hObject,'String') returns contents of edit83 as text
    3247 %        str2double(get(hObject,'String')) returns contents of edit83 as a double
     2529% Hints: get(hObject,'String') returns contents of min_vec as text
     2530%        str2double(get(hObject,'String')) returns contents of min_vec as a double
    32482531
    32492532
    32502533% --- Executes during object creation, after setting all properties.
    3251 function edit83_CreateFcn(hObject, eventdata, handles)
    3252 % hObject    handle to edit83 (see GCBO)
     2534function min_vec_CreateFcn(hObject, eventdata, handles)
     2535% hObject    handle to min_vec (see GCBO)
    32532536% eventdata  reserved - to be defined in a future version of MATLAB
    32542537% handles    empty - handles not created until after all CreateFcns called
     
    33052588
    33062589
    3307 % --- Executes on button press in checkbox41.
     2590% --- Executes on button press in AutoVecColor.
    33082591function checkbox41_Callback(hObject, eventdata, handles)
    3309 % hObject    handle to checkbox41 (see GCBO)
     2592% hObject    handle to AutoVecColor (see GCBO)
    33102593% eventdata  reserved - to be defined in a future version of MATLAB
    33112594% handles    structure with handles and user data (see GUIDATA)
    33122595
    3313 % Hint: get(hObject,'Value') returns toggle state of checkbox41
     2596% Hint: get(hObject,'Value') returns toggle state of AutoVecColor
    33142597
    33152598
    33162599
    33172600function edit89_Callback(hObject, eventdata, handles)
    3318 % hObject    handle to edit89 (see GCBO)
     2601% hObject    handle to max_vec (see GCBO)
    33192602% eventdata  reserved - to be defined in a future version of MATLAB
    33202603% handles    structure with handles and user data (see GUIDATA)
    33212604
    3322 % Hints: get(hObject,'String') returns contents of edit89 as text
    3323 %        str2double(get(hObject,'String')) returns contents of edit89 as a double
     2605% Hints: get(hObject,'String') returns contents of max_vec as text
     2606%        str2double(get(hObject,'String')) returns contents of max_vec as a double
    33242607
    33252608
    33262609% --- Executes during object creation, after setting all properties.
    3327 function edit89_CreateFcn(hObject, eventdata, handles)
    3328 % hObject    handle to edit89 (see GCBO)
     2610function max_vec_CreateFcn(hObject, eventdata, handles)
     2611% hObject    handle to max_vec (see GCBO)
    33292612% eventdata  reserved - to be defined in a future version of MATLAB
    33302613% handles    empty - handles not created until after all CreateFcns called
     
    33602643
    33612644
    3362 % --- Executes on button press in pushbutton35.
     2645% --- Executes on button press in vec_col_bar.
    33632646function pushbutton35_Callback(hObject, eventdata, handles)
    3364 % hObject    handle to pushbutton35 (see GCBO)
     2647% hObject    handle to vec_col_bar (see GCBO)
    33652648% eventdata  reserved - to be defined in a future version of MATLAB
    33662649% handles    structure with handles and user data (see GUIDATA)
    33672650
    33682651
     2652function close_fcn(hObject, eventdata, handles)
     2653huvmat=findobj(allchild(0),'Name','uvmat');
     2654hhuvmat=guidata(huvmat);
     2655set(hhuvmat.list_object_2,'Visible','off')
Note: See TracChangeset for help on using the changeset viewer.