eLynx SDK
v3.3.0 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_Bias = 1<<9, 00040 II_Bayer = 1<<10, 00041 II_resolution = 1<<11, 00042 II_PixelType = 1<<12, 00043 II_Preview = 1<<13, 00044 II_Content = 1<<14 00045 }; 00046 00047 enum EImageContent 00048 { 00049 IC_Unknown = 0, 00050 IC_Photo, 00051 IC_Bias, IC_Dark, IC_FlatField, IC_Light, 00052 IC_Luminance, IC_Red, IC_Green, IC_Blue, 00053 IC_Halpha, IC_Hbeta, IC_OIII, IC_SII 00054 }; 00055 00056 class ExportedByImage ImageFileInfo 00057 { 00058 public: 00059 ImageFileInfo(); 00060 ImageFileInfo(const ImageFileInfo&); 00061 const ImageFileInfo& operator = (const ImageFileInfo&); 00062 00063 void SetMaker(const char * iprMaker); 00064 const char * GetMaker() const; 00065 00066 void SetModel(const char * iprModel); 00067 const char * GetModel() const; 00068 00069 void SetISO(uint32 iISO); 00070 bool GetISO(uint32& oISO) const; 00071 00072 void SetBias(uint32 iBias); 00073 bool GetBias(uint32& oBias) const; 00074 00075 void SetWhiteBalance(float iRed, float iGreen, float iBlue); 00076 bool GetWhiteBalance(float& oRed, float& oGreen, float& oBlue) const; 00077 00078 void SetShutter(float iShutter); 00079 bool GetShutter(float& oShutter) const; 00080 00081 void SetAperture(float iAperture); 00082 bool GetAperture(float& oAperture) const; 00083 00084 void SetFocalLength(float iFocalLength); 00085 bool GetFocalLength(float& oFocalLength) const; 00086 00087 void SetTimeStamp(time_t iTimeStamp); 00088 bool GetTimeStamp(time_t& oTimeStamp) const; 00089 00090 void SetDimension(uint32 iWidth, uint32 iHeight); 00091 bool GetDimension(uint32& oWidth, uint32& oHeight) const; 00092 00093 void SetBayer(EBayerMatrix iBayer); 00094 bool GetBayer(EBayerMatrix& oBayer) const; 00095 00096 void SetResolution(EResolution iResolution); 00097 bool GetResolution(EResolution& oResolution) const; 00098 00099 void SetPixelType(EPixelType iPixelType); 00100 bool GetPixelType(EPixelType& oPixelType) const; 00101 00102 void SetPreview(const ImageVariant& iPreview); 00103 bool GetPreview(ImageVariant& oPreview) const; 00104 bool UnloadPreview(); 00105 00106 void SetContent(EImageContent iContent); 00107 bool GetContent(EImageContent& oContent) const; 00108 00109 void Trace(); 00110 00111 protected: 00112 uint32 _flags; // what field are availables 00113 00114 char _Maker[64]; // camera manufacturer 00115 char _Model[72]; // camera model 00116 float _wbRed; // white balance to apply 00117 float _wbGreen; 00118 float _wbBlue; 00119 float _shutter; // exposure time 00120 float _aperture; 00121 float _focalLength; 00122 time_t _timeStamp; // date 00123 uint32 _ISO; // ISO speed 00124 uint32 _width; 00125 uint32 _height; // image dimension 00126 uint32 _bias; 00127 EBayerMatrix _Bayer; 00128 EResolution _resolution; // RT_INT8, RT_UINT8, RT_INT16, RT_UINT16, RT_INT32, RT_UINT32, RT_INT64, RT_UINT64, RT_Float, RT_Double 00129 EPixelType _pixelType; // PT_L, PT_LA, PT_Complex, PT_RGB, PT_RGBA, PT_HLS, PT_XYZ, PT_Luv, PT_Lab, PT_Lch, PT_HLab 00130 EImageContent _content; 00131 ImageVariant _preview; 00132 }; 00133 00134 } // namespace Image 00135 } // namespace eLynx 00136 00137 #endif // __ImageFileInfo_h__