[Paraview] Utilisation of plugin ParaView in ParaViewWeb

Sebastien Jourdain sebastien.jourdain at kitware.com
Mon Jun 18 07:46:06 EDT 2012


Hi Alex,

First of all, you should be able to remove those lines, they are not
needed in your case.

> import os
> import threading
>
>  LoadPlugin('.../vtkSimpleImageThreshold/bin/libSimpleImageThresholdSMPlugin.so',True)
> # server

Then my question will be: Did you managed inside the Python shell of
ParaView to call manually the load plugin and to instantiate your
filter the way you are doing it in ParaViewWeb ?

> And, one more question. How can we define SimpleImageThreshold() in .py file
> so that they can act like a real filter? Take in an image, do
>  his work, and we have an image thresholded as ouput?
>
> Reason : when I called reader2 = ST.SimpleImageThreshold({proxy}); log file
> :
>
> Traceback (most recent call last):
>   File "<jsonrpc>", line 144, in handle_request
> TypeError: SimpleImageThreshold() takes no arguments (1 given)

to solve that issue you need to change your python plugin so the
method will look like that:

def SimpleImageThreshold(proxy):
    ....SimpleImageThreshold(proxy)

and in JavaScript that will be

ST.SimpleImageThreshold(proxy);

note that I've removed the {}.

Seb


More information about the ParaView mailing list