Writing LidarView plugin

Hi,

I successfully wrote a LidarView plugin (in Windows) by following the structure of the current plugins.

Still, I have a few issues that can make my further work easier.

  1. The structure of the plugin is complex, something like this:
(LidarView_source_root)
  Plugins
    1st_lvl_plugin_dir
      CMakeLists.txt
      Plugin
        CMakeLists.txt
        paraview.plugin
        3rd_lvl_plugin_dir
                CMakeLists.txt
          vtk.module
          4th_lvl_plugin_dir(s)
            *.cxx
            *.h
            (other source file)

Is this essential? Are all files needed? Or can it be simpler?

  1. Where is the right place to add “include directories” and how?

Specifically - I want to add include paths to: lqHelper.h from LVCore and pqApplicationCore.h from ParaView. Could these be referred to by a predefined CMake variable?

  1. To make the plugin compile I had to manually edit the CMake files of Paraview. Is there a proper way to pass variables to Paraview build from LidarView’s cmake configuration\command?
  2. About the newly released Lidarview version, I can’t find an offline installer for Qt 5.15.7 either in the url you mentioned in the LidarView_Developer_Guide.md, nor on the Qt site. Building this version of Qt from source code gave a directory structure that is difficult to include.

@Gatien_Ferret @Timothee_Couble

Hi @land_mn,

I think the only essential directory are the 2nd_lvl_plugin_dir and 3rd_lvl_plugin_dir as paraview.plugin and vtk.module file will check for associated CMakeLists.txt. This structure is generally the one used to add a plugin in ParaView and LidarView. If you want to remove one one level it would be the 4th_lvl_plugin_dir.

Theses files are only available on paraview and lidarview plugin side (not in the vtk module), you can checkout here for an example that uses vtk module and add a qt component. (There a lot of plugin example in the ParaView Examples/Plugins directory)

You should be able to compile your plugin with LidarView by copying VelodynePlugin CMakeList, changes the name and a add_subdirectory(Plugins/YourPlugin) in LidarView root CMakeLists.txt.

I just added a documentation about how to install qt5 here with the correct links.

Let met know if you have any other questions.