help-octave
[Top][All Lists]
Advanced

[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 http://www.cefala.org/~nwerneck/programas/vtksurf

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

++nicolau;



Very nice!

I had to rename vtksurf-0.1.cc to vtksurf.cc and modify the file slightly to get it to compile with g++ 3.3.1


$ diff vtksurf-0.1.cc vtksurf-0.3.cc
15c15
< 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.\
22c22
<    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 vtksurf-0.3.cc vtksurf-0.4.cc
7c7
< #include "octave-2.1.50/octave/oct.h"
---
> #include <octave/oct.h>
11c11
< #include "octave-2.1.50/octave/lo-mappers.h"
---
> #include <octave/lo-mappers.h>


$ diff Makefile-old Makefile
3c3
< mkoctfile-2.1.50 vtksurf.cc -L$(HOME)/lib -I$(HOME)/include -lstdc++-3-libc6.2-2-2.10.0
---
>    mkoctfile vtksurf.cc -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:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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