• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

include/FCam/Dummy/Frame.h

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, public FCam::Platform {
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         // A dummy frame acts as its own platform, so you can vary
00025         // these things on a per-frame basis while testing
00026         const FCam::Platform &platform() const {return *this;}
00027 
00028         const FCam::Dummy::Shot &shot() const { return _shot; }
00029         const FCam::Shot &baseShot() const { return shot(); }
00030 
00031         // Derived frames should implement these to return static
00032         // platform data necessary for interpreting this frame.
00033         BayerPattern bayerPattern() const { return _bayerPattern; }
00034         unsigned short minRawValue() const { return _minRawValue; }
00035         unsigned short maxRawValue() const { return _maxRawValue; }
00036         void rawToRGBColorMatrix(int kelvin, float *matrix) const;
00037 
00038         const std::string &manufacturer() const { return _manufacturer; }
00039         const std::string &model() const { return _model; }
00040 
00041         _Frame();
00042     };
00043 
00044     class Frame: public FCam::Frame {
00045     protected:
00046         const _Frame *get() const { return static_cast<_Frame*>(ptr.get()); }
00047 
00048     public:
00049 
00050         Frame(_Frame *f=NULL): FCam::Frame(f) {}
00051 
00052         TestPattern testPattern() const { return get()->testPattern; }
00053         const std::string &srcFile() const { return get()->srcFile; }
00054     
00055         const FCam::Dummy::Shot &shot() const {
00056             return get()->shot();
00057         }
00058     };
00059 }}
00060 
00061 #endif

Generated on Mon Aug 16 2010 14:25:45 for FCam by  doxygen 1.7.1