Menu

vtk_print help

Help
2006-11-29
2013-04-22
  • Troy Henderson

    Troy Henderson - 2006-11-29

    I'm using Octave version 2.1.72 and Octaviz version 0.4.5 on Gentoo Linux.  I have successfully created a nice VTK figure in Octave with the following commands:

    > x=rand(1,1000);
    > y=rand(1,1000);
    > z=sin(pi*x).*sin(pi*y);
    > T=delaunay(x,y);
    > vtk_trisurf(T,x,y,z);

    I would like to print this figure, but when I do

    > vtk_print('foo.jpg','-djpeg')

    I get a garbled image in that it doesn't take a "snapshot" of the VTK window.  Furthermore, I'm more interested in having a EPS/PDF graphic.  I try to do this by:

    > vtk_print('foo.eps')

    I get the following error(s):

    error: `vtkGL2PSExporter' undefined near line 110 column 9
    error: evaluating assignment expression near line 110, column 7
    error: evaluating if command near line 109, column 3
    error: called from `vtk_print' in file `/usr/share/octave/2.1.72/site/m/octaviz/vtk_print.m'

    Can anyone shed some insight into this problem, and more importantly, offer a solution.

    Thanks!

     
    • Thomas Weber

      Thomas Weber - 2006-11-30

      Hi Troy,

      can you make the images available (build logs might be necessary as well)? 

      Do you have a file
        vtkGL2PSExporter.oct
      in your Octaviz build?

      Thomas

       
    • Troy Henderson

      Troy Henderson - 2006-11-30

      I figured out what the problem was.  I didn't have GL2PS built into VTK.  Adding

      -DVTK_USE_GL2PS:BOOL=ON

      to CMAK_VARIABLES in VTK did the trick.  Once I added that and recompiled VTK, I had to recompile Ocativz.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.