Inviwo 0.9.12-pre
Inviwo documentation
|
Functions | |
IVW_CORE_API vec4 | hex2rgba (std::string str) |
convert from hexadecimal html color code to RGBA | |
IVW_CORE_API std::string | rgba2hex (const vec4 &rgba) |
convert from rgba to 8-digit hexadecimal html color code | |
IVW_CORE_API std::string | rgb2hex (const vec3 &rgb) |
convert from rgb to 6-digit hexadecimal html color code | |
IVW_CORE_API vec3 | getD65WhitePoint () |
reference white point D65 in CIE XYZ color space | |
IVW_CORE_API vec3 | hsv2rgb (vec3 hsv) |
Convert from HSV to RGB color. | |
IVW_CORE_API vec3 | rgb2hsv (vec3 rgb) |
Convert from RGB to HSV color. | |
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/. | |
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/. | |
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. | |
IVW_CORE_API vec3 | XYZ2rgb (vec3 xyz) |
Convert from CIE XYZ color to sRGB using D65 white point. | |
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. | |
IVW_CORE_API vec3 | xyY2XYZ (vec3 xyY) |
Convert from xyY color space to XYZ. | |
IVW_CORE_API vec3 | rgb2lab (vec3 rgb) |
Convert from sRGB color to Lab using D65 white point. | |
IVW_CORE_API vec3 | lab2rgb (vec3 lab) |
Convert from Lab color to sRGB using D65 white point. | |
IVW_CORE_API vec3 | rgb2ycbcr (const vec3 &rgb) |
Convert from sRGB color to YCbCr. | |
IVW_CORE_API vec3 | ycbcr2rgb (const vec3 &ycbcr) |
Convert from YCbCr color to sRGB. | |
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. | |
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'. | |
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. | |
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'. | |
IVW_CORE_API vec3 | XYZ2Luv (const vec3 &XYZ, vec3 whitePointXYZ=getD65WhitePoint()) |
Convert from CIE XYZ to CIE Luv. | |
IVW_CORE_API vec3 | Luv2XYZ (const vec3 &Luv, vec3 whitePointXYZ=getD65WhitePoint()) |
Convert from CIE Luv to CIE XYZ. | |
IVW_CORE_API vec3 | lighter (const vec3 &rgb, float factor=1.5f) |
Return a lighter color by adjusting the brightness. | |
IVW_CORE_API vec4 | lighter (const vec4 &rgba, float factor=1.5f) |
IVW_CORE_API uvec3 | lighter (const uvec3 &rgb, float factor=1.5f) |
IVW_CORE_API vec3 | darker (const vec3 &rgb, float factor=2.0f) |
Return a darker color by adjusting the brightness. | |
IVW_CORE_API vec4 | darker (const vec4 &rgba, float factor=2.0f) |
IVW_CORE_API uvec3 | darker (const uvec3 &rgb, float factor=2.0f) |
color
IVW_CORE_API uvec3 inviwo::color::darker | ( | const uvec3 & | rgb, |
float | factor = 2.0f ) |
IVW_CORE_API vec3 inviwo::color::darker | ( | const vec3 & | rgb, |
float | factor = 2.0f ) |
Return a darker color by adjusting the brightness.
The brightness is modified by dividing rgb
input in HSV colorspace by factor
. A factor
1.0 will return a darker color, e.g. a factor of 2 yields a color with half the brightness. Instead of using a factor < 1.0, consider using darker(). Factors <= 0 result in unspecified results.
rgb | rgb color, [0, 1]^3 |
factor | scaling factor of the brightness |
IVW_CORE_API vec4 inviwo::color::darker | ( | const vec4 & | rgba, |
float | factor = 2.0f ) |
IVW_CORE_API 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
IVW_CORE_API 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 |
IVW_CORE_API 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 |
IVW_CORE_API 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 |
IVW_CORE_API 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. |
IVW_CORE_API uvec3 inviwo::color::lighter | ( | const uvec3 & | rgb, |
float | factor = 1.5f ) |
IVW_CORE_API vec3 inviwo::color::lighter | ( | const vec3 & | rgb, |
float | factor = 1.5f ) |
Return a lighter color by adjusting the brightness.
The brightness is modified by multiplying rgb
input in HSV colorspace with factor
. A factor
1.0 will return a lighter color, e.g. a 50% increase is achieved by a factor of 1.5. Instead of using a factor < 1.0, consider using darker(). Factors <= 0 result in unspecified results.
rgb | rgb color, [0, 1]^3 |
factor | scaling factor of the brightness |
IVW_CORE_API vec4 inviwo::color::lighter | ( | const vec4 & | rgba, |
float | factor = 1.5f ) |
IVW_CORE_API 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. |
IVW_CORE_API 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. |
IVW_CORE_API 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. |
IVW_CORE_API 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 |
IVW_CORE_API 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 |
IVW_CORE_API 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 |
IVW_CORE_API 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. |
IVW_CORE_API 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 |
IVW_CORE_API 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 |
IVW_CORE_API 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 |
IVW_CORE_API 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 |
IVW_CORE_API 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. |
IVW_CORE_API 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. |
IVW_CORE_API 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. |
IVW_CORE_API 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) |
IVW_CORE_API 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) |
IVW_CORE_API 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] |