1 / 20

3D Slicer

3D Slicer. Modules and Extensions Steve Pieper, Ph.D. How Modules Should Work. Slicer 3.4 is a Stable Base for Many Medical Image Computing Apps Core File I/O, Visualization, Interface… Tutorials and Other Resources to Get New Users Up to Speed

rigel-head
Télécharger la présentation

3D Slicer

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 3D Slicer Modules and Extensions Steve Pieper, Ph.D.

  2. How Modules Should Work Slicer 3.4 is a Stable Base for Many Medical Image Computing Apps Core File I/O, Visualization, Interface… Tutorials and Other Resources to Get New Users Up to Speed Developers of New Techniques can Draw on the NA-MIC Kit to Implement Compatible Modules Consistent Framework for Deployment and User Interface Several Styles of Development to Meet Varied Requirements

  3. Slicer3 data model Provided by D. Gering Provided by R. Kikinis

  4. Slicer3 “Observer MVC” Pattern MRML (Model) For Scene Description and Application State MRML Nodes are Persistent and Undoable Scene and Nodes are Observable Logic Encapsulate VTK and ITK Pipelines (Controller) Observe MRML to Configure Pipelines Help Create/Manage Nodes No UI Components (no Widgets, Actors, Mappers, Renderers or RenderWindows) GUI (View) Observe and Edit MRML Interact with User and Display Hardware Modules Should Follow Same Conventions GUI Renderers Widgets Edit Observe Logic Observe Edit Observe Edit MRML Nodes “Observe” means generic event mechanisms are used to pass information. “Edit” means code can directly call methods. Example: GUI can call methods in Logic classes,but Logic cannot call GUI methods. MRML cannot call Logic or GUI methods. There can be many observers for any event.

  5. Variety of levels of integration

  6. Base Features vs. Modules

  7. Each module has … … an entry in the module menu … a panel of user interface controls

  8. Built in module Slicer provided Module writer provided vtkMRMLNode.h vtkSlicerModuleGUI.h vtkSlicerModuleLogic.h • vtkSlicerYourModuleGUI.h • BuildGUI() • ProcessGUIEvents() • ProcessLogicEvents() • ProcessMRMLEvents() • vtkMRMLYourModuleNode.h • GetNodeTagName() • Copy() • ReadXMLAttributes() • WriteXML() • vtkSlicerYourModuleLogic.h • ProcessMRMLEvents() • ProcessLogicEvents()

  9. Loadable module Slicer provided Module writer provided vtkMRMLNode.h vtkSlicerModuleGUI.h vtkSlicerModuleLogic.h • vtkSlicerYourModuleGUI.h • BuildGUI() • ProcessGUIEvents() • ProcessLogicEvents() • ProcessMRMLEvents() • vtkMRMLYourModuleNode.h • GetNodeTagName() • Copy() • ReadXMLAttributes() • WriteXML() • vtkSlicerYourModuleLogic.h • ProcessMRMLEvents() • ProcessLogicEvents() • YourModule.so • GetLoadableModuleDescription() • GetLoadableModuleLogic() • GetLoadableModuleGUI()

  10. Tcl scripted module Slicer provided Module writer provided vtkMRMLScriptedModuleNode.h vtkSlicerScriptedModuleGUI.h vtkSlicerScriptedModuleLogic.h YourModuleNode.tcl • YourModuleGUI.tcl • proc YourModuleBuildGUI • proc YourModuleProcessGUIEvents • proc YourModuleProcessLogicEvents • proc YourModuleProcessLogicEvents YourModuleLogic.tcl • YourModule.tcl • package provide YourModule x.y

  11. Python scripted module Slicer provided Module writer provided vtkMRMLScriptedModuleNode.h vtkSlicerScriptedModuleGUI.h vtkSlicerScriptedModuleLogic.h • YourModuleGUI.py • def BuildGUI() • def ProcessGUIEvents() • def ProcessLogicEvents() • def ProcessLogicEvents() • YourModuleLogic.py • Optional Helper Code • YourModuleNode.py • Optional State Management

  12. Command line module Slicer provided Module writer provided vtkMRMLCommandLineModuleNode.h vtkCommandLineModuleGUI.h vtkCommandLineModuleLogic.h • YourModule.xml • <image> • <geometry> • <integer> • <double> • <file> • YourModule.py • XML • def toXML() • def Execute() • YourModule (exe) • YourModule –xml • YourModule.so • XMLModuleDescription • GetXMLModuleDescription() • ModelEntryPoint() or or

  13. All modules are created equal… … an entry in the module menu … a panel of user interface controls

  14. Daemons YourTool (exernal process such as MATLAB) slicerget.tcl name > image.nrrd SlicerDaemon cat image.nrrd | slicerput.tcl name YourTool (exernal process such as Tracker or Scanner) OpenIGTLink Protocol OpenIGTLinkIF

  15. Variety of levels of integration

  16. Extension Goals • Keep the base package “lean and mean” • Modules have individual identity • Per-module web site, svn, downloads, mailing lists, wiki… • Allow users to assemble their own set of tools • Customized ‘Bundles’ by task or application • Easy to download compatible extensions • Analogous to Firefox extensions • Integrate extension builds into developer/nightly/release process • NITRC Supplement to NA-MIC helping to pay for needed infrastructure (Neuroimaging Informatics Tools and Resources Clearinghouse) • NITRC can host neuroimaging projects (gforge implementation) • Other repositories can also be used • NAMICSandBox, Institution’s svn, Google Code, etc…

  17. Extension Management Wizard* * Under development

  18. NITRC http://www.nitrc.org/projects/slicer3examples/ Sample Code for CommandLine, Loadable, and Scripted Extension Modules

  19. Extension Process Write your module following the examples on nitrc.org Create .s3ext description file http://viewvc.slicer.org/viewcvs.cgi/trunk/Extensions/ Svn path, dependencies, homepage, category, status, description… Nightly builds create compatible sets of extension binaries that correspond to the slicer builds (windows, linux, mac) Correct lib versions, compiler versions, etc Users can install from Extension Manager

  20. CTK Issues Can some or all Slicer Module types be interoperable with other CTK Tools Automatic Adaptors? What will be the CTK Preferred Module Implementation? Web Services? daemons? OSGi?...

More Related