[vtk-developers] vtkColorTransferFunction ambiguities about ranges
Sean McBride
sean at rogue-research.com
Wed Apr 24 14:52:49 EDT 2013
Hi all,
I'm debugging another undefined behaviour found by clang (converting large doubles into uint8, again with colour conversions).
I'm finding the docs for vtkColorTransferFunction are not detailed enough. Specifically:
// Description:
// Add/Remove a point to/from the function defined in RGB or HSV
// Return the index of the point (0 based), or -1 on error.
// See the description of class vtkPiecewiseFunction for an explanation of
// midpoint and sharpness.
int AddRGBPoint( double x, double r, double g, double b );
int AddRGBPoint( double x, double r, double g, double b,
double midpoint, double sharpness );
int AddHSVPoint( double x, double h, double s, double v );
int AddHSVPoint( double x, double h, double s, double v,
double midpoint, double sharpness );
What is the allowable/required/expected range of these things? Should RGB values always be 0 to 1? Likewise for HSV? Is hue 0 to 1? 0 to 2π? 0 to 360? etc. Am I just missing where this is documented?
Cheers,
--
____________________________________________________________
Sean McBride, B. Eng sean at rogue-research.com
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
More information about the vtk-developers
mailing list