Matlab VTK Integration

VTK (Visualization Toolkit) developed by Kitware is a very useful visualization and computational tool. It’s features can be accessed from within Matlab and this page contains information about integrating VTK and Matlab via two separate methods. These methods have been developed with Matlab 6.1, Visual Studio .NET and VTK 4.x.

27Sept2003 A new addition to the C++ method is an automatic mex file generating system. Please see the README in the distribution for a description. It is a work in progress. In the meantime if somebody does create an update please do send an email to the address listed below. [Download VTK mexifier]

JAVA based calling One of the methods is to use the JAVA interface to access JAVA wrapped functions in VTK. John Anast has written a very nice document, which lists all the steps required to access VTK with the JAVA interface from Matlab. The files needed to access the interface are available on this page.

C++ mex file method While the JAVA method is nice and easy to use, garbage collection is not clean and often if one is transferring large amounts of data to and from the JAVA VM, it tends to add up and Matlab starts complaining about memory. Hence, a mexProject was created and VTK accessed through the C++ interface. This interface is cleaner and the code made available performs an isosurface extraction/decimation/smoothing and transferring the data from Matlab and back as faces/vertices structure.