VTKPython and Other CS 526 Things - PowerPoint PPT Presentation

1 / 10
About This Presentation
Title:

VTKPython and Other CS 526 Things

Description:

Be open to sharing your setup knowledge with others at the appropriate time ... VTK-Python Setup. http://www.imaging.robarts.ca/~dgobbi/vtk/vtkpython.html ... – PowerPoint PPT presentation

Number of Views:46
Avg rating:3.0/5.0
Slides: 11
Provided by: aks79
Learn more at: http://www.evl.uic.edu
Category:

less

Transcript and Presenter's Notes

Title: VTKPython and Other CS 526 Things


1
VTK-Python andOther CS 526 Things
  • Allan Spale
  • aspale_at_evl.uic.edu

2
You Wont Have All the Answers
  • Its likely that no one else will know everything
    either
  • Dont be afraid to ask questions
  • Unless you like to spend 2 hours staring at the
    screen instead of doing something else
  • Some people are likely feeling the same way that
    you are
  • Be open to sharing your setup knowledge with
    others at the appropriate time
  • Some people are more than willing to help out

3
Why I Used Python with VTK
  • No segmentation faultswell, most of the time
  • Ports to all platforms
  • Interpreted language
  • Try stuff from the Python command lineexcept
    for GUI stuff
  • Weakly typed, object-orientated language
  • The tradeoff
  • Tkinter (the somewhat unpleasant UI toolkit with
    Python)
  • Could try wxPython bindings (there should be VTK
    support) http//www.wxpython.org

4
Python
  • Where to download the code/executables, read
    documentation
  • http//www.python.org
  • Use the Python editor (IDLE) or your favorite
    text editor
  • If you really like Windows and want to use
    Python
  • Download a nice IDE from http//www.activestate.or
    g
  • If you really like Java but want to try Python
  • Go to http//www.jython.org (Java implementation
    of Python)
  • Disclaimer I have not tried VTK and Jython

5
VTK-Python Setuphttp//www.imaging.robarts.ca/dg
obbi/vtk/vtkpython.html
  • Download and install/compile Python
  • Upside If you are using the CD from the book,
    Python is already there in a nice happy format
  • Downside Its oldPython 2.1
  • Downside If you feel adventurous and want to use
    wxPython (wxWindows), good luck trying to get a
    compatible version with the old Python
  • In the directory that Python is installed, make a
    file called VTK.pth
  • This text file should only contain the letters VTK

6
VTK-Python Setuphttp//www.imaging.robarts.ca/dg
obbi/vtk/vtkpython.html
  • Make a directory in the Python root directory
    called vtk.
  • Copy all the files and directories from
    vtk42\Wrapping\Python (or your appropriate path)
    to the vtk directory in the Python root directory
  • Follow the instructions in the README.txt file
    for installation option 3 (found at
    http//www.imaging.robarts.ca/dgobbi/vtk/vtkpytho
    n.html in the link named README.python)
  • This basically ends up calling python setup.py.in
    install...wherever the setup.py.in files are
    located.

7
VTK-Python Setuphttp//www.imaging.robarts.ca/dg
obbi/vtk/vtkpython.html
  • From vtk42\bin, I would just copy everything to
    the vtk directory of the Python root directory.
  • Windows note one could be more careful, but I
    did not feel like picking and choosing the
    not-so-obvious .dlls and .exes that did not have
    Python in the name
  • Make a system variable VTK_DATA_ROOT to
    correspond to the directory with the data for all
    the example files.
  • You will learn more by playing with the examples
    provided by VTK than you will reading
    documentation
  • The documentation is a bit difficult to
    understand
  • At first, its hard to find what you are looking
    for

8
Links of Hope
  • Repeating a useful VTK-Python link
  • http//www.imaging.robarts.ca/dgobbi/vtk/vtkpytho
    n.html
  • Has Python-VTK code examples
  • Allans VTK Tutorial
  • http//www.evl.uic.edu/aspale
  • Click on the link VTK Tutorial
  • Courtesy of Andys final from last year
  • Tkinter PDF
  • Do a Google search for An Introduction to
    Tkinter

9
And For Those of You Who Studied These Slides
  • Prepare beforehand for demo presentations
  • Slides should have a good style and be organized
    in a logical manner
  • Text should be easy to read
  • Style should not detract from the presentation
  • Bring a watch to carefully monitor how much time
    you are spending
  • Things break or do not work the first time
  • Have a backup plan
  • Take questions up-front while fixing things
  • Know when to give up if things wont work

10
Questions and Answers
Write a Comment
User Comments (0)
About PowerShow.com