Are Python bindings available for vtkm?

I’m using vtk 8.2 on Windows via the Python bindings - downloaded via Anaconda.

I’m interested in exploring some of the vtkm capabilities, but they are not exposed in the software I downloaded.

I can’t find any info on the web about whether or not I vtkm is accessible via Python or how to download it - although I did find a Python test ‘TestVTKMAverageToPoints.py’

So my question is - Is there a way that I can access vtkm functionality from Python similar to the way I currently access vtk standard, or do I need to move to C++?

Thanks in advance,

Doug

Hmmm…I looked into TestVTKMAverageToPoints.py code and VTK-m can be called through the vtk import, for instance: vtk.vtkmAverageToPoints() . Have you tried it?

Paulo,

Yes - I tried to replicate what I found in TestVTKMAverageToPoints.py using the vtk Python package I downloaded form anaconda, however none of the vtk.vtkmXXX() classes appear to be included in the package.

At some point I’ll download the vtk source and build the Python bindings - I expect that I’ll be able to access the vtkm Accelerators after doing that. (It’s not obvious why they are not part pf the anaconda package)

In the meantime, I’ve downloaded and built the vtkm source and building some familiarity with it using C++. Progress is slower than using Python, but I’m getting there. Getting it to build with TBB was non-trivial and I still have to build with Cuda.

I have a couple of observations about vtkm based on my experience so far,

  1. Code Documentation (Doxygen) is REALLY sparse
  2. Community involvement seems quite meagre
  3. Not sure why there is no vtkm section on this forum - instead all of the communication is happening on the vtkm mailing list
  4. It’s difficult to get a sense of where vtkm is going.
    • Is development active and likely to be long term?
    • Is the trend to use vtkm alongside vtk?

Doug

The Anaconda package probably doesn’t enable the VTK-m algorithms.

That’s unlikely to help here. VTK needs to be built with VTK-m support (what you see in the Python code is the VTK-m-using VTK algorithms, not VTK-m itself).

VTK-m is a related, but separate project. If/when they move is up to the developers of VTK-m itself.

Cc: @RobertMaynard for the rest of the questions.

  1. Are you mainly looking at the Doxygen for VTK-m Filters? Currently VTK-m has an issue where our documentation is split between the users guide and doxygen.

  2. It is a desire I have to move the VTK-m user and developer communication to the VTK discourse.

  3. VTK-m is under active development, and I expect that to continue in the long term. VTK-m design was so that it wouldn’t require VTK for core operations (DataModel, Filters), and that will not be going away. Things such as I/O are not an area that VTK-m wants to expand into, and a reason to use VTK-m and VTK together.
    Part of what the VTK/VTK-m teams are doing is making sure data interop is efficient between these two libraries.

1 Like

Thanks for this information Robert