<div dir="ltr"><br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Manh Nguyen</b> <span dir="ltr">&lt;<a href="mailto:nevermind145@gmail.com">nevermind145@gmail.com</a>&gt;</span><br>
Date: Wed, May 29, 2013 at 11:25 AM<br>Subject: Re: [vtkusers] Fwd: Choose the second component in vtkDataArray without copy<br>To: mirko heuegger &lt;<a href="mailto:mheuegger@gmail.com">mheuegger@gmail.com</a>&gt;, <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>
<br><br><div dir="ltr">HI, <div><br></div><div>basically I just need 1 component out of the vectorData (and later on select other component).</div><div>As u see in my previous email, the vtkDataArray  reads all the data (from qflow velocities) and put it in the vtkDataArray, So basically, vtkDataArray hold all the data, with the information that it knows that it has 3 components (it is defined in the file). Also I can not use another reader, because I&#39;m loading VTI files, which requires a different reader. I hope this will answer your question. </div>

<div>Sincerely</div><div><br></div><div>Tat Manh Nguyen</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 29, 2013 at 10:29 AM, mirko heuegger <span dir="ltr">&lt;<a href="mailto:mheuegger@gmail.com" target="_blank">mheuegger@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 dir="ltr">Hello!<div><br></div><div>A Other Question, how are you trying to read the vectorData?</div><div><br></div>

<div>And what is the return from <span style="font-size:13px;font-family:arial,sans-serif">reader-&gt;</span>GetNumberOfVectorsInFile() (the reader-object should be something like a vtkDataSetReader)?<br>
</div><div><br></div><div><br></div><div><span style="font-family:arial,sans-serif;font-size:13px">regards</span><span><font color="#888888"><br></font></span></div><span><font color="#888888"><div>
<span style="font-family:arial,sans-serif;font-size:13px"><br></span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px">mirko</span></div><div><br></div></font></span></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On Tue, May 28, 2013 at 3:58 PM, Manh Nguyen <span dir="ltr">&lt;<a href="mailto:nevermind145@gmail.com" target="_blank">nevermind145@gmail.com</a>&gt;</span> wrote:<br>


</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><br><div class="gmail_quote"><div dir="ltr"><div><div>Dear vtk developers,<div>
<br></div><div>
I have created this code:</div><div><br></div><div>vtkDataArray *DataArray = reader-&gt;GetOutput()-&gt;GetPointData()-&gt;GetArray(&quot;qflow velocities&quot;);</div>

<div><br></div></div></div><div><div><div><div><br></div><div>The DataArray is an array with 3 components (x,y,z), but by default it read only the x component? </div><div><br></div><div><br></div><div>Is there a way to select only the components without using CopyComponent or any other copy functions?</div>



<div><br></div></div></div><div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px"> I have tried GetVectors but it crashed. the data just load single Scalars.</span><br></div><div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br>



</span></div><div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">Does vtkDataArray have something like get Component Array? or something?</span></div>
<div><br></div><div>Sincerely,</div><div><br></div><div>Tat Manh Nguyen</div></div></div>
</div><br></div>
<br></div></div><div>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a 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 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 href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></div></blockquote></div><div><br><br clear="all"><div><br></div>-- <br>Real programmers don&#39;t document; if it was<br>hard to write, it should be hard to understand.
</div></div>
</blockquote></div><br></div>
</div></div></div><br></div>