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 
34 class FvRawReader : public Reader
35 {
36 public:
37  FvRawReader(const char *filename);
38  virtual ~FvRawReader();
39 
40  virtual void set_buffer(unsigned char *yuv422planar_buffer);
41  virtual colorspace_t colorspace();
42  virtual unsigned int pixel_width();
43  virtual unsigned int pixel_height();
44  virtual void read();
45 
46  static bool is_FvRaw(const char *filename);
47 
48 private:
49  bool opened;
50  unsigned char *buffer;
51  FILE * infile;
52 
53  unsigned int buffer_size;
54 
56 };
57 
58 } // end namespace firevision
59 
60 #endif
firevision::FvRawReader::FvRawReader
FvRawReader(const char *filename)
Constructor.
Definition: fvraw.cpp:44
firevision::FvRawReader
FvRaw image reader implementation.
Definition: fvraw.h:35
firevision::FvRawWriter::FvRawHeader
FvRaw image file header.
Definition: fvraw.h:52
firevision::FvRawReader::is_FvRaw
static bool is_FvRaw(const char *filename)
Check if given file contains FvRaw image.
Definition: fvraw.cpp:130
firevision::FvRawReader::set_buffer
virtual void set_buffer(unsigned char *yuv422planar_buffer)
Set buffer that the read image should be written to.
Definition: fvraw.cpp:75
firevision::FvRawReader::pixel_width
virtual unsigned int pixel_width()
Get width of read image in pixels.
Definition: fvraw.cpp:91
firevision::Reader
Image reader interface.
Definition: reader.h:32
firevision::FvRawReader::colorspace
virtual colorspace_t colorspace()
Get colorspace from the just read image.
Definition: fvraw.cpp:81
firevision::FvRawReader::read
virtual void read()
Read data from file.
Definition: fvraw.cpp:111
firevision::FvRawReader::pixel_height
virtual unsigned int pixel_height()
Get height of read image in pixels.
Definition: fvraw.cpp:101
firevision::FvRawReader::~FvRawReader
virtual ~FvRawReader()
Destructor.
Definition: fvraw.cpp:68