Go to the documentation of this file.00001
00002 #ifndef vidl_image_list_ostream_h_
00003 #define vidl_image_list_ostream_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007
00008
00009
00010
00011
00012
00013
00014 #include "vidl_ostream.h"
00015 #include <vcl_string.h>
00016
00017
00018 class vidl_image_list_ostream
00019 : public vidl_ostream
00020 {
00021 public:
00022
00023 vidl_image_list_ostream();
00024
00025
00026 vidl_image_list_ostream(const vcl_string& directory,
00027 const vcl_string& name_format = "%05d",
00028 const vcl_string& file_format = "tiff",
00029 const unsigned int init_index = 0);
00030
00031
00032 virtual ~vidl_image_list_ostream() { close(); }
00033
00034
00035 virtual bool open(const vcl_string& directory,
00036 const vcl_string& name_format = "%05d",
00037 const vcl_string& file_format = "tiff",
00038 const unsigned int init_index = 0);
00039
00040
00041 virtual void close();
00042
00043
00044 virtual bool is_open() const;
00045
00046
00047 unsigned int index() const { return index_; }
00048
00049
00050 virtual vcl_string next_file_name() const;
00051
00052
00053
00054 virtual bool write_frame(const vidl_frame_sptr& frame);
00055
00056 private:
00057
00058 unsigned int index_;
00059
00060
00061 vcl_string dir_;
00062
00063
00064 vcl_string name_format_;
00065
00066
00067 vcl_string file_format_;
00068 };
00069
00070 #endif // vidl_image_list_ostream_h_