• Main Page
  • Classes
  • Files
  • File List

T:/Eigene Dateien/Visual Studio 2008/Projects/VisLuFramework/src/Colours.h

00001 #ifndef COLOURS_H
00002 #define COLOURS_H
00003 
00004 #include "BasicObjects.h"
00005 
00006 namespace Colours
00007 {
00008         //Umrechnung von RGB auf XYZ
00009         float toX(GLubyte R, GLubyte G, GLubyte B);
00010         float toY(GLubyte R, GLubyte G, GLubyte B);
00011         float toZ(GLubyte R, GLubyte G, GLubyte B);
00012         float toX(float R, float G, float B);
00013         float toY(float R, float G, float B);
00014         float toZ(float R, float G, float B);
00015         //Berechnung der L a und b Komponenten aus dem Lab-Farbraum
00016         float toL(float Y);
00017         float toA(float X, float Y);
00018         float toB(float Y, float Z);
00019 
00020         //Rückrechnung von Lab in RGB
00021         RGB_Colour toRGB(Lab_Colour colour);
00022         RGB_Colour toRGB(float L, float a, float b);
00023 
00024 
00025         //Lineare interpolation von Farben
00026         RGB_Colour              linearInterpolationRGB(float interPolBalance, RGB_Colour &start, RGB_Colour &end);
00027         RGBA_Colour             linearInterpolationRGBA(float interPolBalance, RGBA_Colour &start, RGBA_Colour &end);
00028         GLubyte                 linearInterpolationAlpha(float interPolBalance, GLubyte startAlpha, GLubyte endAlpha);
00029         Lab_Colour              linearInterpolationLab(float interPolBalance, Lab_Colour &start, Lab_Colour &end);
00030 
00031         void clampInterpolationValue(float& interPolBalance);
00032 
00033         //Normierten Bezugsgrößen für Lab Berechnung
00034         //Für CIELab (D65)
00035         const float Xn = 0.95047f;
00036         const float Yn = 1.00000f;
00037         const float Zn = 1.08883f;
00038         
00039         //Vergleichswert für die Kalkulation von Lab bei geringen P/Pn Werten (P/Pn < LAB_COMPARE_VALUE_CONST)
00040         const float LAB_COMPARE_VALUE_CONST = 0.00885645167903563081717167575546f;
00041 
00042         //Helferfunktionen für Lab Einzelkomponentenberechnung
00043          float normCalc( float div );
00044          float XNormCalc(float X);
00045          float YNormCalc(float Y);
00046          float ZNormCalc(float Z);
00047 }
00048 
00049 
00050 #endif

Generated on Tue Dec 14 2010 03:52:55 for VolVis by  doxygen 1.7.2