NA-MIC National Alliance for Medical Image Computing 3D Slicer Interactive Modules Steve Pieper, PhD.

Slides:



Advertisements
Similar presentations
National Alliance for Medical Image Computing Integrating with Slicer3.
Advertisements

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 Slicer3 Architecture.
National Alliance for Medical Image Computing Slicer MRML MRML Library provides API for managing medical image data types (Volumes, Models,
NA-MIC National Alliance for Medical Image Computing 3D Slicer Version 4 Architecture and Status Steve Pieper, Ph.D.
National Alliance for Medical Image Computing Anatomy of a plugin Common architecture for interactive and batch processing.
1 Frameworks. 2 Framework Set of cooperating classes/interfaces –Structure essential mechanisms of a problem domain –Programmer can extend framework classes,
OOP in Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
AJAX & By – Anupama Sharma. Defining Ajax Ajax isn’t a technology. It’s really several technologies, each flourishing in its own right, coming together.
National Alliance for Medical Image Computing User Desktop Slicer 3.0 Architecure AlgorithmsITKVTK Slicer Modules VTK Apps Using ITK.
CS 225 Lab #2 - Pointers, Copy Constructors, Destructors, and DDD.
Design Patterns academy.zariba.com 1. Lecture Content 1.What are Design Patterns? 2.Creational 3.Structural 4.Behavioral 5.Architectural 6.Design Patterns.
Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access memory.
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.
OOP Languages: Java vs C++
Java Programming, 2E Introductory Concepts and Techniques Chapter 2 Creating a Java Application and Applet.
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.
Core 1b – Engineering Dynamic Coding a.k.a. Python in Slicer
Programming Languages and Paradigms Object-Oriented Programming.
NA-MIC National Alliance for Medical Image Computing NAMIC-Kit Update Will Schroeder Jim Miller Bill Lorensen.
Java Programming, 3e Concepts and Techniques Chapter 3 Section 65 – Manipulating Data Using Methods – Java Applet.
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
Chapter 8: Writing Graphical User Interfaces
JSP Java Server Pages Softsmith Infotech.
The Pipeline Processing Framework LSST Applications Meeting IPAC Feb. 19, 2008 Raymond Plante National Center for Supercomputing Applications.
NA-MIC National Alliance for Medical Image Computing Slicer 3.4 Update Summer NA-MIC Project Week 2009 Steve Pieper, Ph.D.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
NA-MIC National Alliance for Medical Image Computing Slicer4 CLI Slicer Execution Model.
BLU-ICE and the Distributed Control System Constraints for Software Development Strategies Timothy M. McPhillips Stanford Synchrotron Radiation Laboratory.
NA-MIC National Alliance for Medical Image Computing Slicer Building and Deployment Steve Pieper, PhD.
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.
What’s new in Kentico CMS 5.0 Michal Neuwirth Product Manager Kentico Software.
Replay Compilation: Improving Debuggability of a Just-in Time Complier Presenter: Jun Tao.
NA-MIC National Alliance for Medical Image Computing ParaView Server Manager Berk Geveci Andy Cedilnik.
Introduction to Processing. 2 What is processing? A simple programming environment that was created to make it easier to develop visually oriented applications.
VAPOR 3.0 Architecture Overview. Purpose of this document Provide understandable overview of 3.0 architecture Enable the development team to maintain.
Rails & Ajax Module 5. Introduction to Rails Overview of Rails Rails is Ruby based “A development framework for Web-based applications” Rails uses the.
Chapter 2: Variables, Functions, Objects, and Events JavaScript - Introductory.
NA-MIC National Alliance for Medical Image Computing Slicer / ITK / VTK Development Tools Steve Pieper, PhD.
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
NA-MIC National Alliance for Medical Image Computing 3D Slicer and the NA-MIC Kit for IGT Research Steve Pieper, PhD NAC, SPL, NA-MIC,
Java Beans. Definitions A reusable software component that can be manipulated visually in a ‘builder tool’. (from JavaBean Specification) The JavaBeans.
NA-MIC National Alliance for Medical Image Computing Slicer3 Tutorial: Registration Library Case 15 AC-PC Alignment Dominik Meier, Ron.
Overview of Operating Systems Introduction to Operating Systems: Module 0.
NA-MIC National Alliance for Medical Image Computing Slicer 2010: Past, Present, and Future Steve Pieper, Ph.D.
NA-MIC National Alliance for Medical Image Computing Slicer / ITK / VTK Development Tools Steve Pieper, PhD.
Neuroimage Analysis Center An NCRR National Resource Center NAC Engineering Core Steve Pieper, Core PI SPL; Isomics, Inc.
Creating a Java Application and Applet
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.
NA-MIC National Alliance for Medical Image Computing Slicer Progress in 2009 Steve Pieper, Ph.D.
National Alliance for Medical Image Computing Integrating with Slicer3.
NA-MIC National Alliance for Medical Image Computing Core 1b – Engineering Data Management Daniel Marcus Washington University.
Chapter 5 Introduction to Defining Classes Fundamentals of Java.
3D Slicer module programming
Working in the Forms Developer Environment
3D Slicer Architecture and Implementation
The Basics: HTML5, Drawing, and Source Code Organization
In-situ Visualization using VisIt
Activities and Intents
Core 1b – Engineering Data and Clinical Interface
Java Unit 11: Inheritance I
Slicer3 Architecture.
Exploring the Power of EPDM Tasks - Working with and Developing Tasks in EPDM By: Marc Young XLM Solutions
3D Slicer Architecture and Implementation
Presentation transcript:

NA-MIC National Alliance for Medical Image Computing 3D Slicer Interactive Modules Steve Pieper, PhD

National Alliance for Medical Image Computing Review of Module Types Built-In Modules –Few Core Features Linked to Slicer3.cxx –Non-Core Modules becoming Loadable Loadable Modules –Dynamically Discovered and Loaded –Can Access Application’s MRML Scene Instance and Call SlicerBaseGUI and Related APIs (vtkRendering, KWWidgets…) Scripted Modules –Like Loadable, but Written in Tcl or Python Command Line Modules –Can Run as Stand Alone Executables –Provide Standard Command Line Parsing, which Allows Slicer to Generate GUI Automatically –Can be Compiled as Shared Library for Dynamic Link to Slicer 2

National Alliance for Medical Image Computing This Session Discuss Implementation of Loadable and Scripted Modules –Module Architecture –Implementation Options –Issues to be Consider Example Interactive Modules Documentation: (Linked from the developer section of slicer.org) 3

National Alliance for Medical Image Computing Why Interactve Modules Continuous Feedback –Perform Calculation while Adjusting a Value –Responding to Render Window Events (e.g. 3D Widgets) Periodic Updates / Animations Injecting New Data –Connecting to Devices (e.g. OpenIGTLink) –Connecting to Servers (e.g. QueryAtlas, FetchMI) Defining New Data Types and Storing State –New MRML Nodes can be Displayable (e.g. Volume or Model Subclasses) –Interaction State in Nodes is Serialized in MRML Scene Define Multi-Step Workflows (e.g. EMSegmenter) 4

National Alliance for Medical Image Computing C++ Superclasses Modules Inherit Much of their Behavior –Look and Feel –Application Settings –Common API, Wrapping 5

National Alliance for Medical Image Computing Classes to Implement Subclasses of: –vtkMRMLNode –vtkSlicerLogic –vtkSlicerModuleGUI Default Behavior is Often Adequate Follows VTK Conventions for Object Management and Event Handling Use KWWidgets to Define GUI 6

National Alliance for Medical Image Computing Constructor/Destructor Allocate Widgets in Constructor In Destructor, Set Parent to NULL to Avoid Reference Deadlock (and Leaks) Constructor Called at System Start Enter / Exit –Called when Module Changes –Can be used to Create GUI on the Fly 7

National Alliance for Medical Image Computing Build GUI / TearDownGUI Initialize the Module Construct the Widgets and Layout of the Page Rely on Slicer-Custom KWWidgets like the vtkSlicerNodeSelectorWidget TearDownGUI (Optional) Unpacks 8

National Alliance for Medical Image Computing Processing Events AddGUIObservers / RemoveGUIObservers –List Events to Watch –Inherited Callback Function Calls ProcessGUIEvents ProcessGUIEvents –Maps Events To Actions 9

National Alliance for Medical Image Computing Manipulating MRML Modules Should Save Parameter State in MRML Nodes –Supports Undo/Redo and Serialization of Parameters to Scene File Use of Node Selector Widgets Simplifies Input/Output –Can be Configured to Allow Creation of New Output Nodes or Select Existing Nodes to Overwrite Typically there is a Logic Method to Apply Parameters using a VTK Pipeline –Parameters Copied from MRML Node to Processing Classes –End of Pipeline Connected to MRML Volume or Model Node 10

National Alliance for Medical Image Computing Coordinate Issues MRML Volume Nodes –Track the IJKtoRAS Transformation Explicitly Map from Pixel Space to Patient Space in Millimeters –Hold Data in vtkImageData Instance Variable Origin is 0,0,0 Spacing is 1,1,1 –vtkImageChangeInformation Filter is Sometimes Needed MRML Model Nodes –Vertices are in RAS Millimeters Optionally Copy the TransformNodeID to Put Output Node in Same Spot of Transformation Hierarchy as Input Node 11

National Alliance for Medical Image Computing Event Issues Avoid Event Loops –VTK Events are Handled Synchronously (on the Stack) Modifed Event from Node May Cause GUI to Update GUI Update May Trigger Second Call to ProcessGUIEvents –Can Use Guard Variables to Only Enter ProcessGUIEvents Once –Can Perform Atomic Updates node->DisableModifiedEventOn(); /* set a series of parameter values */ node->DisableModifiedEventOff(); node->InvokePendingModifiedEvent(); 12

National Alliance for Medical Image Computing Calling Other Modules Interactive Modules –Draw on the Public API of the MRML Nodes and Logic Command Line Modules –Construct Appropriate Parameter Node –Invoke Module in Separate Thread –Observe Scene Events to Check for Completion Status 13

National Alliance for Medical Image Computing Scripted Modules Map C++ Methods to Script Code Parameter Node Provides Keyword / Value Pair Serialization Code Can Often Be Reloaded –Don't Need to Exit Slicer or Reload Data –Can Be Significant Time Savings Slicer3/Modules/ScriptedModuleExample –in Slicer3 svn trunk, not 3.2 or Stanford branches –ScriptedModuleExampleClone Procedure Creates All Files Needed for New Module 14

National Alliance for Medical Image Computing Example Modules Modules/GradientAnisotropicDiffusion (a.k.a GAD) is "Prototype" Module to Review Slicer3/Modules/Editor –Complex Module with Many Features –Interacts with MRML, and Volumes –Applies Filter Operations –Provides Real-Time Feedback to Mouse Events Available if Python Enabled in your Slicer3 Build –PythonGADScriptedModule.py –Modules/Python has Several Examples 15

National Alliance for Medical Image Computing Module Considerations CommandLineModule is an Interactive Module that Wraps and Manages the Execution Model Command Line Modules –Simpler to Program Pure ITK Any Executable (even MATLAB Wrapped with Shell Script) –Can Run in Separate Thread –Can be Packaged as Executable or Shared Library –Can Used in Shell Scripts or Distributed Applications Interactive Modules Require Greater Effort but have More Flexibility 16