eLynx SDK
v3.0.1 C++ image processing API reference |
00001 //============================================================================ 00002 // ImageFileInfo.h Image.Component package 00003 //============================================================================ 00004 // Usage : 00005 //---------------------------------------------------------------------------- 00006 // Inheritance : 00007 //---------------------------------------------------------------------------- 00008 // Copyright (C) 2006 by eLynx project 00009 // 00010 // This library is free software; you can redistribute it and/or 00011 // modify it under the terms of the GNU Library General Public 00012 // License as published by the Free Software Foundation; either 00013 // version 2 of the License, or (at your option) any later version. 00014 // 00015 // This library is distributed in the hope that it will be useful, 00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00018 // See the GNU Library General Public License for more details. 00019 //---------------------------------------------------------------------------- 00020 #ifndef __ImageFileInfo_h__ 00021 #define __ImageFileInfo_h__ 00022 00023 #include "ImageVariant.h" 00024 00025 namespace eLynx { 00026 namespace Image { 00027 00028 enum 00029 { 00030 II_Maker = 1<<0, 00031 II_Model = 1<<1, 00032 II_ISO = 1<<2, 00033 II_WhiteBalance = 1<<3, 00034 II_Shutter = 1<<4, 00035 II_Aperture = 1<<5, 00036 II_FocalLength = 1<<6, 00037 II_TimeStamp = 1<<7, 00038 II_Dimension = 1<<8, 00039 II_Bayer = 1<<9, 00040 II_Resolution = 1<<10, 00041 II_PixelType = 1<<11, 00042 II_Preview = 1<<12, 00043 II_Content = 1<<13 00044 }; 00045 00046 enum EImageContent 00047 { 00048 IC_Unknown = 0, 00049 IC_Photo, 00050 IC_Bias, IC_Dark, IC_FlatField, IC_Light, 00051 IC_Luminance, IC_Red, IC_Green, IC_Blue, 00052 IC_Halpha, IC_Hbeta, IC_OIII, IC_SII 00053 }; 00054 00055 class ExportedByImage ImageFileInfo 00056 { 00057 public: 00058 ImageFileInfo(); 00059 ImageFileInfo(const ImageFileInfo&); 00060 const ImageFileInfo& operator = (const ImageFileInfo&); 00061 00062 void SetMaker(const char * iprMaker); 00063 const char * GetMaker() const; 00064 00065 void SetModel(const char * iprModel); 00066 const char * GetModel() const; 00067 00068 void SetISO(uint32 iISO); 00069 bool GetISO(uint32& oISO) const; 00070 00071 void SetWhiteBalance(float iRed, float iGreen, float iBlue); 00072 bool GetWhiteBalance(float& oRed, float& oGreen, float& oBlue) const; 00073 00074 void SetShutter(float iShutter); 00075 bool GetShutter(float& oShutter) const; 00076 00077 void SetAperture(float iAperture); 00078 bool GetAperture(float& oAperture) const; 00079 00080 void SetFocalLength(float iFocalLength); 00081 bool GetFocalLength(float& oFocalLength) const; 00082 00083 void SetTimeStamp(time_t iTimeStamp); 00084 bool GetTimeStamp(time_t& oTimeStamp) const; 00085 00086 void SetDimension(uint32 iWidth, uint32 iHeight); 00087 bool GetDimension(uint32& oWidth, uint32& oHeight) const; 00088 00089 void SetBayer(EBayerMatrix iBayer); 00090 bool GetBayer(EBayerMatrix& oBayer) const; 00091 00092 void SetResolution(EResolution iResolution); 00093 bool GetResolution(EResolution& oResolution) const; 00094 00095 void SetPixelType(EPixelType iPixelType); 00096 bool GetPixelType(EPixelType& oPixelType) const; 00097 00098 void SetPreview(const ImageVariant& iPreview); 00099 bool GetPreview(ImageVariant& oPreview) const; 00100 bool UnloadPreview(); 00101 00102 void SetContent(EImageContent iContent); 00103 bool GetContent(EImageContent& oContent) const; 00104 00105 void Trace(); 00106 00107 protected: 00108 uint32 _Flags; // what field are availables 00109 00110 char _Maker[64]; // camera manufacturer 00111 char _Model[72]; // camera model 00112 uint32 _ISO; // ISO speed 00113 float _wbRed, _wbGreen, _wbBlue; // white balance to apply 00114 float _Shutter; // exposure time 00115 float _Aperture; 00116 float _FocalLength; 00117 time_t _TimeStamp; // date 00118 uint32 _Width, _Height; // image dimension 00119 EBayerMatrix _Bayer; 00120 EResolution _Resolution; // RT_INT8, RT_UINT8, RT_INT16, RT_UINT16, RT_INT32, RT_UINT32, RT_INT64, RT_UINT64, RT_Float, RT_Double 00121 EPixelType _PixelType; // PT_L, PT_LA, PT_Complex, PT_RGB, PT_RGBA, PT_HLS, PT_XYZ, PT_Luv, PT_Lab, PT_Lch, PT_HLab 00122 EImageContent _Content; 00123 ImageVariant _Preview; 00124 }; 00125 00126 } // namespace Image 00127 } // namespace eLynx 00128 00129 #endif // __ImageFileInfo_h__