<div dir="ltr">Hi David,<br><br>Thank you for your answer.<br>Regarding my previous questions, I tried some new manipulations and came with results:<br><br>*First, regarding the writing of vtkPolyData with its scalars:<br>

  I tried to use this filter with the following code:<br><br>  vtkSmartPointer&lt;vtkXMLPolyDataWriter&gt; writerXML = <br>    vtkSmartPointer&lt;vtkXMLPolyDataWriter&gt;::New();<br>    <br>  writerXML-&gt;SetFileName(&quot;Colored_Surface.vtp&quot;);<br>

    <br>  writerXML-&gt;SetInput(surfacePolyData);<br>    <br>  writerXML-&gt;Write();<br><br>  But It&#39;s only writing the polyData without its scalars/colors.<br>  What have I missed?<br><br>*Second, regarding the look up table: I simply used the following code and got the right results, but I&#39;m still searching for a way to get a variety from the same color in each range (for example, in the i&#39;th table which I set to red, I&#39;d like to get lighter/darker color due to its value in the range).<br>

<br>  vtkSmartPointer&lt;vtkLookupTable&gt; lut = vtkSmartPointer&lt;vtkLookupTable&gt;::New();<br><br>  lut-&gt;SetNumberOfTableValues(3); // I need only three colors<br>  <br>  lut-&gt;Build();<br>  <br>  lut-&gt;SetTableValue(0,0,1,0); <br>

  <br>  lut-&gt;SetTableValue(1,1,1,0); <br>  <br>  lut-&gt;SetTableValue(2,1,0,0); <br>  <br>  myVtkFloatArray-&gt;SetLookupTable(lut);<br><br><br>Any help would be very appreciated!<br>Regards,<br>Miri<br><br><br><div class="gmail_quote">

On Sun, Jan 8, 2012 at 9:44 PM, David Doria <span dir="ltr">&lt;<a href="mailto:daviddoria@gmail.com">daviddoria@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<div class="im">On Sun, Jan 8, 2012 at 2:15 PM, Miri Trope &lt;<a href="mailto:miritrope@gmail.com">miritrope@gmail.com</a>&gt; wrote:<br>
&gt; Hi Again,<br>
&gt;<br>
&gt; In addition,<br>
&gt; I&#39;d like to ask about vtkPolyDataWriter:<br>
&gt; I set scalars on vtkPolyData and would like to save both the vtkPolyData<br>
&gt; with his scalars (it means that I&#39;d like to save the colored surface).<br>
&gt;<br>
&gt; How should I do this?<br>
<br>
</div>You should probably be using vtkXMLPolyDataWriter to write a .vtp<br>
file. Use Paraview (<a href="http://paraview.org" target="_blank">paraview.org</a>) to inspect the result - the<br>
PointData, CellData, and FieldData<br>
(<a href="http://www.vtk.org/Wiki/VTK/Tutorials/DataStorage" target="_blank">http://www.vtk.org/Wiki/VTK/Tutorials/DataStorage</a>) should<br>
automatically be saved to the file.<br>
<font color="#888888"><br>
David<br>
</font></blockquote></div><br><div style="display:inline" id="avg_ls_inline_popup"></div><style type="text/css">#avg_ls_inline_popup {  position:absolute;  z-index:9999;  padding: 0px 0px;  margin-left: 0px;  margin-top: 0px;  width: 240px;  overflow: hidden;  word-wrap: break-word;  color: black;  font-size: 10px;  text-align: left;  line-height: 13px;}</style></div>