<div dir="ltr">I'm not sure if there is something in VTK that does this, but the good news is you can use numpy to do it. See Berk's blog post series on VTK/numpy integration starting with <a href="https://blog.kitware.com/improved-vtk-numpy-integration/">https://blog.kitware.com/improved-vtk-numpy-integration/</a>.<div><br></div><div>HTH,</div><div>Cory</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Dec 17, 2017 at 8:32 PM, scotsman60 <span dir="ltr"><<a href="mailto:doug@beachmailing.com" target="_blank">doug@beachmailing.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
I'm using vtk in a Python app and I need to set parameters on a lookup table<br>
based on the range of values in an integer scalar array associated to Cells<br>
in a vtkUnstructuredGrid.<br>
<br>
I can access the array ,<br>
<br>
name = self.mesh.GetCellData().<wbr>GetArrayName('PID')<br>
<br>
where self.mesh is my vtkUnstructuredGrid<br>
<br>
But how can I find the unique value sin this array?<br>
<br>
I need something like numpy.unique () - is there a vtk method available?<br>
<br>
Thanks in advance,<br>
<br>
<br>
Doug<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html" rel="noreferrer" target="_blank">http://vtk.1045678.n5.nabble.<wbr>com/VTK-Users-f1224199.html</a><br>
______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>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" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_<wbr>FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://vtk.org/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">https://vtk.org/mailman/<wbr>listinfo/vtkusers</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Cory Quammen<br>Staff R&D Engineer<br>Kitware, Inc.</div>
</div>