MAF Paolo Quadrani 20-21 giugno 2005 Marco Petrone

Slides:



Advertisements
Similar presentations
National Alliance for Medical Image Computing Slicer3 Architecture.
Advertisements

Introduction to Macromedia Director 8.5 – Lingo
National Alliance for Medical Image Computing Slicer MRML MRML Library provides API for managing medical image data types (Volumes, Models,
Tutorial 12: Enhancing Excel with Visual Basic for Applications
Chap 2 System Structures.
Operating-System Structures
The Web Warrior Guide to Web Design Technologies
Feature requests for Case Manager By Spar Nord Bank A/S IBM Insight 2014 Spar Nord Bank A/S1.
NA-MIC National Alliance for Medical Image Computing 3D Slicer Interactive Modules Steve Pieper, PhD.
Visual Basic 2010 How to Program. © by Pearson Education, Inc. All Rights Reserved.2.
Visual Basic 2010 How to Program Reference: Instructor: Maysoon Bin Duwais slides Visual Basic 2010 how to program by Deitel © by Pearson Education,
1 Chapter 12 Working With Access 2000 on the Internet.
Programming with Objects: Class Libraries and Reusable Code.
Using Visual Basic 6.0 to Create Web-Based Database Applications
Object-Oriented Analysis and Design
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.
Form Handling, Validation and Functions. Form Handling Forms are a graphical user interfaces (GUIs) that enables the interaction between users and servers.
OOP Languages: Java vs C++
Written by Liron Blecher
QualNet 2014/05/ 尉遲仲涵. Outline Directory Structure QualNet Basic Message & Event QualNet simulation architecture Protocol Model Programming.
Chapter 3.1: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.
CS5103 Software Engineering Lecture 08 Android Development II.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
Introduction to Graphical User Interfaces. Objectives * Students should understand what a procedural program is. * Students should understand what an.
Eric Westfall – Indiana University Jeremy Hanson – Iowa State University Building Applications with the KNS.
Using Visual Basic 6.0 to Create Web-Based Database Applications
JSP Java Server Pages Softsmith Infotech.
HTML+JavaScript M2M Applications Viewbiquity Public hybrid cloud platform for automating and visualizing everything.
Java Software Solutions Lewis and Loftus Chapter 10 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. Graphical User Interfaces --
LiveCycle Data Services Introduction Part 2. Part 2? This is the second in our series on LiveCycle Data Services. If you missed our first presentation,
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
Edinburgh, January 25, 2005 VisIVO, a VO-Enabled tool for Scientific Visualization and Data Analysis: Overview and Demo 1. Ugo Becciani (OACt): Introduction.
Getting Started The structure of a simple wxWidgets program, Look at where and how a wxWidgets application starts and ends, how to show the main window,
Tutorial 111 The Visual Studio.NET Environment The major differences between Visual Basic 6.0 and Visual Basic.NET are the latter’s support for true object-oriented.
In the next step you will enter some data records into the table. This can be done easily using the ‘Data Browser’. The data browser can be accessed via.
Active Server Pages  In this chapter, you will learn:  How browsers and servers interacted on the Internet when the Internet first became popular 
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 6 System Calls OS System.
Ch 3-4: GUI Basics Java Software Solutions Foundations of Program Design Sixth Edition by Lewis & Loftus Coming up: GUI Components.
Object Oriented Software Development 10. Persistent Storage.
Chapter 2: Variables, Functions, Objects, and Events JavaScript - Introductory.
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
CSI 3125, Preliminaries, page 1 SERVLET. CSI 3125, Preliminaries, page 2 SERVLET A servlet is a server-side software program, written in Java code, that.
Chapter 5 Introduction To Form Builder. Lesson A Objectives  Display Forms Builder forms in a Web browser  Use a data block form to view, insert, update,
ODS – Introduction to Web Services and BPEL Vakgroep Informatietechnologie Web Services & BPEL Design of Distributed Software.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Understanding Desktop Applications Lesson 5. Objective Domain Matrix Skills/ConceptsMTA Exam Objectives Understanding Windows Forms Applications Understand.
Understanding Desktop Applications Lesson 5. Understanding Windows Forms Applications Windows Forms applications are smart client applications consisting.
THE EYESWEB PLATFORM - GDE The EyesWeb XMI multimodal platform GDE 5 March 2015.
Online Performance Analysis and Visualization of Large-Scale Parallel Applications Kai Li, Allen D. Malony, Sameer Shende, Robert Bell Performance Research.
High degree of user interaction Interactive Systems: Model View Controller Presentation-abstraction-control.
John Lloyd, Edgewater Fullscope
2Operating Systems  Program that runs on a computer  Manages hardware resources  Allows for execution of programs  Acts as an intermediary between.
Dive Into® Visual Basic 2010 Express
Kai Li, Allen D. Malony, Sameer Shende, Robert Bell
Java FX: Scene Builder.
Customizing custom.
Important New Concepts In WPF
Chapter 2: System Structures
#01 Client/Server Computing
Chap 7. Building Java Graphical User Interfaces
IB Computer Science Topic 2.1.1
Graphical User Interfaces -- Introduction
Learning Java with Alice 3.0 Game Design Kathy Bierscheid
CIS16 Application Development Programming with Visual Basic
Chapter 2: System Structures
CCNA 3 v3 JEOPARDY Module 8 CCNA3 v3 Module 8 K. Martin.
Building ASP.NET Applications
Chapter 2: Operating-System Structures
#01 Client/Server Computing
Presentation transcript:

MAF Paolo Quadrani giugno 2005 Marco Petrone

MAF MAF Architecture

MAF Software layers HAL: vertical applications, custom objects LAL: view, visual pipe, widgets, operations, logic MFL: VME, data pipe, vtk filters and all additional libraries used inside the framework HAL LAL MFL

MAF MAF structure Logic View Manager Operation Manager Vme Manager Interaction Manager App Views Operations Vmes Devices + Interactors

MAF Framework communication Msg send: OnEvent() Call Command execution Module separation: who send a message do not know the listener Logic Operation Manager Op

MAF What do the ‘App’ class? Create the parent frame of the application Make an instance of the logic Plug the views and the operations used inside the application Hide/Show the interface elements for the vertical application Terminate the application deleting the logic

MAF Logic: the application’s behavior Create and instance of each manager: mafViewManager, mafOpManager, mafVmeManager, mafInteractionManager Create the menu’ Create the toolbar Create the sidebar Create the timebar Create the log area Listen all the events raised from the managers and from the interface elements Call (virtual) methods to mange the events

MAF mafViewManager Create/Delete plugged views Manage view selection Add/Remove VMEs to/from the views Has knowledge about the selected view and selected VME

MAF mafOpManager Manage the operation execution Manage the undo stack Enable/Disable menu’ items and toolbar buttons according to the VME selected and to the operation execution

MAF mafVmeManager Add/Remove a VME to/from the tree Manage the file save, open, new Manage the file history Set the time to the VME tree

MAF mafInteractionManager Make a default instance of mouse device Manage interaction devices through DeviceManager Make an instance of the Positional Event Router (PER), used to interact dynamically with a device and the selected VME through VME’s behavior Make an instance of the Static Event Router (SER), used to interact statically with a device and a fixed VME

MAF How do the view work? Copy: make an instance of itself, set the listener to the mafViewManager and call method Create() Create: create the render window and create the view scene graph giving to it the information of which VMEs are creatable

MAF How do the view work? (2) VmeAdd/VmeRemove: add/remove a VME to the scene graph VmeCreatePipe/VmeDeletePipe: create/delete visualization pipeline for the VME that has to be shown/hidden (these are called by the mafSceneGraph on VmeShow call)

MAF How do the operation work? Copy: make a copy of itself OpRun: first method called by the mafOpManager; create the GUI for the operation OnEvent: listen the messages sent from the GUI OpStop: the operation is ending with wxOK or wxCANCEL, notify it to the OpManager OpDo: called if the operation is terminated with wxOK –the op is pushed inside the undo stack (if the m_canundo flag is true) OpUndo: called only when UnDo is required –The op is popped out from the undo stack –All the objects must be alive to establish previous situation

MAF VME CurrentDataPose MatrixVoid * ClientData mafVmeData class, created by Logic mflDataPipe: static vtk data or dynamically generated by a custom data pipe

MAF VME 4D data structure 4D data, positioned in space with a hierarchical organization VME Parent VME Matrix Array Data Array Attributes Current Time 4x4 pose matrix 3D dataset Visual PIPE Render Window MAF View

MAF VME 4D data structure The kind of data stored inside a node: VME Parent VME Matrix Array Data Array Attributes Current Time 4x4 pose matrix 3D dataset Visual PIPE Render Window MAF View

MAF VME 4D data structure Output: 4x4 matrix and VTK dataset VME Parent VME Matrix Array Data Array Attributes Current Time 4x4 pose matrix 3D dataset Visual PIPE Render Window MAF View

MAF VME 4D data structure VME consumers VME Parent VME Matrix Array Data Array Attributes Current Time 4x4 pose matrix 3D dataset Visual PIPE Render Window MAF View

MAF VME 4D data structure VME output changes according to input time VME Parent VME Matrix Array Data Array Attributes Current Time 4x4 pose matrix 3D dataset Visual PIPE Render Window MAF View

MAF VME 4D data structure Data manipulation by means of Operations VME Parent VME Matrix Array Data Array Attributes Current Time MAF Operation 4x4 pose matrix 3D dataset Visual PIPE Render Window MAF View

MAF Data Storage ROOT R-FemurL-Femur L-Tibia Storage VME Tree XML Hierarchy The VME tree is stored inside a folder as a single XML file (MSF file) storing hierarchy, pose and metadata, plus single data files of node’s data (VTK Datasets). Hierarchy Matrix Array Data Array Attributes

MAF VME Derived: Output Pipes New VME Parent VME Attributes VME GUI 4x4 pose matrix 3D dataset Visual PIPE Render Window MAF View Current Time Matrix PIPE Data PIPE Matrix Array Data Array MAF Operation VMEs can be customized to generated different output data and matrix using custom pipes.

MAF VME Derived: Custom GUI New VME Parent VME Attributes VME GUI 4x4 pose matrix 3D dataset Visual PIPE Render Window MAF View Current Time Matrix PIPE Data PIPE Matrix Array Data Array MAF Operation VMEs GUI can also be customized to set specific parameters…

MAF VME Derived: VME Links Links to other VME can be added to extend the tree into a Graph.

MAF VME Derived: VME Links (2) VME can listen to changes to linked VMES. VME Derived Parent VME Attributes MAF Operation 4x4 pose matrix 3D dataset Visual PIPE Render Window MAF View VME 2 VME 1 VME 3 Link Current Time Matrix PIPE Data PIPE

MAF VME Derived: VME Meter An example of VME Derived is the VME Meter: it’s a VME continuously computing the distance in between linked VMEs. VME Derived are sort of persistent operations which are saved in the data tree.

MAF MAF Interaction and Events Interaction inside MAF is accomplished by processing input events coming from GUI or input devices

MAF Discrete and Continuous Discrete Events: low frequency and typically causing application state change. Typically coming from GUI or discrete I/O device. Continuous Events: rised when user interacts inside views using a continuous input device, like a mouse or a tracker.

MAF MAF Interaction Model The typical MAF interaction model is composed by an event source (the device), an interpreter (the interactor) and a logic module (operations, logic or others) InteractorOperationDevice

MAF Events from Device Events coming from input devices are synchronized with the main application thread by Device Manager: Speech Mouse Tracker Haptic Device Manager S.E.R. Inter. Manager Async Events Sync Events

MAF Device Manager Responsible for devices: –Creation –Storing/Restoring of device setup –Input events synchronization

MAF Device Setup & Config

MAF Device Setup & Config Default devices User adds new devices

MAF Device Setup & Config Selected device settings Settings can be stored and restored

MAF Interaction with MAF Direct Interaction with devices: – Static Event Routing Interaction with objects in the scene: – Positional Event Routing

MAF Static Event Routing Interaction with devices is called “Static Event Routing”, where devices are assigned directly to “actions” by user, and interactors are connected to “actions” by application: Static Interactor Inter. Manager Logic Op Manager Running Op Static Event Routing Tracker Action S.E.R.

MAF SER Example Head Track Action S.E.R. Camera Interactor Current View Tracking device assigned to changing the point of view in the scene.

MAF Assign Device to Actions Static bindings of the device to the actions Actions are declared by application modules

MAF Actions declaration (for Ops) Define a GetActions() function in the operation returning the list of actions required by operation.

MAF Attach interactor to Action: Event IDAction Name Attach Interactors to Actions Interactor Action NameEvent ID Detach interactor from Action:

MAF Positional Event Routing A specialized interactor (P.E.R.), check where user is pointing in the view and routes events toward the interactor connected to the pointed object. S.E.R. P.E.R. View Manager Selected View Inter. Manager Logic VME ManagerOp Manager Pointed VME Behavior Running Op Positional Routing Camera Interactor

MAF Positional Event Routing (2) P.E.R. is an interactor statically assigned to “PointAndManipulate” action. Picking in the scene occurs only in response to “button down” events, therefore to be used with the P.E.R. an input device must be able to rise a button event.

MAF Attach Interactors to VME The interactor should be set in the m_behavior field of the VmeData object connected to the VME, which can be retrieved with GetClientData() function (MAF 1.x):

MAF Create a Mouse Interactor Create a Compositor Mouse interactor, and then use it to create interactors to be assigned to single mouse buttons: Mouse Compositor Interactor Translate Interactor Input Events Rotate Interactor Left Button Right Button Mouse

MAF Create a Mouse Interactor (2) Header file (Op.h): Left Button! Body file (.cpp)

MAF Applications

MAF Applications

MAF Applications

MAF Applications

MAF Applications

MAF Applications

MAF Exercise Open the ExampleApp project with Visual Studio 6 and: 1.Add visibility for mflVMELandmark type into mafViewCustom. 2.Change the visual pipe used to render the surfaces in mafPipeCustom

MAF Exercise Open the ExampleApp project and the mmoInteractonOp files and uncomment code to: 1.Declare a new Action 2.Create a mouse interactor 3.Attach mouse interactor to the action 4.Attach mouse interactor to the VME

MAF Ex: declare the new Action Uncomment code of GetAction() function inside the.cpp : also inside the.h file:

MAF Ex: Create the Interactor Uncomment code to create interactor in.cpp file:

MAF Ex: Destroy Interactor Inside OpStop() uncomment code to destroy interactor:

MAF Ex: Assign Interactor to Action Uncomment code to send event to attach interactor inside OpRun() function: And inside OpStop() to detach it:

MAF Ex: Attach Interactor to VME First, comment out lines assigning interactor to action (PASS 3)! Set the interactor in the m_behavior field of VME’s mafVmeData inside OpRun():

MAF Ex: Attach Interactor to VME(2) Also uncomment code to detach interaction inside OpStop():