Changeset 512 for trunk/src/series.m
 Timestamp:
 Aug 3, 2012, 2:50:24 PM (9 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/src/series.m
r495 r512 588 588 589 589 %% display the min and max indices for all the file series 590 i_sum=sum(sum(i1_series,2), 3);%sum of i1_series on the last index590 i_sum=sum(sum(i1_series,2),1);%sum of i1_series on the last index 591 591 MaxIndex_i=max(find(i_sum>0))1;% max ref index i 592 592 MinIndex_i=min(find(i_sum>0))1;% min ref index i 593 593 i2_min=[]; 594 594 if ~isempty(i2_series) 595 i2_min=i2_series(1,2 );595 i2_min=i2_series(1,2,2); 596 596 end 597 597 j1_min=[]; 598 598 if ~isempty(j1_series) 599 j1_min=j1_series(1,2 );599 j1_min=j1_series(1,2,2); 600 600 end 601 601 j2_min=[]; 602 602 if ~isempty(j2_series) 603 j2_min=j2_series(1,2 );603 j2_min=j2_series(1,2,2); 604 604 end 605 605 if isequal(MinIndex_i,1) &&... … … 607 607 MinIndex_i=0; 608 608 end 609 j_sum=sum(sum(j1_series,1), 3);609 j_sum=sum(sum(j1_series,1),1); 610 610 MaxIndex_j=max(find(j_sum>0))1; 611 611 MinIndex_j=min(find(j_sum>0))1; … … 793 793 nbview=numel(SeriesData.i1_series); 794 794 for iview=1:nbview 795 index_min(iview)=min(find(SeriesData.i1_series{iview}( 2:end,2:end,1)>0));796 index_max(iview)=max(find(SeriesData.i1_series{iview}( 2:end,2:end,1)>0));795 index_min(iview)=min(find(SeriesData.i1_series{iview}(1,2:end,2:end)>0)); 796 index_max(iview)=max(find(SeriesData.i1_series{iview}(1,2:end,2:end)>0)); 797 797 end 798 798 index_min=min(index_min); … … 808 808 ind_y=1+(iview1)*range_y:iview*range_y; 809 809 LineData=zeros(1,range_index); 810 x_index=find(SeriesData.i1_series{iview}( 2:end,2:end,1)>0)index_min+1;810 x_index=find(SeriesData.i1_series{iview}(1,2:end,2:end)>0)index_min+1; 811 811 LineData(x_index)=1; 812 812 LineData=interp1(x,LineData,xI,'nearest'); … … 815 815 CData=cat(3,zeros(size(CData)),CData,zeros(size(CData))); 816 816 set(handles.FileStatus,'CData',CData); 817 818 %819 %820 % xima=0.5:pos(3)0.5;% pixel positions on the image representing the existing file indices821 % yima=0.5:pos(4)0.5;822 % [XIma,YIma]=meshgrid(xima,yima);823 % nb_i=size(i1_series,1);824 % nb_j=size(i1_series,2);825 % ind_i=(0.5:nb_i0.5)*pos(3)/nb_i;826 % ind_j=(0.5:nb_j0.5)*pos(4)/nb_j;827 % [Ind_i,Ind_j]=meshgrid(ind_i,ind_j);828 % CData=zeros([size(XIma) 3]);%black color829 % file_ima=double((i1_series(:,:,1)>0)');830 % if numel(file_ima)>=2831 % if size(file_ima,1)==1832 % CLine=interp1(ind_i,file_ima,xima,'nearest');833 % CData(:,:,2)=ones(size(yima'))*CLine;834 % else835 % CData(:,:,2)=interp2(Ind_i,Ind_j,file_ima,XIma,YIma,'nearest');836 % end837 % set(handles.FileStatus,'CData',CData)838 % end839 % set(handles.FileStatus,'Units','normalized')840 817 841 818 … … 1077 1054 % end 1078 1055 for iview=1:numel(SeriesData.i1_series) 1079 index_min(iview)=min(find(SeriesData.i1_series{iview}( 2:end,2:end,1)>0));1080 index_max(iview)=max(find(SeriesData.i1_series{iview}( 2:end,2:end,1)>0));1056 index_min(iview)=min(find(SeriesData.i1_series{iview}(1,2:end,2:end)>0)); 1057 index_max(iview)=max(find(SeriesData.i1_series{iview}(1,2:end,2:end)>0)); 1081 1058 end 1082 1059 [index_min,iview_min]=min(index_min); … … 2185 2162 yima=0.5:pos(4)0.5; 2186 2163 [XIma,YIma]=meshgrid(xima,yima); 2187 nb_i=size(i1_series, 1);2164 nb_i=size(i1_series,3); 2188 2165 nb_j=size(i1_series,2); 2189 2166 ind_i=(0.5:nb_i0.5)*pos(3)/nb_i;
Note: See TracChangeset
for help on using the changeset viewer.