Changeset 150 for trunk/src/view_field.m


Ignore:
Timestamp:
Dec 3, 2010, 12:16:51 PM (13 years ago)
Author:
sommeria
Message:

various corrections for plotting and using view_field and get_field. The current field of uvmat or view_field is now stored in the structure userdata.axes3. Introduction of live correlation to test PIV (civ1)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/view_field.m

    r144 r150  
    1 
    21%'view_field': function associated with the GUI 'view_field.fig' for images and data field visualization
    32%------------------------------------------------------------------------
     
    6059
    6160% Choose default command menuline output for view_field
    62 handles.output = handles.axes3;
     61handles.output = handles.view_field;
    6362
    6463% Update handles structure
     
    9291
    9392[PlotType,PlotParamOut]= plot_field(Field,handles.axes3);%,PlotParam,KeepLim,PosColorbar)
    94 set(handles.axes3,'UserData',Field);%store the current field
     93ViewFieldData.axes3=Field;
     94set(handles.view_field,'UserData',ViewFieldData);%store the current field
     95get(handles.view_field)
    9596if isfield(PlotParamOut,'Vectors')
    9697    set(handles.VECT_title,'Visible','on')
     
    692693
    693694%-------------------------------------------------------------------
    694 function [PlotType,ScalOut]=update_plot(handles)
     695function PlotType=update_plot(handles)
    695696%-------------------------------------------------------------------
    696697haxes= handles.axes3;
     
    708709global Data_view_field
    709710% huvmat=findobj(allchild(0),'Name','uvmat');
    710 Data_view_field=get(handles.axes3,'UserData');
     711Data_view_field=get(handles.view_field,'UserData');
     712Data_view_field=Data_view_field.axes3;
    711713% Data_view_field=UvData.ProjField_2;
    712714evalin('base','global Data_view_field')%make CurData global in the workspace
     
    775777function closefcn(hObject, eventdata, handles)
    776778huvmat=findobj(allchild(0),'Name','uvmat');
     779if ~isempty(huvmat)
    777780hhuvmat=guidata(huvmat);
    778781list_object_2=get(hhuvmat.list_object_2,'String');
    779782set(hhuvmat.list_object_2,'Value',numel(list_object_2))%select the last value ('...')
     783end
    780784delete(hObject)
    781 
    782785
    783786
    784787% --- Executes on selection change in popupmenu18.
    785788function popupmenu18_Callback(hObject, eventdata, handles)
    786 
    787 
    788 function edit91_Callback(hObject, eventdata, handles)
    789 % hObject    handle to edit91 (see GCBO)
    790 % eventdata  reserved - to be defined in a future version of MATLAB
    791 % handles    structure with handles and user data (see GUIDATA)
    792 
    793 % Hints: get(hObject,'String') returns contents of edit91 as text
    794 %        str2double(get(hObject,'String')) returns contents of edit91 as a double
    795 
    796 
    797 % --- Executes on button press in checkbox45.
    798 function checkbox45_Callback(hObject, eventdata, handles)
    799 % hObject    handle to checkbox45 (see GCBO)
    800 % eventdata  reserved - to be defined in a future version of MATLAB
    801 % handles    structure with handles and user data (see GUIDATA)
    802 
    803 % Hint: get(hObject,'Value') returns toggle state of checkbox45
    804 
    805 
    806 % --- Executes on selection change in popupmenu19.
    807 function popupmenu19_Callback(hObject, eventdata, handles)
    808 % hObject    handle to popupmenu19 (see GCBO)
    809 % eventdata  reserved - to be defined in a future version of MATLAB
    810 % handles    structure with handles and user data (see GUIDATA)
    811 
    812 % Hints: contents = get(hObject,'String') returns popupmenu19 contents as cell array
    813 %        contents{get(hObject,'Value')} returns selected item from popupmenu19
    814 
    815 
    816 
    817 
    818789
    819790
Note: See TracChangeset for help on using the changeset viewer.