[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: vtk file export

From: Geraint Paul Bevan
Subject: Re: vtk file export
Date: Fri, 08 Aug 2003 22:31:14 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624

address@hidden wrote:
hello all.

I made  a  small  DLD  function that receives a bidimensional matrix and
exports  a  vtk  file  so  it can be viewed in any vtk viewer. I'm using
Mayavi  now,  calling  it  directly  from octave... Now I can stop using
matlab,  because  I  could  not live without it's tridimensional surface
browser... :)

You can get it from

I hope it's of any use! bye...


Very nice!

I had to rename to and modify the file slightly to get it to compile with g++ 3.3.1

$ diff
< Function to generate a VTK file (fname) of a surface from a two dimensional matrix.
> Function to generate a VTK file (fname) of a surface from a two dimensional matrix.\
<    ofstream fsai;
>    std::ofstream fsai;

There are also a couple of changes that I think can be made to make it more portable, i.e. less version dependent

$ diff
< #include "octave-2.1.50/octave/oct.h"
> #include <octave/oct.h>
< #include "octave-2.1.50/octave/lo-mappers.h"
> #include <octave/lo-mappers.h>

$ diff Makefile-old Makefile
< mkoctfile-2.1.50 -L$(HOME)/lib -I$(HOME)/include -lstdc++-3-libc6.2-2-2.10.0
>    mkoctfile -L$(HOME)/lib -I$(HOME)/include

Geraint Bevan
Department of Mechanical Engineering
University of Glasgow
Tel: +44 (0)141 330 5917

Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]