VTK/PythonDevelopment

From KitwarePublic
< VTK
Revision as of 19:34, 16 April 2012 by Amaclean (talk | contribs) (Created page with "=== VTK Eclipse/Pydev === Eclipse with Pydev provides a good development environment for developing Python scripts for VTK. You get Syntax checking/highlighting and code completi...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

VTK Eclipse/Pydev

Eclipse with Pydev provides a good development environment for developing Python scripts for VTK. You get Syntax checking/highlighting and code completion and debugging. However in order to integrate VTK we need to do a few extra steps.

This article will tell you you how to set up the development environment for Windows, Linux and MacOSX.

The folowing discussion assumes that the environment variables have been set and that the user is familiar with or willing to learn the Eclipse IDE.

Environment variables for Linux/MacOS

You must set KITWARE_PATH to the root path of your VTK build, for example '/home/username/Code/Kitware'.

#Kitware
export KITWARE_PATH=/home/username/Code/Kitware

# VTK
export VTK_DATA_ROOT=$KITWARE_PATH/src/VTKData
export VTK_LARGE_DATA_ROOT=$KITWARE_PATH/src/VTKLargeData
export VTK_ROOT=$KITWARE_PATH/src/VTK
# 
export VTK_DIR=$KITWARE_PATH/build/VTK
# For VTK TCL programs.
export TCLLIBPATH='$VTK_DIR/Wrapping/Tcl'
alias vtk='$VTK_DIR/bin/vtk'
# For VTK Python programs.
alias vtkpython='$VTK_DIR/bin/vtkpython'
export PYTHONPATH=$PYTHONPATH:$VTK_DIR/Wrapping/Python:$VTK_DIR/lib

Then do:

source ~/.bashrc