source: trunk/src/nomtype2pair.m @ 643

Last change on this file since 643 was 595, checked in by sommeria, 11 years ago

steps further to use series with cluster. Some bsolete functions removed

File size: 991 bytes
Line 
1%'nomtype2pair': creates nomencalture for index pairs knowing the image nomenclature, used by series fct
2%---------------------------------------------------------------------
3% NomTypeOut=nomtype2pair(NomTypeIn)
4%---------------------------------------------------------------------           
5% OUTPUT:
6% NomTypeOut: file index nomenclature for pairs
7%---------------------------------------------------------------------
8% INPUT:
9% NomTypeIn: file index nomenclature for images
10%
11% for definitions of file index nomenclature, see fct fullfile_uvmat
12
13function NomTypeOut=nomtype2pair(NomTypeIn)
14
15if ~isempty(regexp(NomTypeIn,'a$'))
16    NomTypeOut=[NomTypeIn 'b'];
17elseif ~isempty(regexp(NomTypeIn,'A$'))
18    NomTypeOut=[NomTypeIn 'B'];
19else
20    r=regexp(NomTypeIn,'(?<num1>\d+)_(?<num2>\d+)$','names');
21    % case of a single input index (no j)
22    if isempty(r)
23        NomTypeOut='_1-2';
24    else  % case of two indices i,j, separated by '_'
25        NomTypeOut='_1-2_1-2';
26    end
27end
Note: See TracBrowser for help on using the repository browser.