<div dir="ltr">I believe the range is 0->1. I think it was meant to be .6<div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Apr 25, 2013 at 9:58 AM, Sean McBride <span dir="ltr"><<a href="mailto:sean@rogue-research.com" target="_blank">sean@rogue-research.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Wed, 24 Apr 2013 15:04:57 -0400, David Doria said:<br>
<br>
>>   // Description:<br>
>>   // Add/Remove a point to/from the function defined in RGB or HSV<br>
>>   // Return the index of the point (0 based), or -1 on error.<br>
>>   // See the description of class vtkPiecewiseFunction for an explanation of<br>
>>   // midpoint and sharpness.<br>
>>   int AddRGBPoint( double x, double r, double g, double b );<br>
>>   int AddRGBPoint( double x, double r, double g, double b,<br>
>>                    double midpoint, double sharpness );<br>
>>   int AddHSVPoint( double x, double h, double s, double v );<br>
>>   int AddHSVPoint( double x, double h, double s, double v,<br>
>>                    double midpoint, double sharpness );<br>
>><br>
>> What is the allowable/required/expected range of these things?  Should<br>
>RGB values always be 0 to 1?  Likewise for HSV?  Is hue 0 to 1?  0 to<br>
>2π?  0 to 360?  etc.  Am I just missing where this is documented?<br>
>><br>
>> Cheers,<br>
><br>
>I'm not sure if vtkColorTransferFunction is consistent, but I added<br>
>the ranges for color space conversions to the vtkMath documentation a<br>
>while back, e.g.<br>
<br>
</div>Well, anyone have an opinion on<br>
<br>
Common/DataModel/Testing/Cxx/otherColorTransferFunction.cxx:36<br>
<br>
  ctf1->AddHSVSegment (11.0, 1, 1, 6, 15.0, .1, .2, .3);<br>
<br>
where the API is:<br>
<br>
  void AddHSVSegment( double x1, double h1, double s1, double v1,<br>
                      double x2, double h2, double s2, double v2 );<br>
<br>
Is "6" a valid value to pass as 'V' in HSV?<br>
<br>
It's the cause of the undefined cast of a large double to a uint8.  If I change the test's "6" to "0.6" the test still passes and the undefined behaviour is gone.<br>
<div class="im HOEnZb"><br>
Cheers,<br>
<br>
--<br>
____________________________________________________________<br>
Sean McBride, B. Eng                 <a href="mailto:sean@rogue-research.com">sean@rogue-research.com</a><br>
Rogue Research                        <a href="http://www.rogue-research.com" target="_blank">www.rogue-research.com</a><br>
Mac Software Developer              Montréal, Québec, Canada<br>
</div><div class="HOEnZb"><div class="h5">_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div>