User Documentation
RAVL, Recognition And Vision Library
Ravl - OS - Sequence - Numbered Files

Numbered files

There are three ways open opening a numbered sequence of files. By opening the first file in the sequence, by open with a filename containing %d in place of the number or if the number is before the extension by omitting the number entirely.

Using %d in the filename.

Using %d you can explicitly set the format of the file name to be used. It is used by placing the %d in the filename where the number is expected. can be used to read a sequence of files such as:

If you wish the filenames to be zero padded you can add the number of digits between the % and the d. So can be used to read or write the following files:

Opening the first file in the sequence.

If the file being opened cannot be interpreted as a stream themselves (such as pnm ) you can just open the first file in the sequence and the rest of the sequence will be found automaticly. So you could open the following sequence,

with the filename

Omiting the number completely.

If the filename is in the form nameNNN.XXX where NNN is some number and XXX is the extention. The file may be opened as name.XXX provided there no file of that name exists. The system will scan the directory for files which conform to this format and work out the range of digits, and if zero padding is being used.

Normal classes:

 DPFileSequenceBaseC File Sequence.
 DPIFileSequenceC Input File Sequence
 DPOFileSequenceC Input File Sequence
Documentation by CxxDoc: Tue Aug 13 10:00:52 2002