[Paraview] vtkGL2PSExporter usage from within Paraview's python shell

Marcin Sliwowski ms275 at duke.edu
Thu Jun 17 11:23:23 EDT 2010


  Hello,

I am trying to figure out how to save a visualization in Paraview 
directly to ps/eps format.

I have compiled from source paraview 3.6 with the configuration option 
VTK_USE_GL2PS set to ON.

There are many hits in the mailing list archives regarding trying to use 
vtkGL2PSExporter to achieve this but I couldn't find anything that I 
could make work.

I know that I can just use WriteImage("test.eps", 
Writer="vtkPostScriptWriter") in the python shell to get what I am 
asking for.

However, I wonder if GL2PS could provide a better looking eps file, and 
having spent a couple of hours on this, I would really like to get to 
the bottom of this.

I have looked at the vtkGL2PSExporter class reference at 
http://www.vtk.org/doc/nightly/html/classvtkGL2PSExporter.html and from 
there followed the vtkGL2PSExporter (Tests) link which provides examples 
of unit testing that is done on the class. One example is actually 
titled "test vector EPS output"

However, even after doing a: from paraview import vtk in the python 
shell, when I try to follow the test example and do exp = 
vtk.vtkGL2PSExporter() I get the following error:

AttributeError: 'module' object has no attribute 'vtkGL2PSExporter'


Can anyone shine any light on how to actually utilize the 
vtkGL2PSExporter in Paraview to export an .eps, my impression is that it 
has to be done in the Python Shell, and I am not very familiar with Python.

Thank You,
Marcin Sliwowski
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20100617/d61f92b4/attachment.htm>


More information about the ParaView mailing list