Difference between revisions of "Slicer3:UIEngineering"

From NAMIC Wiki
Jump to: navigation, search
m (Text replacement - "http://www.slicer.org/slicerWiki/index.php/" to "https://www.slicer.org/wiki/")
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
[[Slicer3:Interface_Design|Return to Slicer3 Interface Design and Usability ]]
+
<big>'''Note:''' We are migrating this content to the slicer.org domain - <font color="orange">The newer page is [https://www.slicer.org/wiki/Slicer3:UIEngineering  here]</font></big>
 
 
== Slicer3 GUI layer architecture and engineering ==
 
 
 
=== GUI architecture and interface to application layer ===
 
 
 
Our goal was to create a thin and stateless GUI layer for Slicer3 whose architecture allows the flexible expression of interfaces that are appropriate for Slicer’s different use scenarios: an end-user application graphical user interface; script-driven batch processing and unit testing; and command-line style interaction for launching pipeline/grid processing, debugging during development, ''etc''.
 
 
 
The schematic below shows the Slicer3 GUI layer design and its interface with the application layer (which includes the logic layer and the data model as shown). The design isolates the application layers from GUI code, allowing them to be invoked by the Slicer3 desktop application and GUI (Slicer3), or a custom application with or without a graphical user interface, or which may use a completely different GUI toolkit.
 
 
 
[[Image:Slicer3ArchitectureHalfsize.png|[[Image:Slicer3ArchitectureHalfsize.png| Slicer3 GUI, Logic and Data layers ]]]]
 
 
 
User input to the GUI layer modifies parameters in the MRML scene and Logic classes, and updates and executes pipelines. So that the GUI can accurately reflect application state, it maintains observers on the MRML scene, MRML nodes, and Logic objects; when the application state encapsulated in the parameters of those objects changes, events are generated, then observed and processed by the GUI to update its widgets' transient state (like entry widgets or scale values, and rendered image output).
 
 
 
The GUI's visual style is being designed to reflect Slicer3 brand. Developers are encouraged to adhere to style guidelines to maintain a consistent look and feel across core and custom modules and to make Slicer3 easier to learn. The style is defined and described by the Tk Options Database configured by a Slicer3 class (vtkSlicerTheme.h/cxx). These options can be overridden in an module's GUI, if a developer finds this necessary, by redefining new Tk options for widgets defined there.
 
 
 
=== Architecture of a Module GUI ===
 
A schematic showing classes from which a developer's module GUI are derived is shown below. For more detailed information about adding a module GUI to Slicer, see: [[Slicer3:Interface_Design#First_steps:_How_to_build_a_Slicer3_Module_GUI | How to build a Module GUI.]]
 
 
 
[[Image:Slicer3MyModule.png | Module base classes and their methods ]]
 
 
 
 
 
=== Independent stateless GUI layer ===
 
 
 
An important design features is the restriction of application state to the MRML and Logic classes; the GUI layer is completely independent of these two application layers. This stateless GUI layer offers many benefits. For one, any MRML scene may be deleted or loaded and the GUI will automatically track that scene; for another, Slicer's full functionality is available even when Slicer operates without the GUI layer, or with another GUI entirely. For more information about how this design is accomplished, see: [[Slicer3:StatelessGUI | Keeping the GUI layer independent and stateless ]].
 
 
 
''' Return to TOC '''
 
 
 
[[Slicer3:Interface_Design|Return to Slicer3 Interface Design and Usability ]]
 

Latest revision as of 18:00, 10 July 2017

Home < Slicer3:UIEngineering

Note: We are migrating this content to the slicer.org domain - The newer page is here