Can one use the VTKPythonAlgorithmBase class to create annotation filters, i.e. show additional descriptive text? I have managed to open a table in a separate window, but never to show a text in the same window.
I have a feeling there should be a connection to the PrintSelf function and the ostream to achieve this, is it so? Any help is deeply appreciated.
As an execrcise, I am trying to write a PV plugin in python, that would create an annotation filter, i.e. show a text at the top of the render view window. The problem is that instead of a string I get a table in the Spread Sheet view. I also compared the python implementation with existing c++ filters, and the only thing that was different is that c++ filters have the PrintSelf function, while python filters do not.
A filter indicate it’s producing data that should rendered as text by adding a hint. If your filter is producing a table with a single row/column with the string to be rendered as text in the render view, the following hint should do the trick.
@smhint.xml("<OutputPort index='0' name='Output-0' type='text' />")
class Foo(VTKPythonAlgorithmBase):
...
I’m sorry, but I still cannot get it right. I have added the hint as you suggested, yet I still get no text in the render view, but a table in a separate window. Here is my code: