Dynamic behavior of the GUI with a custom plugin

Hi, I am writing a ParaView plugin to call a 3rd party meshing software and I have some trouble to implement my ideas in the GUI. The 3rd party meshing software would work into roughly 3 steps: defining the surfaces, remeshing the surfaces and finally meshing the interior of those surfaces.

While remeshing the surfaces, in the 3rd party meshing software, a user can also provide a custom sizemap through a providing a pointer to a custom C function. I have currently implemented the sizemap function against a vtkImageData and it works fine.

This vtkImageData is generated by a filter from 1 to 4 vtkImageData + some user parameters according to the simulation model. This led to a complex «Properties» panel in the GUI.

So 2 set of questions:
1- I am currently asking that all input vtkImageData to be in a vtkMultiBlockDataSet, and ask the user which index corresponds to which field. I do not understand how to implement that a user can select the input from a drop down list (https://kitware.github.io/paraview-docs/nightly/cxx/PluginHowto.html), where the list would be the vtkBlockColors’ annotation that the user can change through the «Color Map Editor» View. Is it possible with the basic «xml» gui ? Would I have to work on the RequestInformation() member function and use «SelectInputArrays» method ? Do I need to add something in the vtkMultiBlockDataSet (ex: vtkBlockColors as a field data) ?

2- I noticed that the «Clip» filter «Properties» panel changes according to the «Clip Type» value and I would like to do the same with the basic «xml» gui. Is it possible ? How do you toggle entries ?
If this is possible, I would have liked to change the inputs of the plugin to 4 input ports, all optional and dynamically change the «Properties» panel according to the provided ones (namely, masking all impossible combinations).

As it is very time consumming to explore all possibilities, thank you very much for your advice/help or any other ideas.

Regards

Ok. I am really out-of-date since I was refering to an old paper back ParaView User Guide (Paraview 4.3).
I am now reading the chapter 17 of ParaView Guide is now updated for 5.6 and it is very promissing…

Just to let you know that I have partially answered question 2.

I have found two techniques to show/hide an element in a property panel:

  1. The GenericDecorator and you should look at vtkEnvironmentAnnotationFilter.h
  2. The PropertyWidgetDecorator and you should look at at the example PropertyWidgets. But I found the EmbossingRepresentations plugin was more useful in real life since you would have to adapt your CMakeLists.txt
1 Like

Indeed, thanks for answering to yourself here !