National Alliance for Medical Image Computing Slicer MRML MRML Library provides API for managing medical image data types (Volumes, Models,

Slides:



Advertisements
Similar presentations
Building Portals to access Grid Middleware National Technical University of Athens Konstantinos Dolkas, On behalf of Andreas Menychtas.
Advertisements

National Alliance for Medical Image Computing Integrating with Slicer3.
National Alliance for Medical Image Computing Slicer3 plugins: Going Further Common architecture for interactive and batch processing.
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.
Master Pages, User Controls, Site Maps, Localization Svetlin Nakov Telerik Corporation
National Alliance for Medical Image Computing Slicer3 plugins Common architecture for interactive and batch processing.
Lab 10: Images and Skinning, Sound and Assets User Interface Lab: GUI Lab Oct. 30 th, 2013.
Tutorial 12: Enhancing Excel with Visual Basic for Applications
National Alliance for Medical Image Computing Anatomy of a plugin Common architecture for interactive and batch processing.
MAF Paolo Quadrani giugno 2005 Marco Petrone
NA-MIC National Alliance for Medical Image Computing 3D Slicer Interactive Modules Steve Pieper, PhD.
File Management Systems
Object-Oriented Analysis and Design
Mint-user MINT Technical Overview October 8 th, 2010.
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.
QualNet 2014/05/ 尉遲仲涵. Outline Directory Structure QualNet Basic Message & Event QualNet simulation architecture Protocol Model Programming.
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 NAMIC-Kit Update Will Schroeder Jim Miller Bill Lorensen.
Java Beans.
Eric Westfall – Indiana University Jeremy Hanson – Iowa State University Building Applications with the KNS.
CSCI 6962: Server-side Design and Programming Introduction to Java Server Faces.
NA-MIC National Alliance for Medical Image Computing Slicer 3.4 Update Summer NA-MIC Project Week 2009 Steve Pieper, Ph.D.
NA-MIC National Alliance for Medical Image Computing Slicer4 CLI Slicer Execution Model.
FTP Client Application CSC 8560 Brian Jorgage 4/27/2004.
Design Patterns Part two. Structural Patterns Concerned with how classes and objects are composed to form larger structures Concerned with how classes.
Event Data History David Adams BNL Atlas Software Week December 2001.
V. Serbo, SLAC ACAT03, 1-5 December 2003 Interactive GUI for Geant4 by Victor Serbo, SLAC.
PI Data Archive Server COM Points Richard Beeson.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Memory: Relocation.
NA-MIC National Alliance for Medical Image Computing ParaView Server Manager Berk Geveci Andy Cedilnik.
VAPOR 3.0 Architecture Overview. Purpose of this document Provide understandable overview of 3.0 architecture Enable the development team to maintain.
NA-MIC National Alliance for Medical Image Computing Core 1b – Engineering Components Jim Miller GE Research.
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 Using Annotations in Slicer 4.0 Yong Zhang, Kilian Pohl June 2010.
Apr. 8, 2002Calibration Database Browser Workshop1 Database Access Using D0OM H. Greenlee Calibration Database Browser Workshop Apr. 8, 2002.
GEOL882.3 Seismic Processing Systems Objective Processing Systems SEGY and similar file formats General structure of several systems.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
NA-MIC National Alliance for Medical Image Computing Slicer / ITK / VTK Development Tools Steve Pieper, PhD.
Fall UI Design and Implementation1 Lecture 15: Undo.
A user interface framework for Grid-based computational steering and visualization. Jason Wood*, Mark Riding and Ken Brodlie.
Session 1 Module 1: Introduction to Data Integrity
NA-MIC National Alliance for Medical Image Computing 3D Slicer Modules and Extensions Steve Pieper, Ph.D.
SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally FILE SYSTEM.
NA-MIC National Alliance for Medical Image Computing Slicer3 Tutorial Nonrigid Atlas Registration Dominik Meier, Ron Kikinis February.
S.Linev: Go4 - J.Adamczewski, H.G.Essel, S.Linev ROOT 2005 New development in Go4.
NA-MIC National Alliance for Medical Image Computing Slicer3 Update
Overview 3D Slicer currently provides very basic technology for annotating images. This limits users in their ability to properly capture semantic information.
National Alliance for Medical Image Computing User Desktop Slicer 3.0 Architecure AlgorithmsITKVTK Slicer Modules VTK Apps Using ITK.
CS777 Project 1 Developing Maya Plug-ins for motion related projects Kyungsuk David Lee.
Standard Response Evaluation Criteria in Solid Tumors (RECIST) using 3D Slicer Slicer3 Training Compendium Image here. Jeffrey Yap, PhD Wendy Plesniak,
National Alliance for Medical Image Computing Integrating with Slicer3.
National Alliance for Medical Image Computing Slicer3 Plugins Common architecture for interactive and batch processing.
A Presentation Presentation On JSP On JSP & Online Shopping Cart Online Shopping Cart.
NA-MIC National Alliance for Medical Image Computing Core 1b – Engineering Data Management Daniel Marcus Washington University.
Java FX: Scene Builder.
3D Slicer module programming
From Scalars to Tensors: How to add new volume types?
3D Slicer Architecture and Implementation
In-situ Visualization using VisIt
Chapter 2: GUI API Chapter 2.
Slicer3 Architecture.
3D Slicer Architecture and Implementation
eSeries Entities By Julie Ladner
Preference Activity class
CMPE/SE 131 Software Engineering March 7 Class Meeting
Unit – V Data Controls.
Presentation transcript:

National Alliance for Medical Image Computing Slicer MRML MRML Library provides API for managing medical image data types (Volumes, Models, Transforms, Fiducials, Cameras, etc) and their visualization. Each data type is represented by a special MRML node. MRML Scene is a collection of MRML nodes. Slicer MRML data model is implemented independent of the visualization and algorithmic components of the system. Other Slicer components (Logic and GUI) observe changes in MRML scene and individual nodes and process change MRML events.

National Alliance for Medical Image Computing Slicer MRML Scene MRML Scene manages MRML nodes : add, delete, find, find by type, etc. MRML Scene provides persistence of MRML nodes (reading/writing to/from XML file). MRML Scene provides Undo/Redo mechanism that restores a previous state of the scene and individual nodes.

National Alliance for Medical Image Computing Slicer MRML Nodes The MRML nodes are designed to store the state of the Slicer application, both raw data and visualization parameters. All MRML nodes have to implement certain standard API: ReadAttributes, WriteAttributes, Copy, etc. MRML nodes are organized into C++ class hierarchies, all derived from vtkMRMLNode class. For example vtkMRMLTransformableNode is the parent class of Volume, Model, Fiducial, and Transformation nodes; vtkVolumeNode is a parent of vtkMRMLScalarVolumeNode and vtkMRMLVectorVolumeNode

National Alliance for Medical Image Computing MRML Nodes Class Hierarchy TransformableNode VolumeNodeModelNodeTransformNode (vtkMRML)Node LinearTransformNode FiducialNode ScalarVolumeNodeTensorVolumeNode DiffusionTensorVolumeNode DiffusionWeightedVolumeNode VectorVolumeNode

National Alliance for Medical Image Computing References to MRML Nodes Some MRML nodes have references to other nodes. Transformable Node has a reference to a Transformation node. Transformation node has a reference to its parent Transformation node. References are stored by node ID. Use vtkSetReferenceStringMacro to set reference ID (it registers reference with the scene). Access methods should check if the referenced node is still in the MRML scene using its ID.

National Alliance for Medical Image Computing Transform Hierarchy and Node References VolumeNode0 TransformNodeID = ‘TransofrmNode2’ TransformNode2 TransformNodeID = TransformNode1 TransformNode0 TransformNodeID =NULL TransformNode1 TransformNodeID = TransformNode0 ModeNode0 TransformNodeID = ‘TransofrmNode1’

National Alliance for Medical Image Computing MRML Events and Observers Changes in MRML scene and individual nodes propagate to other observing nodes, GUI and Logic objects via vtk events and command- observer mechanism. Use vtk AddObserver() and InvokeEvent() methods. vtk SetMacro generates ModifiedEvent. The command-observer mechanism for MRML is implemented using helper vtkObserverManager, class, MRML Observer macros, and ProcessMRMLEvents method. Observers should store a registered pointer to a MRML node to prevent callbacks on a deleted object.

National Alliance for Medical Image Computing Events and Observers Example vtkMatrix4x4 SetElement() InvokeEvent(ModifiedEvent) LinearTransofmNode ProcessMRMLEvents() InvokeEvent(TransformModifiedEvent) ModelNode ProcessMRMLEvents() InvokeEvent(TransformModifiedEvent) ViewerWidget ProcessMRMLEvents() update transforms observes callback

National Alliance for Medical Image Computing MRML Observer API Defined in Libs/MRML/vtkMRMLNode.h VtkSetMRMLObjectMacro - registers MRML node with another vtk object (another MRML node, Logic or GUI). No observers added. VtkSetAndObserveMRMLObjectMacro - registers MRML node and adds an observer for vtkCommand::ModifyEvent. VtkSetAndObserveMRMLObjectEventsMacro - registers MRML node and adds an observer for a specified set of events. SetAndObserveMRMLScene[Events]() method is used in GUI and Logic to observe Modify, NewScene, NodeAdded, etc. events. ProcessMRMLEvents method should be implemented in MRML nodes, Logic, and GUI classes in order to process events from the observed nodes.

National Alliance for Medical Image Computing Creating Custom MRML Node Custom MRML nodes provide persistent storage for the module parameters. Custom MRML nodes should be registered with the MRML scene using RegisterNodeClass() so they can be saved and restored from a scene file. Classes should implement the following methods: CreateNodeInstance() – similar to VTK New() method only not static. GetNodeTagName() – return a unique XML tag for this node. ReadXMLAttributes() – reads node attributes from XML file as name-value pairs. WriteXML() – writes node attributes to output stream (as in interpolate="1" ). Copy() – copies node attributes.

National Alliance for Medical Image Computing Creating Custom MRML Node - continued If the node has references to other nodes the following additional methods should be implemented: –UpdateReferenceID() - updates the stored reference to another node. –UpdateScene()- updates other nodes in the scene depending on this node or updates this node if it depends on other nodes when the scene is read in. This method is called automatically by XML parser after all nodes are created. An example of a custom MRML node implementation: vtkMRMLGradientAnisotropicDiffusionFilterNode in Modules/GradientAnisotropicDiffusionFilter directory. To add node to the MRML scene: –In the code: use standard vtk New() and add node to the scene using vtkMRMLScene::AddNode(vtkMRMLNode *) –By user request: use vtkSlicerNodeSelectorWidget that creates a new node from the module’s UI.

National Alliance for Medical Image Computing Undo/Redo Architecture for Slicer3 Undo/Redo is based on saving and restoring the state of MRML nodes in the Scene. MRML scene can save snapshot of all nodes into a special Undo and Redo stacks. The Undo and Redo stacks store copies of nodes that have changed from the previous snapshot. The node that have not changes are stored by a reference (pointer). When an Undo is called on the scene, the current state of Undo stack is copied into the current scene and also into Redo stack. => All Undoable operations must store their data as MRML nodes

National Alliance for Medical Image Computing Undo Implementation Initial Scene MRML Scene N1 N2 N3 Delta1 Scene N4 Delta2 Scene N5 Saved Scene N1 N4 N5 Undo Stack

National Alliance for Medical Image Computing How to use Undo API Developer controls at what point the snapshot is saved by calling SaveStateForUndo method on the MRML scene. –SaveStateForUndo() - saves the state of all nodes in the scene –SetActiveScene(vtkMRMLScene *) - saves the state of the specified node. –SetActiveScene(vtkCollection*) - saves the state of the specified collection of nodes. SaveStateForUndo() should be called in GUI/Logic classes before changing the state of MRML nodes. Usually done in the ProcessGUIEvents method that processes events from the user interactions with GUI widgets. SaveStateForUndo() should not be called while processing transient events such as continuous events sent by KW UI while dragging a slider (for example vtkKWScale::ScaleValueStartChangingEvent).