Last change
on this file since 662 was
646,
checked in by sommeria, 12 years ago
|
various update, bugs to be expected
|
File size:
991 bytes
|
Rev | Line | |
---|
[646] | 1 | %'nomtype2pair': creates nomenclature for index pairs knowing the image nomenclature, used by series fct |
---|
[8] | 2 | %--------------------------------------------------------------------- |
---|
[595] | 3 | % NomTypeOut=nomtype2pair(NomTypeIn) |
---|
[8] | 4 | %--------------------------------------------------------------------- |
---|
| 5 | % OUTPUT: |
---|
[595] | 6 | % NomTypeOut: file index nomenclature for pairs |
---|
[8] | 7 | %--------------------------------------------------------------------- |
---|
| 8 | % INPUT: |
---|
[595] | 9 | % NomTypeIn: file index nomenclature for images |
---|
| 10 | % |
---|
| 11 | % for definitions of file index nomenclature, see fct fullfile_uvmat |
---|
[8] | 12 | |
---|
[595] | 13 | function NomTypeOut=nomtype2pair(NomTypeIn) |
---|
[8] | 14 | |
---|
[595] | 15 | if ~isempty(regexp(NomTypeIn,'a$')) |
---|
| 16 | NomTypeOut=[NomTypeIn 'b']; |
---|
| 17 | elseif ~isempty(regexp(NomTypeIn,'A$')) |
---|
| 18 | NomTypeOut=[NomTypeIn 'B']; |
---|
| 19 | else |
---|
| 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'; |
---|
[107] | 26 | end |
---|
[8] | 27 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.