#include <vidl2_image_list_istream.h>
Inheritance diagram for vidl2_image_list_istream:

This istream will try to open and validate (but not read image data from) every file in a list of file paths. The paths to valid image files are maintained, but only one image is opened at a time. Keeping a list of open file descriptors (via vil_image_resource_sptr) was found to be problematic. The number of simultaneously open files is limited on many platforms. The paths are tested for validity at the "open" stage rather than the "stream" stage so that we have random access to the frames (i.e. the stream is seekable).
Definition at line 27 of file vidl2_image_list_istream.h.
Public Member Functions | |
| vidl2_image_list_istream () | |
| Constructor - default. | |
| vidl2_image_list_istream (const vcl_string &glob) | |
| Constructor - from a file glob string. | |
| vidl2_image_list_istream (const vcl_vector< vcl_string > &paths) | |
| Constructor - from a vector of file paths. | |
| virtual | ~vidl2_image_list_istream () |
| Destructor. | |
| virtual bool | open (const vcl_string &glob) |
| Open a new stream using a file glob (see vul_file_iterator). | |
| virtual bool | open (const vcl_vector< vcl_string > &paths) |
| Open a new stream using a vector of file paths. | |
| virtual void | close () |
| Close the stream. | |
| virtual bool | is_open () const |
| Return true if the stream is open for reading. | |
| virtual bool | is_valid () const |
| Return true if the stream is in a valid state. | |
| virtual bool | is_seekable () const |
| Return true if the stream support seeking. | |
| virtual unsigned int | frame_number () const |
| Return the current frame number. | |
| virtual bool | advance () |
| Advance to the next frame (but do not open the next image). | |
| virtual vidl2_frame_sptr | read_frame () |
| Read the next frame from the stream. | |
| virtual vidl2_frame_sptr | current_frame () |
| Return the current frame in the stream. | |
| virtual bool | seek_frame (unsigned int frame_number) |
| Seek to the given frame number (but do not load the image). | |
| void | ref () |
| Increment reference count. | |
| void | unref () |
| Decrement reference count. | |
| int | ref_count () const |
| Number of objects referring to this data. | |
Private Attributes | |
| vcl_vector< vcl_string > | image_paths_ |
| The vector of images. | |
| unsigned int | index_ |
| The current index. | |
| vidl2_frame_sptr | current_frame_ |
| The current frame (cached). | |
|
|
Constructor - default.
Definition at line 30 of file vidl2_image_list_istream.cxx. |
|
|
Constructor - from a file glob string.
Definition at line 36 of file vidl2_image_list_istream.cxx. |
|
|
Constructor - from a vector of file paths.
|
|
|
Destructor.
Definition at line 41 of file vidl2_image_list_istream.h. |
|
|
Advance to the next frame (but do not open the next image).
Implements vidl2_istream. Definition at line 99 of file vidl2_image_list_istream.cxx. |
|
|
Close the stream.
Implements vidl2_istream. Definition at line 88 of file vidl2_image_list_istream.cxx. |
|
|
Return the current frame in the stream.
Implements vidl2_istream. Definition at line 120 of file vidl2_image_list_istream.cxx. |
|
|
Return the current frame number.
Implements vidl2_istream. Definition at line 67 of file vidl2_image_list_istream.h. |
|
|
Return true if the stream is open for reading.
Implements vidl2_istream. Definition at line 57 of file vidl2_image_list_istream.h. |
|
|
Return true if the stream support seeking.
Implements vidl2_istream. Definition at line 64 of file vidl2_image_list_istream.h. |
|
|
Return true if the stream is in a valid state.
Implements vidl2_istream. Definition at line 60 of file vidl2_image_list_istream.h. |
|
|
Open a new stream using a vector of file paths.
Definition at line 70 of file vidl2_image_list_istream.cxx. |
|
|
Open a new stream using a file glob (see vul_file_iterator).
Definition at line 44 of file vidl2_image_list_istream.cxx. |
|
|
Read the next frame from the stream.
Implements vidl2_istream. Definition at line 111 of file vidl2_image_list_istream.cxx. |
|
|
Increment reference count.
Definition at line 63 of file vidl2_istream.h. |
|
|
Number of objects referring to this data.
Definition at line 69 of file vidl2_istream.h. |
|
|
Seek to the given frame number (but do not load the image).
Implements vidl2_istream. Definition at line 137 of file vidl2_image_list_istream.cxx. |
|
|
Decrement reference count.
Definition at line 66 of file vidl2_istream.h. |
|
|
The current frame (cached).
Definition at line 91 of file vidl2_image_list_istream.h. |
|
|
The vector of images.
Definition at line 85 of file vidl2_image_list_istream.h. |
|
|
The current index.
Definition at line 88 of file vidl2_image_list_istream.h. |
1.4.4