I am still learning ParaView and I recently start to implement a custom 3D interactive widget. This is the workflow that I summarized (please correct me if I am wrong)
Implement vtkMyCustomWidgetRepresentation.h/.cxx and vtkMyCustomWidgetWidget.h/.cxx
Add the representation XML to Remoting/Views/Resources/3dwidgets_remotingviews.xml so the server can register it.
Implement pqMyCustomWidgetProperty.h/.cxx
Add
else if (type == "InteractiveMyCustomWidget")
{
return new pqMyCustomWidgetProperty(proxy, group, parentWidget);
}
in Qt/ApplicationComponents/pqStandardPropertyWidgetInterface.cxx
5. Now my question is where should I put PropertyGroup panel_widget=“InteractiveMyCustomWidget”?
Yes but no. This is the process to add a interactive widget to ParaView.
I suppose that in your case you want to add that in your paraview based application, then you want to add that in a paraview plugin, not in ParaView directly.
Examples/Plugins/PropertyWidgets only replaces an existing property with a new property in a vtkShrinkFilter.
When a vtkShrinkFilter is created in ParaView, a pipelinesource will be created. Based on the panel_widget, it knows what property to display in UI. But how does it know what widget to display in the 3D scene? Where am I supposed to implement this logic?
How do I understand relationship between filter - widget - representation - property?
If I create a filter inherited from vtkPlaneCutter, I will automatically have a widget (a slice plane with its normal) when this filter is created. where is it in the source code and how it is associated with vtkPlaneCutter?