Friday, February 19, 2010

How to get VTK working in Eclipse

EDIT: These links seem to be down. This is bad.

Although I mentioned in this post that VTK was too complex and powerful for what we needed, I have decided that it might be a viable option after all. I was able to get it working in eclipse using the following process.

Thanks to the guys at http://dev.artenum.com/ for most of this information.

1. Download the latest Cassandra release from here.
2. Run the installer.
3. Open a project in eclipse
4. Add vtk.jar to your build path
  • right click on the root project
  • click 'properties'
  • click 'libraries'
  • click 'add external jar'
  • Add 'vtk.jar' which can be found in '\Cassandra\thirdpart\vtk5.0-32b\bin'
5. Edit your run configuration
  • click the drop-down arrow next to the green run button
  • click 'Run Configuration'
  • In the right hand pane, expand 'Java Application'
  • choose your project
  • click the 'environment' tab
  • click 'New' to create a new environment variable
  • name the variable 'PATH'
  • set its value to the absolute path (include drive letter etc...) of '\Cassandra\thirdpart\vtk5.0-32b\bin'
Everything should work now. Here is some sample code (also taken from http://dev.artenum.com)

Thanks again to http://dev.artenum.com. Original article.

No comments:

Post a Comment