00001 #ifndef FCAM_DUMMY_FRAME_H
00002 #define FCAM_DUMMY_FRAME_H
00003
00004 #include "../Frame.h"
00005 #include "Shot.h"
00006
00007 namespace FCam {
00008 namespace Dummy {
00009
00010 struct _Frame: public FCam::_Frame, public FCam::Platform {
00011 TestPattern testPattern;
00012 std::string srcFile;
00013
00014 FCam::Dummy::Shot _shot;
00015
00016 BayerPattern _bayerPattern;
00017 unsigned short _minRawValue;
00018 unsigned short _maxRawValue;
00019 std::string _manufacturer;
00020 std::string _model;
00021
00022 float rawToRGB3200K[12];
00023 float rawToRGB7000K[12];
00024
00025
00026
00027 const FCam::Platform &platform() const {return *this;}
00028
00029 const FCam::Dummy::Shot &shot() const { return _shot; }
00030 const FCam::Shot &baseShot() const { return shot(); }
00031
00032
00033
00034 BayerPattern bayerPattern() const { return _bayerPattern; }
00035 unsigned short minRawValue() const { return _minRawValue; }
00036 unsigned short maxRawValue() const { return _maxRawValue; }
00037 void rawToRGBColorMatrix(int kelvin, float *matrix) const;
00038
00039 const std::string &manufacturer() const { return _manufacturer; }
00040 const std::string &model() const { return _model; }
00041
00042 _Frame();
00043 };
00044
00045 class Frame: public FCam::Frame {
00046 protected:
00047 const _Frame *get() const { return static_cast<_Frame *>(ptr.get()); }
00048
00049 public:
00050
00051 Frame(_Frame *f=NULL): FCam::Frame(f) {}
00052
00053 TestPattern testPattern() const { return get()->testPattern; }
00054 const std::string &srcFile() const { return get()->srcFile; }
00055
00056 const FCam::Dummy::Shot &shot() const {
00057 return get()->shot();
00058 }
00059 };
00060 }
00061 }
00062
00063 #endif