Changeset 85 for trunk/src/name_generator.m
- Timestamp:
- Apr 25, 2010, 9:46:07 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/name_generator.m
r65 r85 2 2 %--------------------------------------------------------------------- 3 3 % [filename,idetect,num_i1_out,num_j1_out,num_i2_out,num_j2_out,subdir_out]=... 4 %name_generator(filebase,num_i1,num_j1,ext,nom_type,comp_input,num_i2,num_j2,subdir);4 % name_generator(filebase,num_i1,num_j1,ext,nom_type,comp_input,num_i2,num_j2,subdir); 5 5 %--------------------------------------------------------------------- 6 6 % This function detects the existence the constructed file name and it can 7 7 % find indices according to file existence if they are not specified 8 % %rmq: this function is related to the reverse functions display2name and name2diplay8 % rmq: this function is related to the reverse functions display2name and name2diplay 9 9 %--------------------------------------------------------------------- 10 10 % OUTPUT: 11 % filename: string representing the file name (including path)12 % idetect: =1 if the file is detected, 0 otherwise13 % num_i1_out,num_j1_out,num_i2_out,num_j2_out,subdir_out: index numbers and subdirectory detected14 %for free input (= to the corresponding input indices when comp_input=1)11 % filename: string representing the file name (including path) 12 % idetect: =1 if the file is detected, 0 otherwise 13 % num_i1_out,num_j1_out,num_i2_out,num_j2_out,subdir_out: index numbers and subdirectory detected 14 % for free input (= to the corresponding input indices when comp_input=1) 15 15 %--------------------------------------------------------------------- 16 16 % INPUT: … … 20 20 % 'ext': file name extension (e.g. '.png' or '.nc') 21 21 % 'nom_type': string defining the kind of nomenclature used: 22 %nom_type='': constant name [filebase ext] (default output if 'nom_type' is undefined)23 %nom_type='*': the same file [filebase ext] contains successive fields (ex avi movies)24 %nom_type='_i': series of files with a single index i preceded by '_'(e.g. 'aa_45.png').25 %nom_type='#' series of indexed images wich is not series_i [filebase index ext], e.g. 'aa045.jpg' or 'aa45.tif'26 %nom_type='_i_j' matrix of files with two indices i and j separated by '_'(e.g. 'aa_45_2.png')27 %nom_type='_i1-i2' from pairs from a single index (e.g. 'aa_45-47.nc')28 %nom_type='_i_j1-j2'pairs of j indices (e.g. 'aa_45_2-3.nc')29 %nom_type='_i1-i2_j' pairs of i indices (e.g. 'aa_45-46_2.nc')30 %nom_type='#a','#A' with a numerical index and an index letter(e.g.'aa045b.png'), OBSOLETE (replaced by 'series_i_j')31 %nom_type='%03d' or '%04d', series of indexed images with numbers completed with zeros to 3 or 4 digits, e.g.'aa045.tif'32 %nom_type='_%03d', '_%04d', or '_%05d', series of indexed images with _ and numbers completed with zeros to 3, 4 or 5 digits, e.g.'aa_045.tif'33 %nom_type='raw_SMD', same as '#a' but with no extension ext='', OBSOLETE34 %nom_type='#_ab' from pairs of '#a' images (e.g. 'aa045bc.nc'), ext='.nc', OBSOLETE (replaced by 'netc_2D')35 %nom_type='%3dab' from pairs of '%3da' images (e.g. 'aa045bc.nc'), ext='.nc', OBSOLETE (replaced by 'netc_2D')36 % A REVOIR: 'comp_input'=1 for writting =0 for reading , 'comp_input'(for nom_type involving index pairs (e.g. netc))37 %comp_input=1: the index pair is imposed,38 %comp_input=0: the index pair is automatically searched, choosing the most recent file in case of multiple choice22 % nom_type='': constant name [filebase ext] (default output if 'nom_type' is undefined) 23 % nom_type='*': the same file [filebase ext] contains successive fields (ex avi movies) 24 % nom_type='_i': series of files with a single index i preceded by '_'(e.g. 'aa_45.png'). 25 % nom_type='#' series of indexed images wich is not series_i [filebase index ext], e.g. 'aa045.jpg' or 'aa45.tif' 26 % nom_type='_i_j' matrix of files with two indices i and j separated by '_'(e.g. 'aa_45_2.png') 27 % nom_type='_i1-i2' from pairs from a single index (e.g. 'aa_45-47.nc') 28 % nom_type='_i_j1-j2'pairs of j indices (e.g. 'aa_45_2-3.nc') 29 % nom_type='_i1-i2_j' pairs of i indices (e.g. 'aa_45-46_2.nc') 30 % nom_type='#a','#A' with a numerical index and an index letter(e.g.'aa045b.png'), OBSOLETE (replaced by 'series_i_j') 31 % nom_type='%03d' or '%04d', series of indexed images with numbers completed with zeros to 3 or 4 digits, e.g.'aa045.tif' 32 % nom_type='_%03d', '_%04d', or '_%05d', series of indexed images with _ and numbers completed with zeros to 3, 4 or 5 digits, e.g.'aa_045.tif' 33 % nom_type='raw_SMD', same as '#a' but with no extension ext='', OBSOLETE 34 % nom_type='#_ab' from pairs of '#a' images (e.g. 'aa045bc.nc'), ext='.nc', OBSOLETE (replaced by 'netc_2D') 35 % nom_type='%3dab' from pairs of '%3da' images (e.g. 'aa045bc.nc'), ext='.nc', OBSOLETE (replaced by 'netc_2D') 36 %'comp_input' (for nom_type involving index pairs (e.g. netc)) 37 % comp_input=1: the index pair is imposed, 38 % comp_input=0: the index pair is automatically searched, choosing the most recent file in case of multiple choice 39 39 % 'num_i2': second index i (for nom_type involving index pairs (e.g. netc)) 40 40 % 'num_j2': second index j (for nom_type involving index pairs (e.g. netc)) 41 41 % 'subdir': (used for nom_type=netc...) string representing the name of the subdirectory 'subdir' containing file. 42 %subdir='': no subdirectory,43 %subdir='?', the file is first searched with no subdirectory, then in the most recently modified subdirectory if not detected.42 % subdir='': no subdirectory, 43 % subdir='?', the file is first searched with no subdirectory, then in the most recently modified subdirectory if not detected. 44 44 45 45 % A FAIRE: si comp_inpu=0, si _i_j n'existe pas, chercher _i,
Note: See TracChangeset
for help on using the changeset viewer.