<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 3, 2014 at 10:51 AM, Casey Goodlett <span dir="ltr"><<a href="mailto:casey.goodlett@kitware.com" target="_blank">casey.goodlett@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Is the problem that colors are being blended across the triangles? If so, you need to duplicate the vertices such that each triangle is defined by three unique vertices (its ok to have multiple vertices with the same XYZ locations).<br>
</div></div></div></blockquote><div><br></div><div>point data to cell data filter should have done this already. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div>
<br></div>Let me know if that makes sense.<br><br></div>Thanks<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 3, 2014 at 10:48 AM, Bo Yu <span dir="ltr"><<a href="mailto:yubo1983@gmail.com" target="_blank">yubo1983@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thank you for your information, Casey, the color do appear, but it seems that was colored "vertex by vertex", not as I expected: "cell by cell".<div>
<div>I am using bitbucket with my colleagures. I'll try to <span></span>create a new repo in github to let you see.</div><span><font color="#888888">
<div><br></div>Bo Yu</font></span><div><div><br><div><br>On Tuesday, March 4, 2014, Casey Goodlett <<a href="mailto:casey.goodlett@kitware.com" target="_blank">casey.goodlett@kitware.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 3, 2014 at 12:42 AM, Bo Yu <span dir="ltr"><<a>yubo1983@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><br></div><div>pd->GetPointData()->SetScalars(colorTable);//color works like on each vertexes and scalar, color table is an vtkUnsignedCharArray which contains same tuples as vertexes number.</div>
<div>//pd->GetCellData()->SetScalars(colorTable);//no color at all, color table is an vtkUnsignedCharArray which contains same tuples as cells number.</div><div><div> </div></div></blockquote></div><br>
</div><div class="gmail_extra">Bo,<br><br></div><div class="gmail_extra">Once you you run the filter you should not overwrite the scalars as done on these lines.<br><br>If you already built your colorTable for the vertices you dont need to use the CellDataToPointData filter at all just set directly as point data.<br>
<br></div><div class="gmail_extra">Is your problem that colors dont appear or they are not as you intended?<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Can you share how you have constructed your colorTable? Is your code anywhere public like github that we could look at?<br>
</div><div class="gmail_extra"><br clear="all"></div><div class="gmail_extra">Thanks<br></div><div class="gmail_extra"><br>-- <br>Casey B. Goodlett, Ph.D.<br>R&D Engineer<br>Kitware, Inc. - North Carolina Office<br><a href="http://www.kitware.com" target="_blank">http://www.kitware.com</a><br>
<a href="tel:%28919%29%20969-6990%20x310" value="+19199696990" target="_blank">(919) 969-6990 x310</a>
</div></div>
</blockquote></div></div></div></div>
</blockquote></div><br><br clear="all"><br>-- <br>Casey B. Goodlett, Ph.D.<br>R&D Engineer<br>Kitware, Inc. - North Carolina Office<br><a href="http://www.kitware.com" target="_blank">http://www.kitware.com</a><br><a href="tel:%28919%29%20969-6990%20x310" value="+19199696990" target="_blank">(919) 969-6990 x310</a>
</div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>| Aashish Chaudhary <br>| R&D Engineer <br>| Kitware Inc. <br>| <a href="http://www.kitware.com">www.kitware.com</a>
</div></div>