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