Ignore:
Timestamp:
Dec 21, 2011, 10:12:13 AM (12 years ago)
Author:
sommeria
Message:

-bugs repaired in civ
-change in find_file_series to account for possible file index 0
-name2display suppressed in all functions, replaced by fileparts_uvmat (except incorporated in civ_3D)
-open_uvmat introduced to open files from a list

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/find_file_series.m

    r342 r343  
    55% OUTPUT:
    66% RootPath,RootFile: root path and root name detected in fileinput, possibly modified for movies (indexing is then done on image view, not file)
    7 % i1_series(ref_i, ref_j,pair),i2_series,j1_series,j2_series: set of indices (i1,i2,j1,j2) sorted by ref index ref_i, ref_j, and pairindex in case of multiple pairs with the same ref
     7% i1_series(ref_i+1, ref_j+1,pair),i2_series,j1_series,j2_series: set of indices (i1,i2,j1,j2) sorted by ref index ref_i, ref_j, and pairindex in case of multiple pairs with the same ref
     8%  (ref_i+1 is used to deal with the image index zero sometimes used)
    89% NomType: nomenclature type corrected after checking the first file (problem of 0 before the number string)
    910% FileType: type of file, =
     
    129130    for ifile=1:nbpair
    130131        [~,~,~,i1,i2,j1,j2]=fileparts_uvmat(dirpair(ifile).name);
    131         %             i1_series(ifile)=i1;
    132132        ref_i=i1;
    133133        if isempty(i2_input)
     
    162162        nb_pairs=0;
    163163        if ~isempty(i2_input)|| ~isempty(j2_input) %deals with  pairs
    164             if size(i1_series,1)>=ref_i && size(i1_series,2)>=ref_j
    165                 nb_pairs=numel(find(i1_series(ref_i,ref_j,:)~=0));
    166             end
    167         end
    168         i1_series(ref_i,ref_j,nb_pairs+1)=i1;
     164            if size(i1_series,1)>=ref_i+1 && size(i1_series,2)>=ref_j+1
     165                nb_pairs=numel(find(i1_series(ref_i+1,ref_j+1,:)~=0));
     166            end
     167        end
     168        i1_series(ref_i+1,ref_j+1,nb_pairs+1)=i1;
    169169        if ~isempty(i2_input)
    170             i2_series(ref_i,ref_j,nb_pairs+1)=i2;
     170            i2_series(ref_i+1,ref_j+1,nb_pairs+1)=i2;
    171171        end
    172172        if ~isempty(j1_input)
    173             j1_series(ref_i,ref_j,nb_pairs+1)=j1;
     173            j1_series(ref_i+1,ref_j+1,nb_pairs+1)=j1;
    174174        end
    175175        if ~isempty(j2_input)
    176             j1_series(ref_i,ref_j,nb_pairs+1)=j1;
    177             j2_series(ref_i,ref_j,nb_pairs+1)=j2;
     176            j1_series(ref_i+1,ref_j+1,nb_pairs+1)=j1;
     177            j2_series(ref_i+1,ref_j+1,nb_pairs+1)=j2;
    178178        end
    179179    end
Note: See TracChangeset for help on using the changeset viewer.