[Paraview] reader plugin in pvbatch
joseph insley
insley at mcs.anl.gov
Wed Sep 21 21:24:37 EDT 2011
Hi,
I have a custom ParaView reader plugin that I've written, which works as expected when loaded and used through the GUI, but I'm having trouble getting it to work with pvbatch. I have tried a couple of different approaches, with varying degrees of success. The one that gets furthest is this..
Using the GUI I load the plugin. I'm running in client/server mode, so load the plugin for both sides. I then load a custom data file using this plugin. An unstructured grid is generated and rendered, this works as expected. I then save the state.
If I relaunch ParaView and the pvserver, again load the plugin on both sides, and load the state file that I just saved, the data is loaded and rendered. So far, so good.
For pvbatch I try running with the following script:
------------------
try: paraview.simple
except: from paraview.simple import *
servermanager.LoadPlugin('/home/insley/libMyCustomReader.so')
servermanager.LoadState("/home/insley/my_state_flle.pvsm")
curView = GetRenderView()
SetActiveView(curView)
curView.ViewSize = [1920, 1080]
curView.StillRender()
WriteImage("/home/insley/test_image.png")
-----------------
I call DebugOn() in the constructor of my class, and see lots of output from pvbatch so it seems that the plugin is getting loaded correctly. I see output from the RequestInformation() in my reader class, but I do not see anything from the RequestData() method. So it appears that RequestData() is never called, and the actual data is not being read from disk. Is there something additional that I need to do to cause that to be invoked?
After the RequestInformation() output I see a number of printouts about my class being Registered and UnRegistered by other classes (vtkClientServerInterpreter, vtkCompositeDataPipeline, etc) and the output from my class' destructor.
A black image (of resolution 1920x1080) is saved to /home/insley/test_image.png
Any insight that folks could provide would be much appreciated.
Thanks,
joe.
===================================================
joseph a. insley insley at mcs.anl.gov
mathematics & computer science division
argonne national laboratory
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20110921/1e59cb91/attachment-0001.htm>
More information about the ParaView
mailing list