Changeset 332 for trunk/src/uvmat.m


Ignore:
Timestamp:
Dec 13, 2011, 11:20:07 AM (12 years ago)
Author:
sommeria
Message:

NomType? changed from _i1-i2 ... to _1-2 ... (bugs to be expected!)
bug corrected in geometry_calib
series changed by introducing a from FileIndices?, introduction of find_file_series to detect the file series corresponding to an input file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/uvmat.m

    r326 r332  
    660660    end
    661661end
    662 if ~strcmp(hhh,'')&& mmreader.isPlatformSupported()% if the function is found (recent version of matlab)
     662if ~strcmp(hhh,'')% if the function mmreader is found (recent version of matlab)
    663663    UvData.MovieObject=mmreader([FileBase FileIndices FileExt]);
    664664elseif isfield(UvData,'MovieObject')
     
    13601360%     NomType=get(handles.FileIndex,'UserData');
    13611361    switch NomType
    1362     case {'_i_j1-j2','#_ab','%3dab'},% pair with j index
     1362    case {'_1_1-2','#_ab','%3dab'},% pair with j index
    13631363        set(handles.fix_pair,'Visible','on')% option fixed pair on/off made visible (choice of avaible pair with buttons + and - if ='off')
    13641364    otherwise
     
    17781778%% read the current input file name(s) and field indices
    17791779InputFile=read_GUI(handles.InputFile);
    1780 InputFile.RootFile=regexprep(InputFile.RootFile,'\<[\\/]|[\\/]\>','');%suppress possible / or \ separator at the beginning or the end of the string
    1781 InputFile.SubDir=regexprep(InputFile.SubDir,'\<[\\/]|[\\/]\>','');%suppress possible / or \ separator at the beginning or the end of the string
     1780InputFile.RootFile=regexprep(InputFile.RootFile,'^[\\/]|[\\/]$','');%suppress possible / or \ separator at the beginning or the end of the string
     1781InputFile.SubDir=regexprep(InputFile.SubDir,'^[\\/]|[\\/]$','');%suppress possible / or \ separator at the beginning or the end of the string
    17821782if isempty(InputFile.RootFile)
    17831783    filebase=InputFile.RootPath;
     
    31493149NomTypeNew=NomType;%default
    31503150if isequal(field,'image')
    3151     if isequal(NomType,'_i1-i2_j')||isequal(NomType,'_i_j1-j2')
    3152         NomTypeNew='_i_j';
     3151    if isequal(NomType,'_1-2_1')||isequal(NomType,'_1_1-2')
     3152        NomTypeNew='_1_1';
    31533153    elseif isequal(NomType,'#_ab')
    31543154        NomTypeNew='#a';
    3155     elseif isequal(NomType,'_i1-i2')
    3156         NomTypeNew='_i';
     3155    elseif isequal(NomType,'_1-2')
     3156        NomTypeNew='_1';
    31573157    end
    31583158    imagename=name_generator(FileBase,str2double(str1),str2double(str_a),'.png',NomTypeNew,1,str2double(str2),str2double(str_b),'');
     
    32703270if isequal(field_1,'image')
    32713271    % transform netc type to the corresponding image type
    3272     if isequal(NomType_1,'_i1-i2_j')||isequal(NomType_1,'_i_j1-j2')|| isequal(NomType_1,'#_ab')|| isequal(NomType_1,'_i1-i2')
     3272    if isequal(NomType_1,'_1-2_1')||isequal(NomType_1,'_1_1-2')|| isequal(NomType_1,'#_ab')|| isequal(NomType_1,'_1-2')
    32733273        UvData.SubDir_1=get(handles.SubDir_1,'String'); %preserve the InputFile.SubDir in memory   
    3274         if isequal(NomType_1,'_i1-i2_j')||isequal(NomType_1,'_i_j1-j2')
    3275             NomTypeNew='_i_j';
     3274        if isequal(NomType_1,'_1-2_1')||isequal(NomType_1,'_1_1-2')
     3275            NomTypeNew='_1_1';
    32763276        elseif isequal(NomType_1,'#_ab')
    32773277            NomTypeNew='#a';
    3278         elseif isequal(NomType_1,'_i1-i2')
    3279             NomTypeNew='_i';
     3278        elseif isequal(NomType_1,'_1-2')
     3279            NomTypeNew='_1';
    32803280        end 
    32813281    end
     
    33213321        str1=get(handles.i1,'String');
    33223322        str_a=get(handles.j1,'String');
    3323         if isequal(NomType_1,'#_ab')||isequal(NomType_1,'_i1-i2_j')||isequal(NomType_1,'_i_j1-j2')||isequal(NomType_1,'_i1-i2')
     3323        if isequal(NomType_1,'#_ab')||isequal(NomType_1,'_1-2_1')||isequal(NomType_1,'_1_1-2')||isequal(NomType_1,'_1-2')
    33243324            NomTypeNew=NomType_1;
    33253325        elseif isequal(NomType_1,'#a')
    33263326             [filename, n1,na,n2,nb,SubDir_1]=name_generator(filebase_1, str2num(str1),stra2num(str_a),'.nc','#_ab',0,[],[],SubDir_1);
    33273327             NomTypeNew='#_ab';
    3328         elseif isequal(NomType_1,'_i_j')
    3329              [filename,n1,na,n2,nb,SubDir_1]=name_generator(filebase_1,str2num(str1),stra2num(str_a),'.nc','_i1-i2_j',0,str2num(str1),[],SubDir_1);
     3328        elseif isequal(NomType_1,'_1_1')
     3329             [filename,n1,na,n2,nb,SubDir_1]=name_generator(filebase_1,str2num(str1),stra2num(str_a),'.nc','_1-2_1',0,str2num(str1),[],SubDir_1);
    33303330            if idetect==1
    3331                 NomTypeNew='_i1-i2_j';
     3331                NomTypeNew='_1-2_1';
    33323332            else
    3333                 NomTypeNew='_i_j1-j2';
     3333                NomTypeNew='_1_1-2';
    33343334            end
    33353335        else %for instance avi files or any ima_num series
    3336             [filename,n1,na,n2,nb,SubDir_1]=name_generator(filebase_1,str2num(str1),stra2num(str_a),'.nc','_i1-i2',0,str2num(str1),[],SubDir_1);
    3337             NomTypeNew='_i1-i2';
     3336            [filename,n1,na,n2,nb,SubDir_1]=name_generator(filebase_1,str2num(str1),stra2num(str_a),'.nc','_1-2',0,str2num(str1),[],SubDir_1);
     3337            NomTypeNew='_1-2';
    33383338        end           
    33393339        [Path,Name]=fileparts(filebase_1);
Note: See TracChangeset for help on using the changeset viewer.