National Alliance for Medical Image Computing Anatomy of a plugin Common architecture for interactive and batch processing
National Alliance for Medical Image Computing Objectives Provide a simple mechanism for integrating user code with the rich user experience of Slicer3 Support GUI application processing Support batch processing
National Alliance for Medical Image Computing Grand vision User Desktop AlgorithmsITKVTK Slicer Modules VTK Apps Using ITK Scripts of Slicer Mods Batch Programs Non-NAMIC Cmd tools BatchMake BIRN Grid Wizard Slicer 3.0
National Alliance for Medical Image Computing Design Specification of parameters to control a plugin –Command line style parameter specification –XML description Automatic discovery process for plugins –Searchpath for plugins –Queries for XML description of parameters Automatic construction of GUI for plugins –Each parameter/attribute type maps to a specific style of GUI element Plugin writer focuses on algorithm, not GUI nor integration
National Alliance for Medical Image Computing Each module has … … an entry in the module menu … a panel of user interface controls
National Alliance for Medical Image Computing Plugin overview
National Alliance for Medical Image Computing Parameters | | | | | | | | | | | [type="scalar|label|tensor|diffusion-weighted|vector|model"] | [type="fiberbundle|model"] | [multiple="true|false"] [coordinateSystem="lps|ras|ijk"] | [multiple="true|false"] [coordinateSystem="lps|ras|ijk"]
National Alliance for Medical Image Computing Parameter description * C++ variable name of the parameter * Help message for parameter * GUI label for the parameter Default value * Single character flag, e.g. –f * Single word flag, e.g. --outputImage Block around minimum/maximum/step. Trigger a slider to be used. Minimum parameter value Maximum parameter value Step size * Input or output parameter (image, geometry, file, directory) * Position of a parameter without a flag. Starts at 0 * Block around element * Choice value for an enumeration * Required tags * Required under certain conditions
National Alliance for Medical Image Computing Behind the scenes Tasks queued for processing thread Three types of modules: –executable, –shared object, and –Python modules Scalar images sent via files for executables and memory* for shared objects and python Vector images, tensor images, geometry, tables, transforms sent via files Scalars, file names, directories, fiducials, regions sent via command line * VTK-based modules using scalar images are only supported as executable (command line) modules.
National Alliance for Medical Image Computing (Current) Limitations Limited/restricted access to Slicer3 internals Supported parameter types are prescribed by Slicer3 –Request new parameter types Some parameter types can only (currently) be sent to plugins, not returned from plugins Some parameters types are (currently) sent via files not mapped through memory Conditional parameter specification tricky Non-interactive Intermediate results not (currently) supported
National Alliance for Medical Image Computing The next level Full Slicer3 modules are also supported as plugins Model-view-controller design: Node, GUI, Logic Access to all Slicer3 services oExposed to Slicer3 architecture oBatch processing requires running all of Slicer3
National Alliance for Medical Image Computing Slicer3 Plugins Common architecture for interactive and batch processing