Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Christian Butz
VTK
Commits
ae576e07
Commit
ae576e07
authored
Dec 01, 2011
by
David Doria
Committed by
Kitware Robot
Dec 01, 2011
Browse files
Merge topic 'HSVDOC'
9b38f02d
DOC: Added output ranges for RGBToHSV and RGBToLab.
parents
e63278f9
9b38f02d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Common/vtkMath.h
View file @
ae576e07
...
...
@@ -793,6 +793,9 @@ public:
// Description:
// Convert color in RGB format (Red, Green, Blue) to HSV format
// (Hue, Saturation, Value). The input color is not modified.
// The input RGB must be float values in the range [0,1].
// The output ranges are hue [0, 1], saturation [0, 1], and
// value [0, 1].
static
void
RGBToHSV
(
const
float
rgb
[
3
],
float
hsv
[
3
])
{
RGBToHSV
(
rgb
[
0
],
rgb
[
1
],
rgb
[
2
],
hsv
,
hsv
+
1
,
hsv
+
2
);
}
static
void
RGBToHSV
(
float
r
,
float
g
,
float
b
,
float
*
h
,
float
*
s
,
float
*
v
);
...
...
@@ -852,6 +855,9 @@ public:
// Description:
// Convert color from the RGB system to CIE-L*ab.
// The input RGB must be values in the range [0,1].
// The output ranges of 'L' is [0, 100]. The output
// range of 'a' and 'b' are approximately [-110, 110].
static
void
RGBToLab
(
const
double
rgb
[
3
],
double
lab
[
3
])
{
RGBToLab
(
rgb
[
0
],
rgb
[
1
],
rgb
[
2
],
lab
+
0
,
lab
+
1
,
lab
+
2
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment