Difference between revisions of "2013 Summer Project Week:CLI Matlab"

From NAMIC Wiki
Jump to: navigation, search
(Created page with '__NOTOC__ <gallery> Image:PW-SLC2013.png|Projects List Image:Matlabcommander.png| CLI module utilizing openigtlink to connect matlab server …')
 
Line 23: Line 23:
  
 
Implement a module that can run Matlab functions as a CLI. It should not require building of Slicer or a C++ compiler. Should be possible to install from an extension.
 
Implement a module that can run Matlab functions as a CLI. It should not require building of Slicer or a C++ compiler. Should be possible to install from an extension.
 
</div>
 
 
<div style="width: 40%; float: left;">
 
 
<h3>Progress</h3>
 
  
 
Create a Python script that generates the following scripts:
 
Create a Python script that generates the following scripts:
Line 37: Line 31:
 
* Matlab server: Matlab script that executes commands that it receives through OpenIGTLink. Already exists, was developed during the last project week.
 
* Matlab server: Matlab script that executes commands that it receives through OpenIGTLink. Already exists, was developed during the last project week.
 
* Helper Matlab functions: file I/O to read write image, model, transform, etc., maybe command-line parameter parsing (if the CLI parameters are all passed as a simple string; alternatively, the parameter string parsing may be done in the proxy script).
 
* Helper Matlab functions: file I/O to read write image, model, transform, etc., maybe command-line parameter parsing (if the CLI parameters are all passed as a simple string; alternatively, the parameter string parsing may be done in the proxy script).
 +
 +
</div>
 +
 +
<div style="width: 40%; float: left;">
 +
 +
<h3>Progress</h3>
 +
Matlab server already implemented (receives Matlab commands and sends back the results through OpenIGTLink)
  
 
</div>
 
</div>

Revision as of 01:34, 16 June 2013

Home < 2013 Summer Project Week:CLI Matlab

Key Investigators

  • Queen's: Andras Lasso
  • PMH, Toronto: Kevin Wang
  • Isomics: Steve Pieper

Objective

Allow easy implementation of CLI modules in Matlab.

Approach, Plan

Implement a module that can run Matlab functions as a CLI. It should not require building of Slicer or a C++ compiler. Should be possible to install from an extension.

Create a Python script that generates the following scripts:

  • Proxy: a Python CLI module (with a .bat executer on Windows), it returns the CLI description XML to Slicer during module discovery, it calls the Matlab stub script when Slicer executes the module. It may also start the Matlab server, if it's not running already.
  • Stub: a Matlab function that performs the actual processing. It receives the same parameters as the CLI module (input and output file names, numerical values, etc.), it reads the data from files (with helper file I/O functions), performs the computations, and writes results to files.

Other necessary components:

  • Matlab server: Matlab script that executes commands that it receives through OpenIGTLink. Already exists, was developed during the last project week.
  • Helper Matlab functions: file I/O to read write image, model, transform, etc., maybe command-line parameter parsing (if the CLI parameters are all passed as a simple string; alternatively, the parameter string parsing may be done in the proxy script).

Progress

Matlab server already implemented (receives Matlab commands and sends back the results through OpenIGTLink)

Delivery Mechanism

This work will be delivered to the NA-MIC Kit as part of the SlicerRT extension.

References