<br>Well, <br><br>Thank you sir. After adding array, how do i inform the application which array should it use to scale the arrows and which array to use to color??<br><br>Thanks<br><blockquote><br>---------- Original message ----------<br>From:Berk Geveci< berk.geveci@kitware.com ><br>Date: 16 Feb 10 17:04:58<br>Subject: Re: [vtkusers] two scalars for a single unstructured grid??<br>To: Rakesh Patil <rakeshthp@in.com><br><br>You can simply add another scalar array with<br><br>foo->SetName("my scalar");<br>uGrid->GetPointData()->AddArray(foo);<br><br>The attributes are merely for convenience - they are treated like any other array. Most filters have methods to select any arbitrary array by name. It is usually something like SetInputArrayToProces(...) for filters.<br>
<br>-berk<br><br><div class="gmail_quote">On Tue, Feb 16, 2010 at 6:06 AM, Rakesh Patil <span dir="ltr"><<a target=\"_blank\" target="\"_blank\"" href="mailto:rakeshthp@in.com">rakeshthp@in.com</a>></span> wrote:<br><font color="#000000"></font><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<font color="#000000"> Hello, <br><br>Is it possible to use two scalars for a single unstructured grid.?? Actually, to display vectors I am computing scale factor for each point and storing in a data array and i set this array as a scalar for unstructured grid:<br>
<br>uGrid->SetScalar(vec_values);<br><br>and i set this grid to glyph object<br><br>glyph->SetInput(uGrid);<br><br>and say,<br><br>glyph->SetScaleModeToScaleByScalar();<br><br>BY doing so, i get the desired output.. But when i want to display colored vectors, then i need to replace this scalar data array with color data array.. So my question is, by re[placing, will my scale factor data array be affected?? <br>
<br>If so is there any technique, where in i can attach more than one data array as a scalar to unstructured grid..?<br><br>Thanks<br>
<br>_______________________________________________<br>
Powered by <a target=\"_blank\" href="http://www.kitware.com" target="\"_blank\"">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a target=\"_blank\" href="http://www.kitware.com/opensource/opensource.html" target="\"_blank\"">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a target=\"_blank\" href="http://www.vtk.org/Wiki/VTK_FAQ" target="\"_blank\"">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a target=\"_blank\" href="http://www.vtk.org/mailman/listinfo/vtkusers" target="\"_blank\"">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></font></blockquote></div><br>
</rakeshthp@in.com></blockquote>