OpenIGTLink/Matlab
About the project
The objective of this project is to provide OpenIGTLink interface for Matlab / Octave to support research and development in image guided therapy (IGT). Matlab and Octave are widely used for prototyping image and signal processing algorithms. They also offers many powerful function set to handle matrix and coordinate data, which is useful to test and analyze coordinate data exported from tracking and robotic devices. The OpenIGTLink interface for Matlab / Octave allows importing and exporting several types of data that can be handled in the OpenIGTLink protocol in Matlab / Octave environment. It provides a rapid prototyping environment, which many researchers and engineers are already familiar with.
This project is a generalization of Slicer Matlab Pipeline project in the 2007 NA-MIC Project Week.
How does it work?
The OpenIGTLink Matlab interface is implemented as a set of MEX Files, which are C/C++ source codes called from Matlab. Those MEX files simply receives data from Matlab, connect to OpenIGTLink receiver, serialize the data in appropriate format using the OpenIGTLink Library, and send it to the receiver.
The usage of the interface is quite simple. The following example Matlab code is sending image data to the receiver waiting at port #18944 in the localhost.
%%% read image data fid = fopen('igtlTestImage1.raw', 'r'); I = fread(fid, [256 256], 'uint8')'; fclose(fid); %%% affine transform matrix M = [1.0, 0.0, 0.0, 0.0; 0.0,-1.0, 0.0, 0.0; 0.0, 0.0, 1.0, 0.0; 0.0, 0.0, 0.0, 1.0]; sd = igtlopen('localhost', 18944); r = igtlsend(sd, 'MatlabImage', I, M); igtlclose(sd);
How to Get Started
The OpenIGTLink/Matlab interface is in the initial stage of development. The source code is available from NA-MIC SandBox repository at
http://svn.na-mic.org/NAMICSandBox/trunk/BRPTools/MatlabIGTL
Currently neither configuration tools nor CMake configuration are available.. Please edit Makefile in the source directory and compile the MEX files using MEX compiler coming with Matlab.
Contact
We are not providing a support for this software, but questions and requests are always welcome. If you have any, please contact Junichi Tokuda at Brigham and Women's Hospital.