Difference between revisions of "Documentation/Nightly/Extensions/MatlabBridge"
(Removed nightly build warning for MatlabBridge (it's available in the stable release now)) |
|||
Line 72: | Line 72: | ||
* Issue tracker: [https://www.assembla.com/spaces/dG15GuCs4r4l4UeJe5cbCb/tickets/report/u783013 open issues and enhancement requests] | * Issue tracker: [https://www.assembla.com/spaces/dG15GuCs4r4l4UeJe5cbCb/tickets/report/u783013 open issues and enhancement requests] | ||
* Design overview: [https://subversion.assembla.com/svn/slicerrt/trunk/MatlabBridge/doc/MatlabBridgeDesign.pptx]. | * Design overview: [https://subversion.assembla.com/svn/slicerrt/trunk/MatlabBridge/doc/MatlabBridgeDesign.pptx]. | ||
− | + | * Running Matlab modules without accessing a Matlab license: You can run your Matlab modules on a computer that does not have Matlab license. You just have to use the Matlab compiler to include all the MatlabBridge CommandServer functions (https://subversion.assembla.com/svn/slicerrt/trunk/MatlabBridge/src/MatlabCommander/commandserver/) and your custom .m files as Shared Resources and choose cli_commandserver.m as "Main File". To run the Matlab modules just start the compiled MCR executable. | |
− | Tested with Matlab R2009b, R2012a, and R2013a on Windows7. | + | * Tested with Matlab R2009b, R2012a, and R2013a on Windows7. |
<!-- ---------------------------- --> | <!-- ---------------------------- --> |
Revision as of 22:52, 20 November 2013
Home < Documentation < Nightly < Extensions < MatlabBridge
For the latest Slicer documentation, visit the read-the-docs. |
Introduction and Acknowledgements
Author: Andras Lasso (PerkLab, Queen's University), Jean-Christophe Fillion-Robin (Kitware), Kevin Wang (Radiation Medicine Program, Princess Margaret Hospital, University Health Network Toronto), Gabor Fichtinger (PerkLab, Queen's University)
Contact: Andras Lasso, <email>lasso@cs.queensu.ca</email>
Project website: http://www.slicerrt.org
License: Slicer license
|
Extension Description
MatlabBridge is an extension of 3D Slicer to allow running Matlab functions directly in 3D Slicer. Highlights:
The Matlab module behaves exactly as any other command-line-interface module, the Matlab engine is started automatically in the background (and it is kept running in the background so that you don’t have to wait for Matlab startup each time you run your function) Demo videos: |
Modules
- Matlab Module Generator (in the module list: Developer Tools / Matlab)
- Matlab Commander (in the module list: Developer Tools / Matlab)
Use Cases
Tutorials
Information for Developers
- Source code: https://subversion.assembla.com/svn/slicerrt/trunk/MatlabBridge/
- Issue tracker: open issues and enhancement requests
- Design overview: [1].
- Running Matlab modules without accessing a Matlab license: You can run your Matlab modules on a computer that does not have Matlab license. You just have to use the Matlab compiler to include all the MatlabBridge CommandServer functions (https://subversion.assembla.com/svn/slicerrt/trunk/MatlabBridge/src/MatlabCommander/commandserver/) and your custom .m files as Shared Resources and choose cli_commandserver.m as "Main File". To run the Matlab modules just start the compiled MCR executable.
- Tested with Matlab R2009b, R2012a, and R2013a on Windows7.
Troubleshooting
- Problem: When I try to run my Matlab module, the Matlab process does not start (Matlab window does not appear on the taskbar)
- Solution [on Windows Vista/7/8]: Please go to the Matlab module generator module and in the “Matlab executable” editbox set the path to your “.../bin/matlab.exe” (not to "activate_matlab.exe" or other exe files in the Matlab program directory or any file in the bin/win64 directory).
- Problem: When I try to run my Matlab module, the Matlab process starts (Matlab window appears on the taskbar and it displays the message "Starting OpenIGTLink command server at port 4100 Waiting for client connections..."), but the Matlab module execution fails (in the Slicer error log the "igtl::ClientSocket (...): Failed to connect to server 127.0.0.1:4100" message is displayed)
- Solution [on Windows Vista/7/8]: Firewall settings prevent Matlab-Slicer communication. Please add a firewall exception by the following steps:
- Start cmd.exe as administrator (open the Windows Start menu, type "cmd", hit Ctrl + Shift + Enter)
- Click Yes, if a dialog box appears asking "Do you want to allow the following program to make changes to this computer?"
- Enter the following command: netsh firewall add portopening tcp 4100 MatlabBridge
- Solution [on Windows Vista/7/8]: Firewall settings prevent Matlab-Slicer communication. Please add a firewall exception by the following steps:
- Problem: module execution is not completed
- Solution: make sure you've selected .../MATLAB/.../bin/matlab.exe as Matlab executable (and not .../MATLAB/.../bin/win64/MATLAB.exe)