Fawkes API  Fawkes Development Version
seq_writer.h
1 
2 /***************************************************************************
3  * seq_writer.h - Writes sequences of images
4  *
5  * Generated: Tue Jul 03 08:14:56 2007
6  * Copyright 2007 Daniel Beck
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version. A runtime exception applies to
14  * this software (see LICENSE.GPL_WRE file mentioned below for details).
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Library General Public License for more details.
20  *
21  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22  */
23 
24 #ifndef __FIREVISION_FVUTILS_WRITERS_SEQ_WRITER_H_
25 #define __FIREVISION_FVUTILS_WRITERS_SEQ_WRITER_H_
26 
27 #include <fvutils/color/colorspaces.h>
28 #include <fvutils/writers/writer.h>
29 #include <core/exception.h>
30 
31 namespace firevision {
32 #if 0 /* just to make Emacs auto-indent happy */
33 }
34 #endif
35 
36 class SeqWriter {
37 
38  public:
39  SeqWriter(Writer* writer);
40  ~SeqWriter();
41 
42  void set_path(const char* img_path);
43  void set_filename(const char* filename);
44 
45  void set_dimensions(unsigned int width, unsigned int height);
46  void set_colorspace(colorspace_t cspace);
47 
48  void write(unsigned char* buffer);
49 
50  private:
51  Writer* writer;
52  char* filename;
53  char* img_path;
54  colorspace_t cspace;
55  unsigned int frame_number;
56 
57 };
58 
59 } // end namespace firevision
60 
61 #endif /* __FIREVISION_FVUTILS_WRITERS_SEQ_WRITER_H_ */
SeqWriter(Writer *writer)
Constructor.
Definition: seq_writer.cpp:50
void set_filename(const char *filename)
Set a (base-) filename.
Definition: seq_writer.cpp:89
Interface to write images.
Definition: writer.h:34
void set_colorspace(colorspace_t cspace)
Set the colorspace of the image.
Definition: seq_writer.cpp:107
Writes a sequence of images to disk.
Definition: seq_writer.h:36
~SeqWriter()
Destructor.
Definition: seq_writer.cpp:65
void set_dimensions(unsigned int width, unsigned int height)
Set the image dimensions.
Definition: seq_writer.cpp:99
void write(unsigned char *buffer)
Write a single image to disk.
Definition: seq_writer.cpp:116
void set_path(const char *img_path)
Set the path to where the images are stored.
Definition: seq_writer.cpp:77