+ All Categories
Home > Documents > National Alliance for Medical Image Computing Integrating with Slicer3.

National Alliance for Medical Image Computing Integrating with Slicer3.

Date post: 27-Mar-2015
Category:
Upload: anna-ruiz
View: 218 times
Download: 1 times
Share this document with a friend
Popular Tags:
21
National Alliance for Medical Image Computing http://na-mic.org Integrating with Slicer3
Transcript
Page 1: National Alliance for Medical Image Computing  Integrating with Slicer3.

National Alliance for Medical Image Computing http://na-mic.org

Integrating with Slicer3

Page 2: National Alliance for Medical Image Computing  Integrating with Slicer3.

National Alliance for Medical Image Computing http://na-mic.org

NA-MIC Kit Goals

• Software and Methodologies for Medical Image Computing– Facilitate Research

– Promote Interoperability

• Stable, Cross-Platform Run Time Environment– Full Set of Core Features

– Avoid Duplicated Effort

• Flexible Module Architecture– Plug-ins should be As Simple As Possible

Page 3: National Alliance for Medical Image Computing  Integrating with Slicer3.

National Alliance for Medical Image Computing http://na-mic.org Provided by D. Gering

Slicer3 data model

Page 4: National Alliance for Medical Image Computing  Integrating with Slicer3.

National Alliance for Medical Image Computing http://na-mic.org

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

Logic

MRML Nodes

GUI

Widgets Renderers

EditObserve

Observe

Observe

Edit

Edit

“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.

Page 5: National Alliance for Medical Image Computing  Integrating with Slicer3.

National Alliance for Medical Image Computing http://na-mic.org

Variety of levels of integration

Slicer Libs

• ModuleDescriptionParser• GenerateCLP• vtkITK• MRML

Non-slicer specific support libraries

Slicer Base• Application logic• Widgets

Common infrastructure for Slicer applications

Built in modules

• Slice viewers• Models• Fiducials• Transforms

Full access to Slicer internals

Loadable modules

• Query Atlas• QDEC• Volume rendering• ChangeTracker• EMSegment

Full access to Slicer internals

Scripted modules• Editor• Teem Two Tensor Tractography• VMTK

Limited access to Slicer internals

Command line modules • Registration Restricted access to Slicer internals

Daemon• OpenIGTLink• Stochastic Tractography

Access to MRML

Page 6: National Alliance for Medical Image Computing  Integrating with Slicer3.

National Alliance for Medical Image Computing http://na-mic.org

Base Features vs. Modules

Features Base ModulesVisualization MRML: Models, Volumes, Volume Rendering, Fiducials,

Continuum Meshes, Labeled DataCan create custom MRML Nodes and behavior

Filtering None Implemented as Modules using ITK or other Libraries

Registration Transform Display and Edit, Save/Restore Calculate Transforms, Resample Data

Segmentation Label Maps, Parcellated Surfaces Segmentation Algorithms in ITK or other Libraries

Quantification Label, Image, Volume Statistics; Numpy access to MRML

Applications in Python or MATLAB

Real-time Integration VTK Rendering, KWWidgets framework, Tracker Support (as Transforms)

Direct Manipulation of the MRML Scene; 2D/3D Widgets; Device Interfaces, OpenIGTLink Module

Diffusion Imaging DWI, DTI, Fiber Bundles Tractography, Clustering, Atlases

Applications “Bundles” of Modules in Distribution: Registration, Editor, some Filters,

Customized Extensions, Domain-specific code, Optimized Interfaces…

Page 7: National Alliance for Medical Image Computing  Integrating with Slicer3.

National Alliance for Medical Image Computing http://na-mic.org

Each module has …

… an entry in the module menu

… a panel of user interface controls

Page 8: National Alliance for Medical Image Computing  Integrating with Slicer3.

National Alliance for Medical Image Computing http://na-mic.org

Built in module

vtkMRMLNode.h vtkSlicerModuleGUI.h vtkSlicerModuleLogic.h

vtkMRMLYourModuleNode.h•GetNodeTagName()•Copy()•ReadXMLAttributes()•WriteXML()

vtkSlicerYourModuleGUI.h•BuildGUI()•ProcessGUIEvents()•ProcessLogicEvents()•ProcessMRMLEvents()

vtkSlicerYourModuleLogic.h•ProcessMRMLEvents()•ProcessLogicEvents()

Slicer provided

Module writer provided

Page 9: National Alliance for Medical Image Computing  Integrating with Slicer3.

National Alliance for Medical Image Computing http://na-mic.org

Loadable module

vtkMRMLNode.h vtkSlicerModuleGUI.h vtkSlicerModuleLogic.h

vtkMRMLYourModuleNode.h•GetNodeTagName()•Copy()•ReadXMLAttributes()•WriteXML()

vtkSlicerYourModuleGUI.h•BuildGUI()•ProcessGUIEvents()•ProcessLogicEvents()•ProcessMRMLEvents()

vtkSlicerYourModuleLogic.h•ProcessMRMLEvents()•ProcessLogicEvents()

YourModule.so•GetLoadableModuleDescription()•GetLoadableModuleLogic()•GetLoadableModuleGUI()

Slicer provided

Module writer provided

Page 10: National Alliance for Medical Image Computing  Integrating with Slicer3.

National Alliance for Medical Image Computing http://na-mic.org

Qt Loadable Module

http://wiki.slicer.org/slicerWiki/images/b/bc/QtPortInSlicer.ppt

vtkMRMLNode.h qSlicerAbstractModuleWidget.h qSlicerAbstractModuleLogic.h

vtkMRMLYourModuleNode.h•GetNodeTagName()•Copy()•ReadXMLAttributes()•WriteXML()

qSlicerYourModuleWidget.h•initialize()•showModuleAction()•setup()•setLogic()

qSlicerYourModuleLogic.h•initialize()•setup()

Q_EXPORT_PLUGIN2(qSlicerYourModule, qSllicerYourModule);

Slicer provided

Module writer provided

qSlicerYourModule.ui

qSlicerAbstractModule.h

qSlicerYourModule.h•showModuleAction()•setup()•setLogic()

qSlicerYourModule.qrc

QtPlugins

Page 11: National Alliance for Medical Image Computing  Integrating with Slicer3.

National Alliance for Medical Image Computing http://na-mic.org

Tcl scripted module

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

Slicer provided

Module writer provided

Page 12: National Alliance for Medical Image Computing  Integrating with Slicer3.

National Alliance for Medical Image Computing http://na-mic.org

Python scripted module

vtkMRMLScriptedModuleNode.h

vtkSlicerScriptedModuleGUI.h

vtkSlicerScriptedModuleLogic.h

YourModuleGUI.py•def BuildGUI()•def ProcessGUIEvents()•def ProcessLogicEvents() •def ProcessLogicEvents()

Slicer provided

Module writer provided

Page 13: National Alliance for Medical Image Computing  Integrating with Slicer3.

National Alliance for Medical Image Computing http://na-mic.org

Command line module

vtkMRMLCommandLineModuleNode.h

vtkCommandLineModuleGUI.h

vtkCommandLineModuleLogic.h

YourModule.xml•<image>•<geometry>•<integer>•<double>•<file>

YourModule.so•XMLModuleDescription•GetXMLModuleDescription()•ModelEntryPoint()

Slicer provided

Module writer provided

YourModule (exe)•YourModule –xml

YourModule.py•XML•def toXML()•def Execute()

or or

Page 14: National Alliance for Medical Image Computing  Integrating with Slicer3.

National Alliance for Medical Image Computing http://na-mic.org

All modules are created equal…

… an entry in the module menu

… a panel of user interface controls

Page 15: National Alliance for Medical Image Computing  Integrating with Slicer3.

National Alliance for Medical Image Computing http://na-mic.org

Extensions

• 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 processs

• NITRC Supplement to NA-MIC helping to pay for needed infrastructure (Neuroimaging Informatics Tools and Resources Clearinghouse)

– NITRC can host neuroimaging projects (gforge implementation)

Page 16: National Alliance for Medical Image Computing  Integrating with Slicer3.

National Alliance for Medical Image Computing http://na-mic.org

Extensions distribution

Page 17: National Alliance for Medical Image Computing  Integrating with Slicer3.

National Alliance for Medical Image Computing http://na-mic.org

Extension module

Page 18: National Alliance for Medical Image Computing  Integrating with Slicer3.

National Alliance for Medical Image Computing http://na-mic.org

Daemon

slicerget.tcl name > image.nrrd

cat image.nrrd | slicerput.tcl name

YourTool

Page 19: National Alliance for Medical Image Computing  Integrating with Slicer3.

National Alliance for Medical Image Computing http://na-mic.org

Variety of levels of integration

Slicer Libs

• ModuleDescriptionParser• GenerateCLP• vtkITK• MRML

Non-slicer specific support libraries

Slicer Base• Application logic• Widgets

Common infrastructure for Slicer applications

Built in modules

• Slice viewers• Models• Fiducials• Transforms

Full access to Slicer internals

Loadable modules

• Query Atlas• QDEC• Volume rendering• ChangeTracker• EMSegment

Full access to Slicer internals

Scripted modules• Editor• Teem Two Tensor Tractography• VMTK

Limited access to Slicer internals

Command line modules • Registration Restricted access to Slicer internals

Daemon• OpenIGTLink• Stochastic Tractography

Access to MRML

Page 20: National Alliance for Medical Image Computing  Integrating with Slicer3.

National Alliance for Medical Image Computing http://na-mic.org

By the numbers…

Page 21: National Alliance for Medical Image Computing  Integrating with Slicer3.

National Alliance for Medical Image Computing http://na-mic.org

Future

• More Qt• More Python, more numpy• Interactive modules to fill gap between Loadable Modules

and Command Line Modules– Restricted access to Slicer internals

– Simple methods to control interaction and display


Recommended