[vtk-developers] vtkColorTransferFunction ambiguities about ranges
David Doria
daviddoria at gmail.com
Wed Apr 24 15:04:57 EDT 2013
On Wed, Apr 24, 2013 at 2:52 PM, Sean McBride <sean at rogue-research.com> wrote:
> 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,
I'm not sure if vtkColorTransferFunction is consistent, but I added
the ranges for color space conversions to the vtkMath documentation a
while back, e.g.
http://www.vtk.org/doc/nightly/html/classvtkMath.html#acda272197c6723e3ff6e72822b1e1d79
David
More information about the vtk-developers
mailing list