Changeset 512 for trunk/src/series.m


Ignore:
Timestamp:
Aug 3, 2012, 2:50:24 PM (9 years ago)
Author:
sommeria
Message:

various cleaning

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series.m

    r495 r512  
    588588
    589589%% 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 index
     590i_sum=sum(sum(i1_series,2),1);%sum of i1_series on the last index
    591591MaxIndex_i=max(find(i_sum>0))-1;% max ref index i
    592592MinIndex_i=min(find(i_sum>0))-1;% min ref index i
    593593i2_min=[];
    594594if ~isempty(i2_series)
    595     i2_min=i2_series(1,2);
     595    i2_min=i2_series(1,2,2);
    596596end
    597597j1_min=[];
    598598if ~isempty(j1_series)
    599     j1_min=j1_series(1,2);
     599    j1_min=j1_series(1,2,2);
    600600end
    601601j2_min=[];
    602602if ~isempty(j2_series)
    603     j2_min=j2_series(1,2);
     603    j2_min=j2_series(1,2,2);
    604604end
    605605if isequal(MinIndex_i,1) &&...
     
    607607    MinIndex_i=0;
    608608end
    609 j_sum=sum(sum(j1_series,1),3);
     609j_sum=sum(sum(j1_series,1),1);
    610610MaxIndex_j=max(find(j_sum>0))-1;
    611611MinIndex_j=min(find(j_sum>0))-1;
     
    793793nbview=numel(SeriesData.i1_series);
    794794for 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));
    797797end
    798798index_min=min(index_min);
     
    808808    ind_y=1+(iview-1)*range_y:iview*range_y;
    809809    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;
    811811    LineData(x_index)=1;
    812812    LineData=interp1(x,LineData,xI,'nearest');
     
    815815CData=cat(3,zeros(size(CData)),CData,zeros(size(CData)));
    816816set(handles.FileStatus,'CData',CData);
    817 
    818 %
    819 %
    820 % xima=0.5:pos(3)-0.5;% pixel positions on the image representing the existing file indices
    821 % 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_i-0.5)*pos(3)/nb_i;
    826 % ind_j=(0.5:nb_j-0.5)*pos(4)/nb_j;
    827 % [Ind_i,Ind_j]=meshgrid(ind_i,ind_j);
    828 % CData=zeros([size(XIma) 3]);%black color
    829 % file_ima=double((i1_series(:,:,1)>0)');
    830 % if numel(file_ima)>=2
    831 % if size(file_ima,1)==1
    832 %     CLine=interp1(ind_i,file_ima,xima,'nearest');
    833 %     CData(:,:,2)=ones(size(yima'))*CLine;
    834 % else
    835 %     CData(:,:,2)=interp2(Ind_i,Ind_j,file_ima,XIma,YIma,'nearest');
    836 % end
    837 % set(handles.FileStatus,'CData',CData)
    838 % end
    839 % set(handles.FileStatus,'Units','normalized')
    840817
    841818
     
    10771054% end
    10781055for 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));
    10811058end
    10821059[index_min,iview_min]=min(index_min);
     
    21852162yima=0.5:pos(4)-0.5;
    21862163[XIma,YIma]=meshgrid(xima,yima);
    2187 nb_i=size(i1_series,1);
     2164nb_i=size(i1_series,3);
    21882165nb_j=size(i1_series,2);
    21892166ind_i=(0.5:nb_i-0.5)*pos(3)/nb_i;
Note: See TracChangeset for help on using the changeset viewer.