TuttleOFX  1
TuttleOFX/libraries/tuttle/src/tuttle/plugin/color/colorDefinitions.hpp
Go to the documentation of this file.
00001 
00002 #ifndef _TUTTLE_COLOR_DEFINITIONS_HPP
00003 #define _TUTTLE_COLOR_DEFINITIONS_HPP
00004 
00005 #include <string>
00006 #include <cstring>
00007 #include <map>
00008 #include <vector>
00009 
00010 namespace tuttle {
00011 namespace plugin {
00012 namespace color {
00013 
00014 enum EParamReferenceSpace
00015 {
00016         eParamSRGBREC709 = 0,
00017         eParamREC709,
00018         eParamREC601,
00019         eParamDCI,
00020         eParamACES,
00021         eParamProPhoto,
00022         eParamAdobe98
00023 };
00024 
00025 enum EParamGradationLaw
00026 {
00027         eParamLinear = 0,
00028         eParamsRGB,
00029         eParamCineon,
00030         eParamGamma,
00031         eParamPanalog,
00032         eParamREDLog,
00033         eParamViperLog,
00034         eParamREDSpace,
00035         eParamAlexaLogC
00036 };
00037 const size_t numberOfGradationsModes = eParamAlexaLogC;
00038 
00039 enum EParamLayout
00040 {
00041         eParamLayoutRGB = 0,
00042         eParamLayoutYUV,
00043         eParamLayoutYPbPr,
00044         eParamLayoutHSV,
00045         eParamLayoutHSL,
00046         eParamLayoutLab,
00047         eParamLayoutLuv,
00048         eParamLayoutXYZ,
00049         eParamLayoutYxy
00050 };
00051 
00052 enum EColorTemperature
00053 {
00054         eColorTemperatureA = 0,
00055         eColorTemperatureB,
00056         eColorTemperatureC,
00057         eColorTemperatureD50,
00058         eColorTemperatureD55,
00059         eColorTemperatureD58,
00060         eColorTemperatureD65,
00061         eColorTemperatureD75,
00062         eColorTemperature9300,
00063         eColorTemperatureE,
00064         eColorTemperatureF2,
00065         eColorTemperatureF7,
00066         eColorTemperatureF11,
00067         eColorTemperatureDCIP3
00068 };
00069 
00070 typedef std::map  < size_t, std::string > ColorSpaceMap;
00071 typedef std::pair < size_t, std::string > ColorSpacePair;
00072 
00073 namespace GradationLaw
00074 {
00075         struct linear{};
00076         struct sRGB{};
00077         struct cineon{
00078                 double blackPoint;
00079                 double whitePoint;
00080                 double gammaSensito;
00081         };
00082         struct gamma{
00083                 double value;
00084         };
00085         struct panalog{};
00086         struct redLog{};
00087         struct viperLog{};
00088         struct redSpace{};
00089         struct alexaLogC{};
00090 }
00091 
00092 namespace Layout
00093 {
00094         struct RGB{};
00095         struct YUV{};
00096         struct YPbPr{};
00097         struct HSV{};
00098         struct HSL{};
00099         struct Lab{};
00100         struct Luv{};
00101         struct XYZ{};
00102         struct Yxy{};
00103 }
00104 
00105 namespace ColourTemp
00106 {
00107         struct A{};
00108         struct B{};
00109         struct C{};
00110         struct D50{};
00111         struct D55{};
00112         struct D58{};
00113         struct D65{};
00114         struct D75{};
00115         struct Temp9300{};
00116         struct F2{};
00117         struct F7{};
00118         struct F11{};
00119         struct DCIP3{};
00120 }
00121 
00122 namespace Primaries
00123 {
00124         struct TODO{};
00125 }
00126 
00127 namespace Premultiplication
00128 {
00129         struct On{};
00130         struct Off{};
00131 }
00132 
00133 class ColorSpaceMaps
00134 {
00135         ColorSpaceMap           map_ReferenceSpace;
00136         ColorSpaceMap           map_GradationLaw;
00137         ColorSpaceMap           map_Layout;
00138         ColorSpaceMap           map_ColourTemp;
00139 
00140         std::vector< std::vector< std::string > > colourSpaceGradationParameters;
00141 
00142 public:
00143         ColorSpaceMaps();
00144         ~ColorSpaceMaps(){}
00145 
00146         const ColorSpaceMap&    getMapReferenceSpaces()                                         { return map_ReferenceSpace; }
00147         const ColorSpaceMap&    getMapGradationLaw()                                            { return map_GradationLaw; }
00148         const ColorSpaceMap&    getMapLayout()                                                  { return map_Layout; }
00149         const ColorSpaceMap&    getMapColourTemp()                                              { return map_ColourTemp; }
00150 
00151         size_t                  sizeOfReferenceSpaces()                                         { return map_ReferenceSpace.size(); }
00152         size_t                  sizeOfGradationLaw()                                            { return map_GradationLaw.size(); }
00153         size_t                  sizeOfLayout()                                                  { return map_Layout.size(); }
00154         size_t                  sizeOfColourTemp()                                              { return map_ColourTemp.size(); }
00155 
00156         size_t                  sizeOfGradationParametersFor( EParamGradationLaw eGradLaw )     { return colourSpaceGradationParameters.at( eGradLaw ).size(); }
00157 };
00158 
00159 
00160 }
00161 }
00162 }
00163 #endif