Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::ColorConversions Namespace Reference

Conversion routines between different color spaces. More...

Functions

void Hsv2Rgb (float h, float s, float v, float &r, float &g, float &b)
 Convert an HSV color to RGB. More...
 
void Rgb2Hsv (float r, float g, float b, float &h, float &s, float &v)
 Convert an RGB color to HSV. More...
 

Detailed Description

Conversion routines between different color spaces.

Function Documentation

◆ Hsv2Rgb()

void mitk::ColorConversions::Hsv2Rgb ( float  h,
float  s,
float  v,
float &  r,
float &  g,
float &  b 
)

Convert an HSV color to RGB.

Parameters
hHue component (0 to 360).
sSaturation component (0 to 1).
vValue component (0 to 1).
[out]rRed component (0 to 1).
[out]gGreen component (0 to 1).
[out]bBlue component (0 to 1).

◆ Rgb2Hsv()

void mitk::ColorConversions::Rgb2Hsv ( float  r,
float  g,
float  b,
float &  h,
float &  s,
float &  v 
)

Convert an RGB color to HSV.

Parameters
rRed component (0 to 1).
gGreen component (0 to 1).
bBlue component (0 to 1).
[out]hHue component (0 to 360).
[out]sSaturation component (0 to 1).
[out]vValue component (0 to 1).