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
32namespace firevision {
33
34class FvRawReader : public Reader
35{
36public:
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
48private:
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
FvRaw image reader implementation.
Definition: fvraw.h:35
virtual void read()
Read data from file.
Definition: fvraw.cpp:111
static bool is_FvRaw(const char *filename)
Check if given file contains FvRaw image.
Definition: fvraw.cpp:130
FvRawReader(const char *filename)
Constructor.
Definition: fvraw.cpp:44
virtual ~FvRawReader()
Destructor.
Definition: fvraw.cpp:68
virtual unsigned int pixel_width()
Get width of read image in pixels.
Definition: fvraw.cpp:91
virtual colorspace_t colorspace()
Get colorspace from the just read image.
Definition: fvraw.cpp:81
virtual void set_buffer(unsigned char *yuv422planar_buffer)
Set buffer that the read image should be written to.
Definition: fvraw.cpp:75
virtual unsigned int pixel_height()
Get height of read image in pixels.
Definition: fvraw.cpp:101
Image reader interface.
Definition: reader.h:32
FvRaw image file header.
Definition: fvraw.h:52