<div><div class="gmail_quote">On Tue, Aug 14, 2012 at 11:18 AM, agatte <span dir="ltr"><<a href="mailto:agatakrason@gmail.com" target="_blank">agatakrason@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi ;)<br>
<br>
I have a question.<br>
I have already red mesh with attributes (in file).<br>
But I can't display corectly mesh with attributes in VTK.<br>
I receive only one color. But When I open file in paraview, I can display<br>
well mesh & attributes with colors.<br>
Could anyone help me please ? What is it wrong in this code ? What should I<br>
add ?<br>
I would appreciate for any help please.<br></blockquote><div><br></div>I would suggest looking through some of the examples:<div><br></div><div><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/TriangleColoredPoints">http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/TriangleColoredPoints</a><br clear="all">
<br></div><div>and you should always try to generate the situation you are having in the smallest possible compilable, self contained code. That is, don't read a file, generate data programmatically (vtkSphereSource, etc). Remove all extraneous calls (you have a writer in the above code that doesn't seem necessary). </div>
<div><br></div><div>Also, you should use smart pointers instead of normal pointers so you don't need the giant block of Delete() calls at the bottom (it makes the code longer and less appealing to look at for us at a glance). </div>
<div><br></div><div>David </div></div></div>