Looks good to me.<br><br><div><span class="gmail_quote">On 12/7/05, <b class="gmail_sendername">David Cole</b> <<a href="mailto:david.cole@kitware.com">david.cole@kitware.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
This was checked in to the VTK-5-0 branch on Dec. 5. Randall, could you<br>update and verify that it's fixed...?<br><br>Thanks,<br>David<br><br><br>Randall Hand wrote:<br><br>> I've spent the last week beating my head against the wall trying to
<br>> figure out why my colormap didn't work in my application, but smaller<br>> test cases would work.  I finally figured it out just now.  (Filed as<br>> bug 2546)<br>><br>> When using a vtkColorTransferFunction, and adding a large number of
<br>> points (Over 100) in an out-of-order fashion (In my case, I'm reading<br>> them from a file and the X's are fairly random, not simply<br>> incrementing), it will destroy the colormap.  The problem comes when
<br>> you add the 100'th point and it tries to resize the colormap.  In this<br>> case, it uses a memcpy to copy the colormap into the newly allocated<br>> (and large) array.  If that 100th's point is not the highest point in
<br>> the list, it uses 2 memcpy's, one shifted by one entry to create a<br>> "hole" for the newly added entry in the middle.  Unfortunately, it<br>> indexes wrong! So the net result:  Blue becomes red, green becomes
<br>> blue, red becomes the next entry's X, and in general it's just all<br>> b0rked.<br>><br>> Attached to the bug (<br>> <a href="http://www.vtk.org/Bug/bug.php?op=show&bugid=2546&pos=3">http://www.vtk.org/Bug/bug.php?op=show&bugid=2546&pos=3
</a><br>> <<a href="http://www.vtk.org/Bug/bug.php?op=show&bugid=2546&pos=3">http://www.vtk.org/Bug/bug.php?op=show&bugid=2546&pos=3</a>> ) you'll<br>> find a test-case that uses a Mandelbrot fractal source to illustrate
<br>> the problem.<br>><br>> --<br>> Randall Hand<br>> Visualization Scientist,<br>> ERDC-MSRC Vicksburg, MS<br>> Homepage: <a href="http://www.yeraze.com">http://www.yeraze.com</a><br>><br>>------------------------------------------------------------------------
<br>><br>>_______________________________________________<br>>vtk-developers mailing list<br>><a href="mailto:vtk-developers@vtk.org">vtk-developers@vtk.org</a><br>><a href="http://www.vtk.org/mailman/listinfo/vtk-developers">
http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>><br>><br></blockquote></div><br><br clear="all"><br>-- <br>Randall Hand<br>Visualization Scientist, <br>ERDC-MSRC Vicksburg, MS<br>Homepage: <a href="http://www.yeraze.com">
http://www.yeraze.com</a>