Possible to create a ParaView plugin for a non-module based VTK library?

Hi,

I want to create a new reader in a modular way:

  1. usable as a C++ library
  2. expose the main functionalities to Python
  3. create a ParaView plugin for it

Before implementing the main logic – reading our mesh format into a vtkUnstructuredGrid object – I plan to set up the overall project structure.

Until now, step 1 above is done. Since the reader is simple, I opted for the old way of linking with VTK, i.e simply.

target_link_libraries(my_lib PUBLIC VTK::CommonDataModel)

as demonstrated in the UsingVTK example, instead of using the newer VTK module system.

On the other hand, when I want to create a ParaView plugin (step 3 above), I only encountered examples in which the VTK module system is used.

Questions:

  1. Can I create a ParaView plugin for a non-module based VTK system?
  2. In my specific case, what advantages would the VTK module system bring with respect to the older way of building?

Thank you.

No

what advantages would the VTK module system bring with respect to the older way of building?

It would work :slight_smile:

See plugin examples here: https://gitlab.kitware.com/paraview/paraview/-/tree/master/Examples/Plugins?ref_type=heads

OK, thanks. :slight_smile:

See plugin examples here

Yes, that’s what I was looking at, especially the ComplexPluginArchitecture example.

Well, as its name indicate, you dont want to do that unless you have a complex architecture, specifically where you have a VTK module which multiple plugins depends on.

I suggest ElevationFilter for a simpler example.

1 Like

You could have a module-less plugin if you only add Qt widgets or the like. But anything that needs ClientServer wrapping needs a module as the module system provides a lot of extra metadata about how to properly wrap it (including, but not limited to, things like other dependencies that may need loaded and which headers to wrap).