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

include/FCam/processing/DNG.h

Go to the documentation of this file.
00001 #ifndef FCAM_DNG_H
00002 #define FCAM_DNG_H
00003 
00004 #include "../Frame.h"
00005 #include <string>
00006 
00013 namespace FCam {
00014 
00016     class TiffFile;
00017     class TiffIfd;
00018 
00023     class _DNGFrame : public _Frame, public FCam::Platform {
00024     public:
00025         _DNGFrame();
00026         ~_DNGFrame();
00027 
00030         const Platform &platform() const {return *this;}
00031 
00032         Shot _shot;
00033 
00034         TiffFile *dngFile;
00035 
00036         Image thumbnail;
00037 
00038         // LoadDNG should set all these
00039         struct {
00040             BayerPattern bayerPattern;
00041             unsigned short minRawValue, maxRawValue;
00042             int numIlluminants;
00043             float colorMatrix1[12], colorMatrix2[12];
00044             int illuminant1, illuminant2;
00045             std::string manufacturer, model;
00046         } dng;
00047 
00048         const Shot &shot() const { return _shot; }
00049         const Shot &baseShot() const { return shot(); }
00050 
00051         BayerPattern bayerPattern() const {return dng.bayerPattern;}
00052         unsigned short minRawValue() const {return dng.minRawValue;}
00053         unsigned short maxRawValue() const {return dng.maxRawValue;}
00054         void rawToRGBColorMatrix(int kelvin, float *matrix) const;
00055 
00056         const std::string &manufacturer() const {return dng.manufacturer;}
00057         const std::string &model() const {return dng.model;}
00058 
00063         virtual void debug(const char *name="") const;
00064     };
00065 
00072     class DNGFrame: public FCam::Frame {
00073     protected:
00074         _DNGFrame *get() const { 
00075             return static_cast<_DNGFrame*>(ptr.get()); 
00076         }
00077 
00078     public:
00079 
00084         DNGFrame(_DNGFrame *f=NULL);
00085   
00086         Image thumbnail();
00087     };
00088 
00093     void saveDNG(Frame frame, const std::string &filename);
00096     DNGFrame loadDNG(const std::string &filename);
00097 }
00098 
00099 #endif

Generated on Fri Sep 24 2010 15:53:00 for FCam by  doxygen 1.7.1