<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Hello,<br>
    <br>
    I'm experiencing a strange behavior in VTK which might be a bug.<br>
    It took me a while to locate the issue:<br>
    <br>
    if I create a LUT with a <b>NULL red component</b>:<br>
    <small>&nbsp; iRed = 0;<br>
      &nbsp; iGreen = 255;<br>
      &nbsp; iBlue = 255;<br>
      &nbsp; iAlpha = 255;<br>
      &nbsp; double iRange[2] = {0, 255};<br>
      <br>
      &nbsp; vtkSmartPointer&lt;<b>vtkLookupTable</b>&gt; lut =<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkSmartPointer&lt;<b>vtkLookupTable</b>&gt;::New();<br>
      &nbsp; double* HSV = vtkMath::RGBToHSV(iRed,iGreen,iBlue);<br>
      &nbsp; lut-&gt;SetAlpha(iAlpha);<br>
      &nbsp; lut-&gt;SetHueRange(HSV[0], HSV[0]);<br>
      &nbsp; lut-&gt;SetSaturationRange(1, 1);<br>
      &nbsp; lut-&gt;SetValueRange(0, 1);<br>
      &nbsp; lut-&gt;SetRange(iRange);<br>
      &nbsp; lut-&gt;Build();<br>
    </small><br>
    I color my image with this LUT:<br>
    <small><br>
      &nbsp; vtkSmartPointer&lt;<b>vtkImageMapToColors</b>&gt; coloredImage =<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkSmartPointer&lt;</small><b><small>vtkImageMapToColors</small></b><small>&gt;::New();<br>
      &nbsp; coloredImage-&gt;SetLookupTable(iLUT);<br>
      &nbsp; coloredImage-&gt;SetInput( iImage );<br>
      &nbsp; coloredImage-&gt;PassAlphaToOutputOff();<br>
      &nbsp; coloredImage-&gt;SetOutputFormatToRGB();<br>
      &nbsp; coloredImage-&gt;Update();</small><br>
    <br>
    then:&nbsp; <br>
    <small>&nbsp; double* range =
      coloredImage-&gt;GetOutput()-&gt;GetScalarRange();</small><br>
    returns [0,0].<br>
    then everything I do with this image is messed up...<br>
    <br>
    If <b>iRed != 0</b>, the scalar range of the "<small>coloredImage</small>"
    will be correct then my pipeline is working.<br>
    <br>
    Am I doing something wrong?<br>
    <br>
    Thanks,<br>
    <br>
    Nicolas<br>
    <br>
    <br>
    <br>
    <br>
  </body>
</html>