Inviwo
0.9.10.1
Inviwo documentation
|
Functions | |
IVW_CORE_API vec4 | hex2rgba (std::string str) |
convert from hexadecimal html color code to RGBA More... | |
IVW_CORE_API std::string | rgba2hex (const vec4 &rgba) |
convert from rgba to 8-digit hexadecimal html color code More... | |
IVW_CORE_API std::string | rgb2hex (const vec3 &rgb) |
convert from rgb to 6-digit hexadecimal html color code More... | |
IVW_CORE_API vec3 | getD65WhitePoint () |
reference white point D65 in CIE XYZ color space More... | |
IVW_CORE_API vec3 | hsv2rgb (vec3 hsv) |
Convert from HSV to RGB color. More... | |
IVW_CORE_API vec3 | rgb2hsv (vec3 rgb) |
Convert from RGB to HSV color. More... | |
IVW_CORE_API vec3 | XYZ2lab (vec3 xyz, vec3 whitePoint=getD65WhitePoint()) |
Convert from XYZ to Lab color space See http://en.wikipedia.org/wiki/CIE_1931_color_space and http://www.brucelindbloom.com/. More... | |
IVW_CORE_API vec3 | lab2XYZ (vec3 lab, const vec3 whitePoint=getD65WhitePoint()) |
Convert from Lab to CIE XYZ color space See http://en.wikipedia.org/wiki/Lab_color_space and http://www.brucelindbloom.com/. More... | |
IVW_CORE_API vec3 | rgb2XYZ (const vec3 rgb) |
Convert from sRGB color to XYZ using D65 white point See http://en.wikipedia.org/wiki/CIE_1931_color_space, http://www.brucelindbloom.com/ and http://en.wikipedia.org/wiki/RGB_color_model. More... | |
IVW_CORE_API vec3 | XYZ2rgb (vec3 xyz) |
Convert from CIE XYZ color to sRGB using D65 white point. More... | |
IVW_CORE_API vec3 | XYZ2xyY (vec3 xyz) |
Convert from CIE XYZ color space to normalized xyY, which is for example used in the chromaticity diagram. More... | |
IVW_CORE_API vec3 | xyY2XYZ (vec3 xyY) |
Convert from xyY color space to XYZ. More... | |
IVW_CORE_API vec3 | rgb2lab (vec3 rgb) |
Convert from sRGB color to Lab using D65 white point. More... | |
IVW_CORE_API vec3 | lab2rgb (vec3 lab) |
Convert from Lab color to sRGB using D65 white point. More... | |
IVW_CORE_API vec3 | rgb2ycbcr (const vec3 &rgb) |
Convert from sRGB color to YCbCr. More... | |
IVW_CORE_API vec3 | ycbcr2rgb (const vec3 &ycbcr) |
Convert from YCbCr color to sRGB. More... | |
IVW_CORE_API vec3 | LuvChromaticity2rgb (const vec3 &LuvChroma, bool clamp=false, vec3 whitePointXYZ=getD65WhitePoint()) |
Convert from normalized chromaticity of CIE Luv, i.e. u' and v', to sRGB. More... | |
IVW_CORE_API vec3 | rgb2LuvChromaticity (const vec3 &rgb, vec3 whitePointXYZ=getD65WhitePoint()) |
Convert from sRGB to normalized chromaticity of CIE Luv, i.e. u' and v'. More... | |
IVW_CORE_API vec3 | LuvChromaticity2XYZ (const vec3 &LuvChroma, vec3 whitePointXYZ=getD65WhitePoint()) |
Convert from normalized chromaticity of CIE Luv, i.e. u' and v', to XYZ. More... | |
IVW_CORE_API vec3 | XYZ2LuvChromaticity (const vec3 &XYZ, vec3 whitePointXYZ=getD65WhitePoint()) |
Convert from CIE XYZ color space to normalized chromaticity of CIE Luv, i.e. u' and v'. More... | |
IVW_CORE_API vec3 | XYZ2Luv (const vec3 &XYZ, vec3 whitePointXYZ=getD65WhitePoint()) |
Convert from CIE XYZ to CIE Luv. More... | |
IVW_CORE_API vec3 | Luv2XYZ (const vec3 &Luv, vec3 whitePointXYZ=getD65WhitePoint()) |
Convert from CIE Luv to CIE XYZ. More... | |
color
vec3 inviwo::color::getD65WhitePoint | ( | ) |
reference white point D65 in CIE XYZ color space
The values are obtained by converting sRGB(1, 1, 1) to XYZ using rgb2XYZ() since sRGB assumes D65 as reference white. See rgb2XYZ, http://www.brucelindbloom.com
vec4 inviwo::color::hex2rgba | ( | std::string | str | ) |
convert from hexadecimal html color code to RGBA
A hexadecimal html color code is converted to RGBA. Supports both 3 and 6 digit hexcodes with a leading '#' and optional alpha value (single / double digit). In case of 3 respective 6 digits, alpha is implicitly set to 1.0.
Supports "#RGB", "#RGBA", "#RRGGBB", "#RRGGBBAA"
str | html color code in the form of "#10a0b0ff" or "#a0b0c0" |
Exception | if string is malformed |
vec3 inviwo::color::hsv2rgb | ( | vec3 | hsv | ) |
Convert from HSV to RGB color.
See http://en.wikipedia.org/wiki/HSL_and_HSV and http://en.wikipedia.org/wiki/RGB_color_model for a detailed explanation of the color spaces.
hsv | Color in the [0 1]^3 range |
vec3 inviwo::color::lab2rgb | ( | vec3 | lab | ) |
Convert from Lab color to sRGB using D65 white point.
See http://en.wikipedia.org/wiki/Lab_color_space http://www.brucelindbloom.com/ and http://en.wikipedia.org/wiki/RGB_color_model
lab | color in Lab color space |
vec3 inviwo::color::lab2XYZ | ( | vec3 | lab, |
const vec3 | whitePoint = getD65WhitePoint() |
||
) |
Convert from Lab to CIE XYZ color space See http://en.wikipedia.org/wiki/Lab_color_space and http://www.brucelindbloom.com/.
lab | Color |
whitePoint | Normalized white point. Default white point is D65. |
vec3 inviwo::color::Luv2XYZ | ( | const vec3 & | Luv, |
vec3 | whitePointXYZ = getD65WhitePoint() |
||
) |
Convert from CIE Luv to CIE XYZ.
The CIE Luv color value is converted to CIE XYZ color space using the reference white point.
See http://en.wikipedia.org/wiki/CIELUV, http://en.wikipedia.org/wiki/CIE_1931_color_space, and http://www.brucelindbloom.com/
Luv | CIE Luv color, L in [0, 100], u and v in [-100, +100] but values might exceed this range |
whitePointXYZ | Normalized white point. Default white point is D65. |
vec3 inviwo::color::LuvChromaticity2rgb | ( | const vec3 & | LuvChroma, |
bool | clamp = false , |
||
vec3 | whitePointXYZ = getD65WhitePoint() |
||
) |
Convert from normalized chromaticity of CIE Luv, i.e. u' and v', to sRGB.
The chromaticity of CIE Luv (luminance, u', v') is converted to sRGB via the CIE XYZ color space.
See http://en.wikipedia.org/wiki/CIELUV, http://www.brucelindbloom.com/
LuvChroma | chromaticity, L in [0, 100], u' in [0.0, 1.0], v' in [0.0, 1.0] |
clamp | clamp resulting rgb values to [0,1]^3 |
whitePointXYZ | Normalized white point. Default white point is D65. |
vec3 inviwo::color::LuvChromaticity2XYZ | ( | const vec3 & | LuvChroma, |
vec3 | whitePointXYZ = getD65WhitePoint() |
||
) |
Convert from normalized chromaticity of CIE Luv, i.e. u' and v', to XYZ.
See http://en.wikipedia.org/wiki/CIELUV, http://www.brucelindbloom.com/
LuvChroma | chromaticity, L in [0, 100], u' in [0.0, 1.0], v' in [0.0, 1.0] |
whitePointXYZ | Normalized white point. Default white point is D65. |
std::string inviwo::color::rgb2hex | ( | const vec3 & | rgb | ) |
convert from rgb to 6-digit hexadecimal html color code
RGB is converted to a 6 digit hexadecimal html color code with leading '#'
rgb | RGB color in [0 1]^3 range |
vec3 inviwo::color::rgb2hsv | ( | vec3 | rgb | ) |
Convert from RGB to HSV color.
See http://en.wikipedia.org/wiki/HSL_and_HSV and http://en.wikipedia.org/wiki/RGB_color_model for a detailed explanation of the color spaces.
rgb | Color in the [0 1]^3 range |
vec3 inviwo::color::rgb2lab | ( | vec3 | rgb | ) |
Convert from sRGB color to Lab using D65 white point.
See http://en.wikipedia.org/wiki/Lab_color_space http://www.brucelindbloom.com/ and http://en.wikipedia.org/wiki/RGB_color_model
rgb | rgb color in the [0 1]^3 range |
vec3 inviwo::color::rgb2LuvChromaticity | ( | const vec3 & | rgb, |
vec3 | whitePointXYZ = getD65WhitePoint() |
||
) |
Convert from sRGB to normalized chromaticity of CIE Luv, i.e. u' and v'.
The sRGB color is converted to chromaticity of CIE Luv (luminance, u', v') via the CIE XYZ color space.
See http://en.wikipedia.org/wiki/CIELUV, http://www.brucelindbloom.com/
rgb | rgb color, [0, 1]^3 |
whitePointXYZ | Normalized white point. Default white point is D65. |
vec3 inviwo::color::rgb2XYZ | ( | const vec3 | rgb | ) |
Convert from sRGB color to XYZ using D65 white point See http://en.wikipedia.org/wiki/CIE_1931_color_space, http://www.brucelindbloom.com/ and http://en.wikipedia.org/wiki/RGB_color_model.
rgb | rgb color in the [0 1]^3 range |
vec3 inviwo::color::rgb2ycbcr | ( | const vec3 & | rgb | ) |
Convert from sRGB color to YCbCr.
The sRGB color is converted to to YCbCr (luminance, blue-yellow chroma, red-green chroma). The YCbCr color uses the full range and does not have a footroom/headroom (0-16 and 236-255).
See http://en.wikipedia.org/wiki/YCbCr
rgb | rgb color, [0, 1]^3 |
std::string inviwo::color::rgba2hex | ( | const vec4 & | rgba | ) |
convert from rgba to 8-digit hexadecimal html color code
RGBA is converted to a 8 digit hexadecimal html color code with leading '#'
rgba | RGBA color in [0 1]^3 range |
vec3 inviwo::color::xyY2XYZ | ( | vec3 | xyY | ) |
Convert from xyY color space to XYZ.
See http://en.wikipedia.org/wiki/CIE_1931_color_space and http://www.brucelindbloom.com/
xyY | xyY color |
vec3 inviwo::color::XYZ2lab | ( | vec3 | xyz, |
vec3 | whitePoint = getD65WhitePoint() |
||
) |
Convert from XYZ to Lab color space See http://en.wikipedia.org/wiki/CIE_1931_color_space and http://www.brucelindbloom.com/.
xyz | color in the CIE XYZ color space (roughly in the [0 1]^3 range) |
whitePoint | Normalized white point. Default white point is D65. |
vec3 inviwo::color::XYZ2Luv | ( | const vec3 & | XYZ, |
vec3 | whitePointXYZ = getD65WhitePoint() |
||
) |
Convert from CIE XYZ to CIE Luv.
The CIE Luv color value is converted to CIE XYZ color space using the reference white point.
See http://en.wikipedia.org/wiki/CIELUV, http://en.wikipedia.org/wiki/CIE_1931_color_space, and http://www.brucelindbloom.com/
XYZ | CIE XYZ color (roughly in the [0 1]^3 range) |
whitePointXYZ | Normalized white point. Default white point is D65. |
vec3 inviwo::color::XYZ2LuvChromaticity | ( | const vec3 & | XYZ, |
vec3 | whitePointXYZ = getD65WhitePoint() |
||
) |
Convert from CIE XYZ color space to normalized chromaticity of CIE Luv, i.e. u' and v'.
See http://en.wikipedia.org/wiki/CIELUV, http://www.brucelindbloom.com/
XYZ | CIE XYZ color (roughly in the [0 1]^3 range) |
whitePointXYZ | Normalized white point. Default white point is D65. |
vec3 inviwo::color::XYZ2rgb | ( | vec3 | xyz | ) |
Convert from CIE XYZ color to sRGB using D65 white point.
See http://en.wikipedia.org/wiki/CIE_1931_color_space, http://www.brucelindbloom.com/ and http://en.wikipedia.org/wiki/RGB_color_model
xyz | CIE XYZ color (roughly in the [0 1]^3 range) |
vec3 inviwo::color::XYZ2xyY | ( | vec3 | xyz | ) |
Convert from CIE XYZ color space to normalized xyY, which is for example used in the chromaticity diagram.
See http://en.wikipedia.org/wiki/CIE_1931_color_space and http://www.brucelindbloom.com/
xyz | CIE XYZ color (roughly in the [0 1]^3 range) |
vec3 inviwo::color::ycbcr2rgb | ( | const vec3 & | ycbcr | ) |
Convert from YCbCr color to sRGB.
The YCbCr color (luminance, blue-yellow chroma, red-green chroma) is converted to sRGB without considering footroom and headroom.
See http://en.wikipedia.org/wiki/YCbCr
ycbcr | YCbCr color, Y in [0, 1], Cb in [-0.5, 0.5], Cr in [-0.5, 0.5] |