Slicer3 Architecture.

Slides:



Advertisements
Similar presentations
National Alliance for Medical Image Computing User Desktop Slicer 3.0 Architecure AlgorithmsITKVTK Slicer Modules VTK Apps Using ITK.
Advertisements

National Alliance for Medical Image Computing Slicer3 Architecture.
National Alliance for Medical Image Computing Slicer3 plugins Common architecture for interactive and batch processing.
National Alliance for Medical Image Computing Slicer MRML MRML Library provides API for managing medical image data types (Volumes, Models,
National Alliance for Medical Image Computing Anatomy of a plugin Common architecture for interactive and batch processing.
NA-MIC National Alliance for Medical Image Computing 3D Slicer Interactive Modules Steve Pieper, PhD.
OOP Design Patterns Chapters Design Patterns The main idea behind design patterns is to extract the high level interactions between objects and.
National Alliance for Medical Image Computing User Desktop Slicer 3.0 Architecure AlgorithmsITKVTK Slicer Modules VTK Apps Using ITK.
Object-Oriented Analysis and Design
Design Patterns academy.zariba.com 1. Lecture Content 1.What are Design Patterns? 2.Creational 3.Structural 4.Behavioral 5.Architectural 6.Design Patterns.
1 ParaView Current Architecture and History Current Architecture and History Issues with the Current Design Issues with the Current Design.
NA-MIC National Alliance for Medical Image Computing Slicer4 Guided Tour Steve Pieper, Ph.D.
NA-MIC National Alliance for Medical Image Computing Slicer Custom Modules Steve Pieper, PhD.
NA-MIC National Alliance for Medical Image Computing IGT Software Design and Process Bill Lorensen GE Research.
3D Slicer Architecture and Implementation
AMI GUI Design V1.1 by Kilian Pohl - Reflects changes in AMI MRML Structure - Includes feedback from AMI Workshop in Dec 09.
NA-MIC National Alliance for Medical Image Computing Slicer 3 Update for Core 1 NA-MIC Algorithms Meeting UNC May 23, 2006.
NA-MIC National Alliance for Medical Image Computing NAMIC-Kit Update Will Schroeder Jim Miller Bill Lorensen.
NA-MIC National Alliance for Medical Image Computing NA-MIC Software Engineering Bill Lorensen GE Research NA-MIC Engineering Core PI.
NA-MIC National Alliance for Medical Image Computing Slicer4 CLI Slicer Execution Model.
SimITK and SimVTK: ITK and VTK in Simulink DG Gobbi, P Mousavi, KM Li, J Xiang, A Campigotto, A LaPointe, G Fichtinger, P Abolmaesumi Medical Image Analysis.
Sonia Pujol, PhD National Alliance for Medical Image Computing © 2010, ARR.
CPSC 372 John D. McGregor Module 3 Session 1 Architecture.
NA-MIC National Alliance for Medical Image Computing ParaView Server Manager Berk Geveci Andy Cedilnik.
NA-MIC National Alliance for Medical Image Computing Core 1b – Engineering Components Jim Miller GE Research.
CPSC 871 John D. McGregor Module 3 Session 1 Architecture.
Tutorial for XFDTD Written by Cynthia Furse University of Utah.
NA-MIC National Alliance for Medical Image Computing Using Annotations in Slicer 4.0 Yong Zhang, Kilian Pohl June 2010.
Module 12: Configuring and Managing Storage Technologies
NA-MIC National Alliance for Medical Image Computing 3D Slicer Modules and Extensions Steve Pieper, Ph.D.
NA-MIC National Alliance for Medical Image Computing Slicer3 Update
National Alliance for Medical Image Computing User Desktop Slicer 3.0 Architecure AlgorithmsITKVTK Slicer Modules VTK Apps Using ITK.
National Alliance for Medical Image Computing Integrating with Slicer3.
PLUS overview (PerkLab ultrasound library and applications)
ImageJ2. Why ImageJ2? ● Support the next generation of image data ● Interoperate and collaborate with other projects ● Broaden the ImageJ community ●
The Holmes Platform and Applications
Progress Apama Fundamentals
Architecture Review 10/11/2004
Java FX: Scene Builder.
Working with Data Blocks and Frames
3D Slicer module programming
Working in the Forms Developer Environment
LOCO Extract – Transform - Load
3D Slicer Architecture and Implementation
Cross Platform Development using Software Matrix
Computer Graphics Lecture 32
Chapter 2 – Introduction to the Visual Studio .NET IDE
Pipeline Execution Environment
Ogre Overview Lecture 3.
In-situ Visualization using VisIt
MVC and other n-tier Architectures
OO Methodology OO Architecture.
Slicer IGT Module : Wizard UI Design
Ogre Overview.
AVOIR -African virtual
Introduction to Operating System (OS)
Introduction to the Visual C# 2005 Express Edition IDE
Using Access and the Web
Microsoft Office Illustrated
#01 Client/Server Computing
Design and Maintenance of Web Applications in J2EE
12 Product Configurator
Chapter 2: System Structures
Tutorial 6 Creating Dynamic Pages
3D Slicer Architecture and Implementation
An Introduction to Software Architecture
Model, View, Controller design pattern
Slicer Timeline GUI Thread Processing Thread
Interactive Editor tutorial
#01 Client/Server Computing
Presentation transcript:

Slicer3 Architecture

Overview Algorithms ITK VTK Slicer Modules Slicer 3.0 User Desktop Scripts of Slicer Mods VTK Apps Using ITK Batch Programs Non-NAMIC Cmd tools LONI Pipeline The FMA is an ontology of canonical human anatomy which represents anatomical structures in terms of Anatomical Entities (AE; e.g., organs, cells, molecules) that are linked to each other by Structural Relationships (SR; e.g., containment, continuity, adjacency). This figure represents a subset of thoracic AEs including the cavities of the proximal aorta (AoP), the left ventricle (LV), the pericarial space (peri), and the pleural space. The AoP and LV cavities contain (vertical arrows) blood. For clarity, a single horizontal arrow represents all other Structural Relationships between this subset of AEs. Birn Grid Data/Compute

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 GUI Renderers Widgets Edit Observe Logic Observe Edit Observe Edit MRML Nodes Motivation for this architecture: modularize! Make the parts resuable. MVC is model/view/controller – often used as an idealized design pattern, but almost always gets customized for any give application “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.

Execution Model Modules Slicer 3 Architecture Diagram (updated 2007-01-09) CommandLineModule Base (Managed by Base and communicates like other Modules) Logic Links to: Base Logic, MRML Auto-Generated GUIs from XML Descriptions GUI Links to: KWWidgets Logic Links to: ITK MRML VTK (except Rendering) GUI Links to: VTK Rendering KWWidgets Logic MRML Mediators Mediators Observe Modified Events MRML Provides Frames for Widgets, Routing of User Events Formulates Command Line and passes data Observe Modified Events on Application State Edit Mrml Scene/Nodes Describe Input options (uses --xml option) Back-door to MRML with MRMLIDImageIO ITK IO Factory Library (Otherwise through files, command line options) Registers GUI Event Observers Interactive Module Execution Model Modules build as executables or shared libraries support –xml query Observe Modified Events Logic Links to: Base Logic ITK MRML VTK (except Rendering) GUI Links to: VTK Rendering KWWidgets Logic MRML Mediators Edit Mrml Scene/Nodes Slicer Daemon communication via server port External Connections Use socket connection directly (e.g. MATLAB) Use slicerget/slicerget utilities (e.g. unu) Notes: All classes in the Logic directory should be able to run ‘headless’ without OpenGL or window system for scripting and testing Base Logic and GUI contain transient application state (cursor location, focus, mrml scene connection…) Persistent and Undoable state in MRML Nodes 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 and provide helper routines to create/manage nodes GUI classes are implemented as KWWidget subclasses Each Logic class defines Get/Set methods for internal state and Modified Events that GUI classes can Observe Code in Base implements “first order” Node types (Volumes, Models, Transforms, Fiducials, Colors, etc). Code in Modules provides application-specific extensions

Slicer3 Slice Coordinates RASToRAS Transforms SliceToRAS Matrix XYToSlice Matrix RASToIJK Matrix RAS to RAS Coordinates Slice Coordinates XY Image Space Coordinates In RenderWindow IJK = XYToIJK * XY IJK = RASToIJK * RASToRAS * SliceToRAS * XYToSlice * XY IJK Volume Coordinates From GUI VolumeNode TransformNode SliceNode XYToIJK Matrix Calculated by SliceLayerLogic Coordinates are Cell Centered (no VTK flip)

Slice 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 MRML Nodes: Persistent, Undoable State Logic: Encapsulate VTK Pipelines, Observe MRML Nodes GUI: Manage Widgets and Rendering; Manipulated Nodes and Logic; Observe Nodes and Logic

Slice Management Stores: Window/Level Lookup Table (Color Node) Volume Display Node Stores: Window/Level Lookup Table (Color Node) Transparency Threshold Volume Node Foreground Slice Layer Logic Volume Display Node Volume Node Background Slice Layer Logic Slice Node Slice GUI Slice Logic Slice Composite Node MRML Nodes: Persistent, Undoable State Logic: Encapsulate VTK Pipelines, Observe MRML Nodes GUI: Manage Widgets and Rendering; Manipulated Nodes and Logic; Observe Nodes and Logic

Slice Management Stores: Volume Display Node Stores: RAS Location of Slice (Origin and Orientation) Field of View Pixel Dimensions Volume Node Foreground Slice Layer Logic Volume Display Node Volume Node Background Slice Layer Logic Slice Node Slice GUI Slice Logic Slice Composite Node MRML Nodes: Persistent, Undoable State Logic: Encapsulate VTK Pipelines, Observe MRML Nodes GUI: Manage Widgets and Rendering; Manipulated Nodes and Logic; Observe Nodes and Logic

Slice Management Stores: Volume IDs per Layer Opacity of Overlay Volume Display Node Stores: Volume IDs per Layer Opacity of Overlay Volume Node Foreground Slice Layer Logic Volume Display Node Volume Node Background Slice Layer Logic Slice Node Slice GUI Slice Logic Slice Composite Node MRML Nodes: Persistent, Undoable State Logic: Encapsulate VTK Pipelines, Observe MRML Nodes GUI: Manage Widgets and Rendering; Manipulated Nodes and Logic; Observe Nodes and Logic

Slice Management Stores: Image Data IJKToRAS Matrix Name… Volume Display Node Stores: Image Data IJKToRAS Matrix Name… Volume Node Foreground Slice Layer Logic Volume Display Node Volume Node Background Slice Layer Logic Slice Node Slice GUI Slice Logic Slice Composite Node MRML Nodes: Persistent, Undoable State Logic: Encapsulate VTK Pipelines, Observe MRML Nodes GUI: Manage Widgets and Rendering; Manipulated Nodes and Logic; Observe Nodes and Logic

Slice Management Pipeline with: vtkImageReslice Volume Display Node Volume Node Pipeline with: vtkImageReslice vtkImageMapToWindowLevelColors vtkImageMapToRGBA Foreground Slice Layer Logic Volume Display Node Volume Node Background Slice Layer Logic Slice Node Slice GUI Slice Logic Slice Composite Node MRML Nodes: Persistent, Undoable State Logic: Encapsulate VTK Pipelines, Observe MRML Nodes GUI: Manage Widgets and Rendering; Manipulated Nodes and Logic; Observe Nodes and Logic

Slice Management Pipeline with: vtkImageBlend Volume Display Node Volume Node Pipeline with: vtkImageBlend Foreground Slice Layer Logic Volume Display Node Volume Node Background Slice Layer Logic Slice Node Slice GUI Slice Logic Slice Composite Node MRML Nodes: Persistent, Undoable State Logic: Encapsulate VTK Pipelines, Observe MRML Nodes GUI: Manage Widgets and Rendering; Manipulated Nodes and Logic; Observe Nodes and Logic

Slice Management GUI: SliceControllerWidget (Menus, Scale, Buttons…) Volume Display Node Volume Node GUI: SliceControllerWidget (Menus, Scale, Buttons…) SliceViewer (RenderWidget, ImageMapper, ImageActor…) Foreground Slice Layer Logic Volume Display Node Volume Node Background Slice Layer Logic Slice Node Slice GUI Slice Logic Slice Composite Node MRML Nodes: Persistent, Undoable State Logic: Encapsulate VTK Pipelines, Observe MRML Nodes GUI: Manage Widgets and Rendering; Manipulated Nodes and Logic; Observe Nodes and Logic

Undo 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 => All Undoable operations must store their data as MRML nodes

Undo Implementation MRML Scene Undo Stack Initial Scene Delta1 Scene Saved Scene N1 N1 N2 N4 N4 N3 N5 N5