Hi David, <br><br>A minor thing. Using either your code or mine, in the output file, between the SCALARS block for curv and the one for depth, I saw the follows. <br><br><div style="margin-left:40px"><span style="font-family:courier new,monospace">FIELD FieldData 1</span><br style="font-family:courier new,monospace">

<span style="font-family:courier new,monospace">Depth 1 133597 double</span><br></div><br>It causes problems when I load the file using VTK&#39;s Python wrapper in 
Python. Interestingly, it had no problem with some visualization 
software, e.g., MayaVI.<br><br>To &quot;fix&quot; this, is there any way that I can <br>1. get rid of the &quot;<span style="font-family:courier new,monospace">FIELD FieldData 1</span>&quot; line and,<br>2. have &quot;<span style="font-family:courier new,monospace">Depth 1 133597 double</span>&quot; changed into &quot;<span style="font-family:courier new,monospace">SCALARS Depth double</span>&quot; and,<br>

3. add a line &quot;<span style="font-family:courier new,monospace">LOOKUP_TABLE default</span>&quot; ? <br>
<br clear="all">Cheers, Forrest<br><br><div class="gmail_quote">On Thu, Jan 5, 2012 at 7:02 AM, David Doria <span dir="ltr">&lt;<a href="mailto:daviddoria@gmail.com" target="_blank">daviddoria@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">
<div class="gmail_quote"><div>On Wed, Jan 4, 2012 at 10:47 PM, Forrest Sheng Bao <span dir="ltr">&lt;<a href="mailto:forrest.bao@gmail.com" target="_blank">forrest.bao@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 am trying to associate two scalars to points of a vtkPolyData object (i.e., I want to see two SCALARS blocks in POINTDATA segment in the output VTK file). <br><br>Suppose I have a vtkPolyData pointer <br>
<pre>vtkPolyData* mesh;
</pre>and two vtkDoubleArray pointers <br>
<pre> vtkDoubleArray* depth; 
 vtkDoubleArray* curv; 
</pre>
This is what I do: <br>

<pre>depth-&gt;SetName(&quot;Depth&quot;);
mesh-&gt;GetPointData()-&gt;SetScalars(depth);
curv-&gt;SetName(&quot;Curvature&quot;);
mesh-&gt;GetPointData()-&gt;AddArray(curv)</pre></blockquote></div><div>Sure, that is fine. </div><div class="gmail_quote">You could equivalently do:</div><pre>mesh-&gt;GetPointData()-&gt;AddArray(depth);<br>mesh-&gt;GetPointData()-&gt;AddArray(curv)</pre>



<pre><pre>mesh-&gt;GetPointData()-&gt;SetActiveScalars(&quot;Depth&quot;);</pre></pre><div>David </div></div><br>
</blockquote></div><br>