Changeset 75 for trunk/src


Ignore:
Timestamp:
Mar 31, 2010, 2:57:31 PM (15 years ago)
Author:
sommeria
Message:

plot_field: bug repaired for profiles
view_field: introduction of a edit uicontrol for text display (needs to be used)
rescaling of the figure to optimize space
uvmat: small bugs repaired, in particular for 3D fields
TODO: adapt proj_field for lines in 3D space

introduce volume objects and interpolate on 3D grid (griddata3)

Location:
trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/delete_object.m

    r71 r75  
    7373set(hlist_object,'Value',length(list_str))
    7474hlist_object=findobj(huvmat,'Tag','list_object_2');%handles of the object liçst in the uvmat interface
    75 set(hlist_object,'String',[list_str {'...'}])
     75set(hlist_object,'String',[list_str;{'...'}])
    7676set(hlist_object,'Value',length(list_str)+1)
  • trunk/src/plot_field.m

    r74 r75  
    454454    end
    455455end
    456 if test_newplot && ~isequal(plotstr,'plot(')
    457     plotstr=[plotstr '''tag'',''plot_line'');'];
     456if test_newplot && ~isequal(plotstr,'hhh=plot(')
     457    plotstr=[plotstr '''tag'',''plot_line'');']
    458458                %execute plot (instruction  plotstr) 
    459459    eval(plotstr)
  • trunk/src/uvmat.m

    r74 r75  
    19081908end
    19091909UvData=get(handles.uvmat,'UserData');
    1910 % if isfield(UvData,'Txt')
    1911 %     UvData=rmfield(UvData,'Txt');%erase previous error message
    1912 % end
     1910%UvData =structure containing information stored outside the uicontrol of uvmat
     1911%      .NewSeries: =1 for a new series (new root fiel introduced), 0 else
     1912%      .MovieObject: movie object representing an input movie
     1913%      .MovieObject_1: idem for a second input series (_1)
     1914%      .filename_1 : last second input file name (to deal with a constant second input without reading again the file)
     1915%      .VelType_1: last velocity type (civ1, civ2...) for the second input series
     1916%      .FieldName_1: last field name(velocity, vorticity...) for the second input series
     1917%      .NbDim: number of space dimensions of the input field
     1918%      .ZMin, .ZMax: range of the z coordinate
     1919%..... to complement
     1920
    19131921if ishandle(handles.UVMAT_title) %remove title panel on uvmat
    19141922    delete(handles.UVMAT_title)
     
    47074715% ------------------------------------------------------------------
    47084716function Menuplane_Callback(hObject, eventdata, handles)
    4709 % set(handles.create,'Visible','on')
    4710 % set(handles.create,'Value',1)
    4711 % PLANE_Callback(hObject,eventdata,handles)
    47124717data.Style='plane';
    47134718data.ProjMode='projection';%default
     
    47504755end
    47514756UvData=get(handles.uvmat,'UserData');
    4752 [hset_object,UvData.sethandles]=set_object(data);% call the set_object interface
    4753 %position the set_object GUI with respect to uvmat
    4754 pos_uvmat=get(handles.uvmat,'Position');
    4755 if isfield(UvData,'SetObjectOrigin')
    4756     pos_set_object(1:2)=UvData.SetObjectOrigin + pos_uvmat(1:2);
    4757     pos_set_object(3:4)=UvData.SetObjectSize .* pos_uvmat(3:4);
    4758     set(hset_object,'Position',pos_set_object)
    4759 end
     4757% [hset_object,UvData.sethandles]=set_object(data);% call the set_object interface
     4758% %position the set_object GUI with respect to uvmat
     4759% pos_uvmat=get(handles.uvmat,'Position');
     4760% if isfield(UvData,'SetObjectOrigin')
     4761%     pos_set_object(1:2)=UvData.SetObjectOrigin + pos_uvmat(1:2);
     4762%     pos_set_object(3:4)=UvData.SetObjectSize .* pos_uvmat(3:4);
     4763%     set(hset_object,'Position',pos_set_object)
     4764% end
    47604765set(handles.edit,'Value',0); %suppress the object edit mode
    47614766set(handles.edit,'BackgroundColor',[0.7,0.7,0.7]) 
     
    47644769set(handles.delete_object,'Visible','on')
    47654770set(handles.uvmat_title,'Visible','on')
    4766 set(handles.viw_field_title,'Visible','on')
     4771set(handles.view_field_title,'Visible','on')
    47674772
    47684773%------------------------------------------------------------------------
     
    47704775function create_object(data,handles)
    47714776%------------------------------------------------------------------------
    4772 hset_object=findobj(allchild(0),'Name','set_object');
     4777hset_object=findobj(allchild(0),'tag','set_object');
    47734778if ~isempty(hset_object)
    47744779    delete(hset_object)% delete existing version of set_object
     
    47944799    data.DX=max(meshx,meshy);
    47954800end
     4801if isfield(UvData,'NbDim')
     4802    data.NbDim=UvData.NbDim;
     4803end
    47964804data.Coord=[0 0 0]; %default
    47974805if isfield(data,'Style') && isequal(data.Style,'line')
     
    48094817[hset_object,UvData.sethandles]=set_object(data,PlotHandles);% call the set_object interface
    48104818
    4811 % pos_uvmat=get(handles.uvmat,'Position');
    4812 % %position the set_object GUI with respect to uvmat
    4813 % if isfield(UvData,'SetObjectOrigin')
    4814 %     pos_set_object(1:2)=UvData.SetObjectOrigin + pos_uvmat(1:2);
    4815 %     pos_set_object(3:4)=UvData.SetObjectSize .* pos_uvmat(3:4);
    4816 %     set(hset_object,'Position',pos_set_object)
    4817 % end
    4818 
    48194819UvData.MouseAction='create_object';
    48204820set(handles.uvmat,'UserData',UvData)
     
    48234823set(handles.delete_object,'Visible','on')
    48244824set(handles.uvmat_title,'Visible','on')
    4825 set(handles.viw_field_title,'Visible','on')
     4825set(handles.view_field_title,'Visible','on')
    48264826
    48274827%------------------------------------------------------------------------
  • trunk/src/view_field.m

    r71 r75  
    25342534
    25352535
     2536
     2537
     2538
     2539function text_display_Callback(hObject, eventdata, handles)
     2540% hObject    handle to text_display (see GCBO)
     2541% eventdata  reserved - to be defined in a future version of MATLAB
     2542% handles    structure with handles and user data (see GUIDATA)
     2543
     2544% Hints: get(hObject,'String') returns contents of text_display as text
     2545%        str2double(get(hObject,'String')) returns contents of text_display as a double
     2546
     2547
     2548% --- Executes during object creation, after setting all properties.
     2549function text_display_CreateFcn(hObject, eventdata, handles)
     2550% hObject    handle to text_display (see GCBO)
     2551% eventdata  reserved - to be defined in a future version of MATLAB
     2552% handles    empty - handles not created until after all CreateFcns called
     2553
     2554% Hint: edit controls usually have a white background on Windows.
     2555%       See ISPC and COMPUTER.
     2556if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
     2557    set(hObject,'BackgroundColor','white');
     2558end
     2559
     2560
Note: See TracChangeset for help on using the changeset viewer.