Changeset 644 for trunk/src/series.m
- Timestamp:
- May 28, 2013, 11:30:01 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series.m
r643 r644 1073 1073 1074 1074 %% set the waitbar position with respect to the min and max in the series 1075 for iview=1:numel(SeriesData.i1_series) 1076 pair_max{iview}=squeeze(max(SeriesData.i1_series{iview},[],1)); %max on pair index 1077 if (strcmp(get(handles.num_first_j,'Visible'),'off')&& size(pair_max{iview},2)~=1) 1078 pair_max{iview}=squeeze(max(pair_max{iview},[],1)); % consider only the i index 1079 end 1080 pair_max{iview}=reshape(pair_max{iview},1,[]); 1081 index_min(iview)=find(pair_max{iview}>0, 1 ); 1082 index_max(iview)=find(pair_max{iview}>0, 1, 'last' ); 1083 end 1084 [index_min,iview_min]=min(index_min); 1085 [index_max,iview_max]=min(index_max); 1086 if size(SeriesData.i1_series{iview_min},2)==1% movie 1087 index_first=ref_i(1); 1088 index_last=ref_i(2); 1089 else 1090 index_first=(ref_i(1)-1)*(size(SeriesData.i1_series{iview_min},1))+ref_j(1)+1; 1091 index_last=(ref_i(2)-1)*(size(SeriesData.i1_series{iview_max},1))+ref_j(2)+1; 1092 end 1093 range=index_max-index_min+1; 1094 coeff_min=(index_first-index_min)/range; 1095 coeff_max=(index_last-index_min+1)/range; 1075 MinIndex_i=min(get(handles.MinIndex_i,'Data')); 1076 MaxIndex_i=max(get(handles.MaxIndex_i,'Data')); 1077 pos_first=(ref_i(1)-MinIndex_i)/(MaxIndex_i-MinIndex_i+1); 1078 pos_last=(ref_i(2)-MinIndex_i+1)/(MaxIndex_i-MinIndex_i+1); 1096 1079 Position=get(handles.Waitbar,'Position');% position of the waitbar:= [ x,y, width, height] 1097 1080 Position_status=get(handles.FileStatus,'Position'); 1098 Position(1)= coeff_min*Position_status(3)+Position_status(1);1099 Position(3)=Position_status(3)*( coeff_max-coeff_min);1081 Position(1)=Position_status(1)+Position_status(3)*pos_first; 1082 Position(3)=Position_status(3)*(pos_last-pos_first); 1100 1083 set(handles.Waitbar,'Position',Position) 1101 1084 update_waitbar(handles.Waitbar,0) 1085 1086 % for iview=1:numel(SeriesData.i1_series) 1087 % pair_max{iview}=squeeze(max(SeriesData.i1_series{iview},[],1)); %max on pair index 1088 % if (strcmp(get(handles.num_first_j,'Visible'),'off')&& size(pair_max{iview},2)~=1) 1089 % pair_max{iview}=squeeze(max(pair_max{iview},[],1)); % consider only the i index 1090 % end 1091 % pair_max{iview}=reshape(pair_max{iview},1,[]); 1092 % index_min(iview)=find(pair_max{iview}>0, 1 ); 1093 % index_max(iview)=find(pair_max{iview}>0, 1, 'last' ); 1094 % end 1095 % [index_min,iview_min]=min(index_min); 1096 % [index_max,iview_max]=min(index_max); 1097 % if size(SeriesData.i1_series{iview_min},2)==1% movie 1098 % index_first=ref_i(1); 1099 % index_last=ref_i(2); 1100 % else 1101 % index_first=(ref_i(1)-1)*(size(SeriesData.i1_series{iview_min},1))+ref_j(1)+1; 1102 % index_last=(ref_i(2)-1)*(size(SeriesData.i1_series{iview_max},1))+ref_j(2)+1; 1103 % end 1104 % range=index_max-index_min+1; 1105 % coeff_min=(index_first-index_min)/range; 1106 % coeff_max=(index_last-index_min+1)/range; 1107 % Position=get(handles.Waitbar,'Position');% position of the waitbar:= [ x,y, width, height] 1108 % Position_status=get(handles.FileStatus,'Position'); 1109 % Position(1)=coeff_min*Position_status(3)+Position_status(1); 1110 % Position(3)=Position_status(3)*(coeff_max-coeff_min); 1111 % set(handles.Waitbar,'Position',Position) 1112 % update_waitbar(handles.Waitbar,0) 1102 1113 1103 1114 %------------------------------------------------------------------------ … … 1370 1381 set(handles.RUN,'BackgroundColor',[1 1 0])%show activation of RUN by yellow color 1371 1382 drawnow 1383 set(handles.status,'Value',0)% desable status display if relevant 1384 status_Callback(hObject, eventdata, handles) 1372 1385 1373 1386 %% read the data on the GUI series … … 1832 1845 end 1833 1846 set(handles.ActionName,'BackgroundColor',[1 1 0]) 1847 huigetfile=findobj(allchild(0),'tag','status_display') 1848 if ~isempty(huigetfile) 1849 delete(huigetfile) 1850 end 1834 1851 drawnow 1835 1852 … … 2598 2615 OutputDir=fullfile(RootPath,OutputSubDir); 2599 2616 uigetfile_uvmat('status_display',OutputDir) 2600 2601 % hfig=findobj(allchild(0),'name','series_status');2602 % if isempty(hfig)2603 % ScreenSize=get(0,'ScreenSize');2604 % hfig=figure('DeleteFcn',@stop_status,'Position',[ScreenSize(3)-600 ScreenSize(4)-640 560 600]);2605 % set(hfig,'MenuBar','none')% suppress the menu bar2606 % set(hfig,'NumberTitle','off')%suppress the fig number in the title2607 % set(hfig,'name','series_status')2608 % set(hfig,'tag','series_status')2609 % uicontrol('Style','listbox','Units','normalized', 'Position',[0.05 0.09 0.9 0.71], 'Callback', @view_file,'tag','list','UserData',OutputDir);2610 % uicontrol('Style','edit','Units','normalized', 'Position', [0.05 0.87 0.9 0.1],'tag','titlebox','Max',2,'String',OutputDir);2611 % uicontrol('Style','frame','Units','normalized', 'Position', [0.05 0.81 0.9 0.05]);2612 % uicontrol('Style','pushbutton','Units','normalized', 'Position', [0.7 0.01 0.2 0.07],'String','Close','FontWeight','bold','FontUnits','points','FontSize',11,'Callback',@stop_status);2613 % uicontrol('Style','pushbutton','Units','normalized', 'Position', [0.1 0.01 0.2 0.07],'String','Refresh','FontWeight','bold','FontUnits','points','FontSize',11,'Callback',@refresh_GUI);2614 % %set(hrefresh,'UserData',StatusData)2615 % BarPosition=[0.05 0.81 0.01 0.05];2616 % uicontrol('Style','frame','Units','normalized', 'Position',BarPosition ,'BackgroundColor',[1 0 0],'tag','waitbar');2617 % drawnow2618 % end2619 % refresh_GUI(hfig)2620 2617 else 2621 2618 %% delete current display fig if selection is off 2622 2619 set(handles.status,'BackgroundColor',[0 1 0]) 2623 hfig=findobj(allchild(0),'name','s eries_status');2620 hfig=findobj(allchild(0),'name','status_display'); 2624 2621 if ~isempty(hfig) 2625 2622 delete(hfig)
Note: See TracChangeset
for help on using the changeset viewer.