Download presentation
Presentation is loading. Please wait.
Published byChase Ramos Modified over 11 years ago
1
National Alliance for Medical Image Computing http://na-mic.org User Desktop Slicer 3.0 Architecure AlgorithmsITKVTK Slicer Modules VTK Apps Using ITK Scripts of Slicer Mods Batch Programs Non-NAMIC Cmd tools LONI Pipeline Birn Grid Data/Compute Slicer 3.0
2
MRML Base Logic Links to: ITK MRML VTK (except Rendering) GUI Links to: VTK Rendering KWWidgets Observe Modified Events Edit Mrml Scene/Nodes Mediators Interactive Module Logic Links to: Base Logic ITK MRML VTK (except Rendering) GUI Links to: VTK Rendering KWWidgets Mediators Observe Modified Events on Application State Edit Mrml Scene/Nodes Registers GUI Event Observers Observe Modified Events Provides Frames for Widgets, Routing of User Events Execution Model Manager Logic Links to: Base Logic GUI Links to: KWWidgets Mediators External Processes (Grid/Pipeline) Speak MRML (link to libmrml or have data staged by slicer) Uses the JSON interface (Managed by Base and communicats like other Modules) Describe Input options Formulates Command Line and possibly stages data MRML Aware Processes Can Edit Mrml Scene/Nodes and Observe Modified Events Slicer 3 Architecture Diagram (2006-01-26) Auto-Generated GUIs from JSON Descriptions 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
3
data layerdata mediatorlogic layergui mediatorgui layer Main program; Bootstrap application logic, Create application gui MRML data model VTK pipeline Logic code adds modified event observers to MRML scene and MRML nodes. Logic methods apply changes to the MRML scene. (VTK, ITK, no KWWidgets, no VTKRendering) vtkObject vtkSlicerLogic - Undo manager, - tracing vtkSlicerApplicationLogic - MRML slice # - transient state - open views, slices, modules (and active) - cursor location - version - focus, event routing vtkSlicerViewLogic vtkSlicerLinkedSliceLogic vtkSliceLogic - vtkImageReslice - vtkImageComposite vtkSlicerSliceLayerLogic - MRML node - Opacity - Compositing - Window/level vtkSlicerViewLogic vtkSlicerModuleLogic - Undo/tracing helpers vtkSlicerEditorLogic vtkSlicerMRMLLogic vtkSlicerCustomModuleLogic GUI code adds observers to modified events generated by/to logic Apply methods from GUI classes call set method in logic to change state vtkKWWidget vtkSlicerGUI - look & feel? - set command helpers? vtkSlicerApplicationGUI - connect to window system - vtkKWApplication - vtkKWWindow vtkSlicerViewGUI - Render windows - mappers, actors vtkSlicerSliceGUI - vtkImageMapper - vtkKWRenderWindow vtkSlicerSliceLogicGUI vtkSlicerModuleGUI vtkSlicerCustomModuleGUI
4
National Alliance for Medical Image Computing http://na-mic.org Slicer Daemon Slicerd listens on local socket slicerget –gets volume and writes to stdout in nrrd slicerput [name] –reads nrrd on stdin and puts in slicer % slicerget 0 | unu 1op exp - | slicerput
5
National Alliance for Medical Image Computing http://na-mic.org ITK IO and Slicer Daemon AntiAliasBinaryImageFilter.exe bunny.z.nrrd "| sh slicerput.tcl"
6
National Alliance for Medical Image Computing http://na-mic.org 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
7
National Alliance for Medical Image Computing http://na-mic.org Undo 1 st Pass Initial Scene Application Logic N1 N2 N3 Delta1 Scene R N4 R Delta2 Scene R R N5 Saved Scene N1 N4 N5 Undo Stack
8
National Alliance for Medical Image Computing http://na-mic.org Undo Current Initial Scene MRML Scene N1 N2 N3 Delta1 Scene N4 Delta2 Scene N5 Saved Scene N1 N4 N5 Undo Stack
9
National Alliance for Medical Image Computing http://na-mic.org Slice Management Foreground Slice Layer Logic Slice Node Slice Composite Node Background Slice Layer Logic Slice Logic Volume Display Node Volume Node Volume Display Node Volume Node Slice GUI 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
10
National Alliance for Medical Image Computing http://na-mic.org Slice Coordinates XY Image Space Coordinates Slice Coordinates RAS to RAS Coordinates IJK Volume Coordinates XYToSlice Matrix SliceToRAS Matrix RASToRAS Transforms RASToIJK Matrix IJK = RASToIJK * RASToRAS * SliceToRAS * XYToSlice * XY SliceNode XYToIJK Matrix Calculated by SliceLayerLogic From GUI
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.