VTK / Mayavi
To take part in this course, go to our registration page.
This course will introduce the participants to 3D visualization using Mayavi and VTK. Mayavi is an Open Source, Python package for general purpose 3D visualization. Mayavi uses VTK (http://www.vtk.org) under the covers and provides a very Python-friendly API. In particular, Mayavi provides the following features:
VTK is an extremely powerful visualization library. VTK contains close to 2000 classes that provides functionality for 3D graphics, visualization, and image processing. It provides visualization algorithms for scalar, vector, and tensor data. It is implemented in C++ and provides wrappers to several languages including Python.
The course will first start with using mayavi.mlab to quickly produce visualizations that are useful for scientists and engineers. VTK will then be introduced and covered in a little detail. VTK datasets will be explored in some detail. The commonly used VTK sources and filters will be explored. The course will then look at Mayavi in greater detail and introduce the participants to the traits package. Using this, participants will create their own dialogs and widgets that embed Mayavi in them. Some advanced Mayavi features like extending Mayavi with new sources and visualization modules will also be covered.
The course will be completely hands-on with plenty of exercises.
We hope to broadly cover the following areas.
All of these dependencies are available with:
All of these pre-packaged versions likely only support Mayavi/VTK on Python 2.x.
Mayavi-4.4.4 and VTK-7.x will support Python 3.4 and above but most package managers may not yet provide this. You will probably need to build it from source in this case.
Checking your installation
You should be able to run the following:
This should provide a standalone Mayavi application. On an IPython console you should be able to do the following:
>>> %gui qt >>> from mayavi import mlab >>> mlab.test_plot3d()
This should produce a Mayavi window with a plot that you can interact with. If this works you should be pretty well set.
Prabhu Ramachandran has been a faculty member at the department of Aerospace engineering, IIT Bombay, since 2005. His research interests are primarily in particle methods for fluid flow simulation and applied scientific computing. Along with his students, he has been building an open source framework for particle simulations called PySPH.
He has been active in the FOSS community for more than 15 years. He is the creator, author, and lead developer of the award winning Mayavi Python package. He is an active member of the SciPy community, and has been a fellow of the Python Software Foundation since 2010. He was the managing director of Enthought India between 2011 and 2013 and currently serves as a director of the company.