<div><div class="gmail_quote">On Tue, Aug 14, 2012 at 11:18 AM, agatte <span dir="ltr">&lt;<a href="mailto:agatakrason@gmail.com" target="_blank">agatakrason@gmail.com</a>&gt;</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&#39;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 &amp; 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&#39;t read a file, generate data programmatically (vtkSphereSource, etc). Remove all extraneous calls (you have a writer in the above code that doesn&#39;t seem necessary). </div>
<div><br></div><div>Also, you should use smart pointers instead of normal pointers so you don&#39;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>