To get up and running quickly on your Debian system we just need to follow the following steps:
Add the following to your/etc/apt/sources.list:deb ftp://www.gfd-dennou.org/arch/ruby/products/debian stableRun
apt-get update to update your apt sources, then we will apt-get to install the necessary packages to run Ruby-VTK.apt-get intall rubyapt-get install libvtk4apt-get install libvtk4-devapt-get install vtkdataapt-get intall ruby-vtkOnce we have all the needed software via our package manager we need to make some changes to our environment.
Add these lines to your profile:
VTK_DATA_ROOT="/usr/share/data"export VTK_DATA_ROOTWe are now ready to run our first Ruby-VTK script! We need to grab the examples from the Dennou site, they can be found in the source tarball on the Ruby-VTK page.
wget http://www.gfd-dennou.org/arch/ruby/products/ruby-vtk/vtk-ruby-060413.tar.gztar zxvf vtk-ruby-060413.tar.gzcd vtk-ruby-060413cd samples/Medical
ruby Medical3.rbpretty neat eh? This will get you started with Ruby-VTK on Debian. After my VTK textbook arrives, I will be posting various manipulations of datasets… with Ruby of course!
Tags: hacks, toolsofthetrade
Filed Under: