36 #ifndef vpImageStorageWorker_h 37 #define vpImageStorageWorker_h 39 #include <visp3/core/vpConfig.h> 41 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) 43 #include <visp3/io/vpImageQueue.h> 44 #include <visp3/io/vpImageIo.h> 62 : m_queue(queue), m_dataname(
""), m_cpt(1), m_ofs_data(), m_data_file_created(false)
76 char filename[FILENAME_MAX];
82 sprintf(filename, m_seqname.c_str(), m_cpt);
84 if (m_record_mode > 0) {
85 std::cout <<
"Save image: " << filename << std::endl;
87 else if (m_cpt == 1) {
88 std::cout <<
"Started sequence saving: " << m_seqname << std::endl;
93 if (! m_data_file_created) {
95 if (! parent.empty()) {
101 std::cout <<
"Create data file: " << m_dataname<< std::endl;
102 m_ofs_data.open(m_dataname);
104 m_data_file_created =
true;
112 std::cout <<
"Receive cancel during color image saving." << std::endl;
113 if (m_data_file_created) {
114 std::cout <<
"Close data file: " << m_dataname << std::endl;
118 std::cout <<
"Receive cancel during gray image saving." << std::endl;
119 if (m_data_file_created) {
120 std::cout <<
"Close data file: " << m_dataname << std::endl;
128 std::string m_seqname;
129 std::string m_dataname;
132 std::ofstream m_ofs_data;
133 bool m_data_file_created;
static void write(const vpImage< unsigned char > &I, const std::string &filename)
std::string getSeqName() const
vpImageStorageWorker(vpImageQueue< Type > &queue)
int getRecordingMode() const
Definition of the vpImage class member functions.