Changeset 831
- Timestamp:
- Nov 30, 2014, 11:20:17 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/uvmat.m
r827 r831 652 652 end 653 653 figure_movie=figure; 654 nbpix=[ 512 384];% resolution XVGA654 nbpix=[640 480];% resolution VGA 655 655 set(figure_movie,'name','figure_movie','Position',[1 1 nbpix]) 656 656 newaxes=copyobj(handles.PlotAxes,figure_movie);%new plotting axes in the new figure … … 660 660 time_str=get(handles.TimeValue,'String'); 661 661 if ~isempty(time_str) 662 htitle=get(newaxes,'Title'); 663 % xlim=get(newaxes,'XLim'); 664 % ylim=get(newaxes,'YLim'); 665 % set(htitle,'Position',[xlim(2)+0.07*(xlim(2)-xlim(1)) ylim(2)-0.05*(ylim(2)-ylim(1)) 0]) 666 662 htitle=get(newaxes,'Title'); 667 663 set(htitle,'String',['t=' time_str]) 668 664 end … … 689 685 uicontrol('Style','edit','Units','normalized', 'Position', [0.05 0.95-1.5*hh 0.9 hh],'tag','MovieName','BackgroundColor',[1 1 1],... 690 686 'String',fullfile(RootPath,[SubDir '.movie'], [RootFile '.avi']),'FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''MovieName'': name (with path) of the movie to create');%edit box 691 uicontrol('Style','text','Units','normalized', 'Position', [0.05 0.95-2.5*hh 0. 45hh/2],'BackgroundColor',BackgroundColor,...687 uicontrol('Style','text','Units','normalized', 'Position', [0.05 0.95-2.5*hh 0.33 hh/2],'BackgroundColor',BackgroundColor,... 692 688 'String','frames per second:','FontUnits','points','FontSize',12,'FontWeight','bold','ForegroundColor','blue','HorizontalAlignment','center');%title 693 uicontrol('Style','text','Units','normalized', 'Position', [0.55 0.95-2.5*hh 0.45 hh/2],'BackgroundColor',BackgroundColor,... 689 uicontrol('Style','text','Units','normalized', 'Position', [0.3 0.95-2.5*hh 0.33 hh/2],'BackgroundColor',BackgroundColor,... 690 'String','resolution:','FontUnits','points','FontSize',12,'FontWeight','bold','ForegroundColor','blue','HorizontalAlignment','center');%title 691 uicontrol('Style','text','Units','normalized', 'Position', [0.55 0.95-2.5*hh 0.33 hh/2],'BackgroundColor',BackgroundColor,... 694 692 'String','total nbre of frames:','FontUnits','points','FontSize',12,'FontWeight','bold','ForegroundColor','blue','HorizontalAlignment','center');%title 695 693 uicontrol('Style','edit','Units','normalized', 'Position', [0.05 0.95-3.5*hh 0.3 hh],'tag','num_FramePerSecond','BackgroundColor',[1 1 1],... 696 694 'String','10','FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''num_FramePerSecond'': nbre of frames per second');%edit box 695 696 uicontrol('Style','listbox','Units','normalized', 'Position', [0.35 0.15 0.3 3*hh],'tag','MovieSize','BackgroundColor',[1 1 1],... 697 'Callback',@(hObject,eventdata)set_movie_size_Callback(hObject,eventdata),'String',{'640x480(VGA)';'720x480(mpeg2 16/9)';'1280x720(HD)'},... 698 'FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''MovieSize'': resolution of the movie');%menu 699 697 700 uicontrol('Style','edit','Units','normalized', 'Position', [0.65 0.95-3.5*hh 0.3 hh],'tag','num_FrameNumber','BackgroundColor',[1 1 1],... 698 701 'String','10','FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''num_FrameNumber'': total nbre of frames');%edit box 702 699 703 uicontrol('Style','pushbutton','Units','normalized', 'Position', [0.05 0.15 0.25 hh],'BackgroundColor',[1 0 0],'String','START','Callback',@(hObject,eventdata)set_movie_START_Callback(hObject,eventdata),... 700 704 'FontWeight','bold','FontUnits','points','FontSize',12,'TooltipString','''APPLY'': apply the output to the current field series in uvmat'); … … 706 710 707 711 %------------------------------------------------------------------------ 708 % function called by pressing APPLY in the GUI set_slices 712 % function called by selecting movie size in the GUI set_movie 713 function set_movie_size_Callback(hObject,eventdata) 714 hset_movie=get(hObject,'parent'); 715 hMovieSize=findobj(hset_movie,'Tag','MovieSize'); 716 nbpix=[640 480; 720 480; 1280 720]; 717 SizeOption=get(hMovieSize,'Value'); 718 nbpix=nbpix(SizeOption,:); 719 720 %% look for movie fig 721 figure_movie=findobj(allchild(0),'name','figure_movie'); 722 if isempty(figure_movie) 723 figure_movie=figure; 724 set(figure_movie,'name','figure_movie','Position',[1 1 nbpix]) 725 huvmat=findobj(allchild(0),'tag','uvmat'); 726 hhuvmat=guidata(huvmat); 727 newaxes=copyobj(hhuvmat.PlotAxes,figure_movie);%new plotting axes in the new figure 728 set(newaxes,'Tag','movieaxes') 729 730 %% display time if defined in uvmat 731 time_str=get(hhuvmat.TimeValue,'String'); 732 if ~isempty(time_str) 733 htitle=get(newaxes,'Title'); 734 set(htitle,'String',['t=' time_str]) 735 end 736 map=colormap(handles.PlotAxes); 737 colormap(map);%transmit the current colormap to the zoom fig 738 colorbar 739 else 740 Pos=get(figure_movie,'Position'); 741 set(figure_movie,'Position',[Pos(1) Pos(2) nbpix]) 742 end 743 744 745 %------------------------------------------------------------------------ 746 % function called by pressing APPLY in the GUI set_movie 709 747 function set_movie_START_Callback(hObject,eventdata) 710 748 %------------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.