Title: Slicer 3.0 Architecure
1Slicer 3.0 Architecure
User Desktop
Algorithms
ITK
VTK
Slicer Modules
Slicer 3.0
Scripts of Slicer Mods
VTK Apps Using ITK
Batch Programs
Non-NAMIC Cmd tools
LONI Pipeline
Birn Grid Data/Compute
2Slicer 3 Architecture Diagram (2006-01-26)
Base
Execution Model Manager
(Managed by Base and communicats like other
Modules)
Auto-Generated GUIs from JSON Descriptions
Logic Links to ITK MRML VTK (except Rendering)
GUI Links to VTK Rendering KWWidgets
Logic Links to Base Logic
GUI Links to KWWidgets
Mediators
Mediators
Observe Modified Events
MRML
- Provides
- Frames for Widgets,
- Routing of User Events
Observe Modified Events on Application State
Edit Mrml Scene/Nodes
Formulates Command Line and possibly stages data
- Registers GUI Event Observers
Interactive Module
Describe Input options
Observe Modified Events
Logic Links to Base Logic ITK MRML VTK (except
Rendering)
GUI Links to VTK Rendering KWWidgets
Mediators
Edit Mrml Scene/Nodes
- External
- Processes (Grid/Pipeline)
- Speak MRML
- (link to libmrml
- or have data staged by slicer)
- Uses the JSON interface
MRML Aware Processes Can Edit Mrml
Scene/Nodes and Observe Modified Events
- Notes
- All classes in the Logic directory should be able
to run headless without OpenGL or window system
for scripting and testing - Base/Logic contains transient application state
(cursor location, focus, mrml scene connection) - Interactive Modules are ones which interact with
the VTK scene and/or User events - Interactive Modules interact with 3D scene by
creating objects in MRML scene (not by direct
manipulation of the Renderer) - Logic classes encapsulate and manage internal
vtk/itk pipelines - GUI classes are implemented as KWWidget
subclasses - Each Logic class defines a set of Get/Set methods
for internal state and Modified Events that GUI
classes can Observe
3Main program Bootstrap application logic,
Create application gui
data layer
data mediator
logic layer
gui mediator
gui layer
(VTK, ITK, no KWWidgets, no VTKRendering) vtkObjec
t vtkSlicerLogic - Undo manager, -
tracing vtkSlicerApplicationLogic - MRML
slice - transient state - open
views, slices, modules
(and active) - cursor location -
version - focus, event routing vtkSlicerVie
wLogic vtkSlicerLinkedSliceLogic vtkSliceLogic
- vtkImageReslice - vtkImageComposite vtk
SlicerSliceLayerLogic - MRML node -
Opacity - Compositing -
Window/level vtkSlicerViewLogic vtkSlicerModuleLog
ic - Undo/tracing helpers vtkSlicerEditorLo
gic vtkSlicerMRMLLogic vtkSlicerCustomModuleLogic
vtkKWWidget vtkSlicerGUI - look feel?
- set command helpers? vtkSlicerApplicationGUI
- connect to window system -
vtkKWApplication - vtkKWWindow vtkSlicerView
GUI - Render windows - mappers,
actors vtkSlicerSliceGUI - vtkImageMapper
- vtkKWRenderWindow vtkSlicerSliceLogicG
UI vtkSlicerModuleGUI vtkSlicerCustomModu
leGUI
GUI code adds observers to modified events
generated by/to logic
Logic code adds modified event observers to MRML
scene and MRML nodes.
MRML data model
Apply methods from GUI classes call set method in
logic to change state
Logic methods apply changes to the MRML scene.
VTK pipeline
VTK pipeline
4Slicer Daemon
- Slicerd listens on local socket
- slicerget ltidgt
- gets volume and writes to stdout in nrrd
- slicerput name
- reads nrrd on stdin and puts in slicer
slicerget 0 unu 1op exp - slicerput
5ITK IO and Slicer Daemon
AntiAliasBinaryImageFilter.exe bunny.z.nrrd " sh
slicerput.tcl"
6Undo Architecture for Slicer3
- Versioning Commit Aside Strategy Encapsulated
within MRML - Store Initial Scene (from file) and Delta
Scenes (scenes containing undoable changes) - Delta Scenes are MRML Scenes
- Some Nodes are Reference Nodes
- Setting the MRML scene in the Application Logic
causes the cascade of observer callbacks - gt All Undoable operations must store their data
as MRML nodes
7Undo 1st Pass
Application Logic
Undo Stack
Initial Scene
Delta1 Scene
Delta2 Scene
Saved Scene
N1
R
R
N1
N2
N4
R
N4
N3
R
N5
N5
8Undo Current
MRML Scene
Undo Stack
Initial Scene
Delta1 Scene
Delta2 Scene
Saved Scene
N1
N1
N2
N4
N4
N3
N5
N5
9Slice Management
Volume Display Node
Volume Node
Foreground Slice Layer Logic
Volume Display Node
Volume Node
Background Slice Layer Logic
Slice Node
Slice GUI
Slice Logic
Slice Composite Node
10Slice Coordinates
RASToRAS Transforms
SliceToRAS Matrix
XYToSlice Matrix
RASToIJK Matrix
RAS to RAS Coordinates
Slice Coordinates
XY Image Space Coordinates
IJK RASToIJK RASToRAS SliceToRAS
XYToSlice XY
IJK Volume Coordinates