Quickest way to count number of points in cell Paraview

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Quickest way to count number of points in cell Paraview

awa5114
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
Reply | Threaded
Open this post in threaded view
|

Re: Quickest way to count number of points in cell Paraview

Shawn Waldon-2
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 <[hidden email]> 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



_______________________________________________
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

append_points_in_cell.py (1K) Download Attachment