[vtkusers] Quickest way to count number of points in cell Paraview
Shawn Waldon
shawn.waldon at kitware.com
Thu May 18 13:28:31 EDT 2017
Hi Amine,
I don't know of a way to do it with existing filters. The easiest way to
create an example is using Python, but you should be able to translate it
to C++ if you want and create a custom filter to do this (The execute
method in the script becomes RequestData on a vtkPassInputTypeAlgorithm if
you go this route). Attached is a script that uses Python via the
programmable filter. You can find more information about the programmable
filter here[1] (I modified the script at the start of that blog post to
append the number of points in the cell instead of the example array in my
attached script. You may want to adapt it further after reading the blog
post).
HTH,
Shawn
[1]: https://blog.kitware.com/vtkprogrammablefilter-aint-so-bad/
On Mon, May 8, 2017 at 2:49 AM, Amine Aboufirass <amine.aboufirass at gmail.com
> wrote:
> Hello,
>
> I would like to figure out the best way in Paraview to count the number of
> points within a cell. Preferrably a non- Python way of doing it by applying
> a filter of some sort or other (my Python skills are still crappy.
>
> Thanks,
>
> Amine
>
> _______________________________________________
> 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:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170518/d3527a90/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: append_points_in_cell.py
Type: text/x-python
Size: 975 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170518/d3527a90/attachment.py>
More information about the vtkusers
mailing list