[vtkusers] How to find range of data in Cell Scalar Array?

Cory Quammen cory.quammen at kitware.com
Mon Dec 18 10:10:56 EST 2017


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
https://blog.kitware.com/improved-vtk-numpy-integration/.

HTH,
Cory

On Sun, Dec 17, 2017 at 8:32 PM, scotsman60 <doug at beachmailing.com> wrote:

> Hello,
>
> I'm using vtk in a Python app and I need to set parameters on a lookup
> table
> based on the range of values in an integer scalar array associated to Cells
> in a vtkUnstructuredGrid.
>
> I can access the array ,
>
> name = self.mesh.GetCellData().GetArrayName('PID')
>
> where self.mesh is my vtkUnstructuredGrid
>
> But how can I find the unique value sin this array?
>
> I need something like numpy.unique () - is there a vtk method available?
>
> Thanks in advance,
>
>
> Doug
>
>
>
> --
> Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> https://vtk.org/mailman/listinfo/vtkusers
>



-- 
Cory Quammen
Staff R&D Engineer
Kitware, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://vtk.org/pipermail/vtkusers/attachments/20171218/48175987/attachment.html>


More information about the vtkusers mailing list