octave-maintainers
[Top][All Lists]
Advanced

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

Re: Nd cell array


From: Philipp.Batchelor
Subject: Re: Nd cell array
Date: Fri, 05 Mar 2004 16:31:09 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113

David,
great, thanks a lot for the answers! it's exactly what I needed.
I didn't know that 3D arrays were available in the newest version, I'll download and install asap then.



Maybe I can give a bit of background on what I'm trying to do.
vtk (Visualisation Toolkit) http://www.vtk.org is a quite popular computer graphics C++ library, traditionally used with Tcl, Python, or recently Java, wrapping. I came across instructions for using the Java wrapping to load vtk classes into Matlab, (cf http://www.cns.bu.edu/~speech/VTK.php) which sounded like the 'best of both wolrds' for me. So the issue became, how does one load vtk into Matlab, and as I just bought a laptop and put Redhat 9 on it, which came with Octave, I the same question arises for Octave.

There are different possibilities:
1) Matlab can use a java virtual machine, hence can read any java class, hence without too much effort (actually it wa a lot, but wel...), one can load any vtk class into Matlab. As far as I can see, this solution doesn't extend yet to Octave. There are problems with memory management. 2) The same person who created the java solution was unhappy with it, so created a 'vtkmexifier' which I had adapted to Octave, but this is limited to vtk pipelines I think.

3) Writing directly C++ code which links to vtk, and loads into Octave, (this would be much harder in Matlab I suppose). I will try to write a volume renderer as a test.

Thanks again
Ph


David Bateman wrote:
According to David Bateman <address@hidden> (on 03/04/04):

  for (int i=0; i < dv(0); i++)
    for (int j=0; j < dv(1); j++)
      for (int k=0; k < dv(2); k++)
        m (i, j, k) = ...;


of course that should read

    for (int i=0; i < dv.numel (); i++)
      m(i) = ...;




reply via email to

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