[vtk-developers] ruby patch to vtk-5.0.0
David Gobbi
dgobbi at atamai.com
Sat Mar 11 12:59:48 EST 2006
Hi Seiya,
Wow! This is amazing. I downloaded the patch and was up-and-running with VTK-ruby very fast. It
would be very nice to see this become part of a future VTK release.
The patch is very complete, I can tell that it is based on the Python wrappers. The fact that you
included 82 examples (were these translated from the Python examples?) is very impressive.
To install on my Linux system I did the following, is this what you would recommend?
1) grabbed VTK-5-0 from CVS
2) cd VTK
3) patch -p1 < vtk-ruby-060306.patch
4) built VTK with cmake/make
5) cd Wrapping/Ruby
6) ruby setup.rb (as root)
7) installed the "narray-0.5.8" extension for ruby
8) set LD_LIBRARY_PATH to find the VTK "bin" directory
I do have two comments:
1) It should not require "narray", since "narray" is actually only used by two files:
vtk/util/vtkImageImportFromArray.rb and vtk/util/vtkImageExportToArray.rb.
It would be better if these two files were moved from "vtk/util" into "vtk/narray"
to make them optional.
2) You took the "vtk" prefix off of the classes. This does not always work, because
the "vtk3DSImporter" class becomes "3DSImporter" if you remove the "vtk". This
leads to a syntax error:
$> ruby RenderLargeImage.rb
RenderLargeImage.rb:21: syntax error, unexpected tINTEGER
importer = Vtk::3DSImporter.new
I think you need to leave the "vtk" prefix on the classes to avoid this, even if
it looks a bit ugly.
Other than that, the wrappers are excellent! If they included Tk widget
support, they would be as complete as the Python and Tcl wrappers.
Cheers!
- David
--- Seiya Nishizawa <seiya at kugi.kyoto-u.ac.jp> wrote:
> Hi all,
>
> I made ruby patch to vtk-5.0.0.
> It makes Ruby wrapper.
> Ruby is the interpreted scripting language for quick and easy object-oriented programming.
> (http://www.ruby-lang.org/en/)
>
> The patch is at
> http://www.gfd-dennou.org/arch/ruby/products/ruby-vtk/index.html
>
> I tested it on linux, and Windows (+Visual Studio 8 Express).
>
> Please try it, if you are interested in.
>
> Thanks,
>
> Seiya Nishizawa
>
> --------------
> Seiya Nishizawa
> seiya at kugi.kyoto-u.ac.jp
> GnuPG Fingerprint = 0696 D312 5737 929A B481 FC91 44F4 6BA0 467A 7703
> _______________________________________________
> vtk-developers mailing list
> vtk-developers at vtk.org
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
More information about the vtk-developers
mailing list