Fawkes API  Fawkes Development Version
fvraw.h
1 
2 /***************************************************************************
3  * fvraw_reader.h - reader for raw FireVision images
4  *
5  * Generated: Sun Jun 05 01:21:16 2006
6  * Copyright 2005-2006 Tim Niemueller [www.niemueller.de]
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_UTILS_READERS_FVRAW_READER_H_
25 #define __FIREVISION_UTILS_READERS_FVRAW_READER_H_
26 
27 #include <fvutils/readers/reader.h>
28 #include <fvutils/writers/fvraw.h>
29 
30 #include <cstdio>
31 
32 namespace firevision {
33 #if 0 /* just to make Emacs auto-indent happy */
34 }
35 #endif
36 
37 class FvRawReader : public Reader {
38 
39  public:
40  FvRawReader(const char *filename);
41  virtual ~FvRawReader();
42 
43  virtual void set_buffer(unsigned char *yuv422planar_buffer);
44  virtual colorspace_t colorspace();
45  virtual unsigned int pixel_width();
46  virtual unsigned int pixel_height();
47  virtual void read();
48 
49  static bool is_FvRaw(const char *filename);
50 
51  private:
52  bool opened;
53  unsigned char *buffer;
54  FILE *infile;
55 
56  unsigned int buffer_size;
57 
59 };
60 
61 } // end namespace firevision
62 
63 #endif
FvRawReader(const char *filename)
Constructor.
Definition: fvraw.cpp:47
FvRaw image file header.
Definition: fvraw.h:53
virtual void set_buffer(unsigned char *yuv422planar_buffer)
Set buffer that the read image should be written to.
Definition: fvraw.cpp:81
virtual void read()
Read data from file.
Definition: fvraw.cpp:121
Image reader interface.
Definition: reader.h:34
virtual ~FvRawReader()
Destructor.
Definition: fvraw.cpp:73
static bool is_FvRaw(const char *filename)
Check if given file contains FvRaw image.
Definition: fvraw.cpp:141
virtual unsigned int pixel_width()
Get width of read image in pixels.
Definition: fvraw.cpp:99
virtual colorspace_t colorspace()
Get colorspace from the just read image.
Definition: fvraw.cpp:88
virtual unsigned int pixel_height()
Get height of read image in pixels.
Definition: fvraw.cpp:110
FvRaw image reader implementation.
Definition: fvraw.h:37