GIMIAS Plugin Architecture

From user's Wiki!
Jump to: navigation, search

Main goal

Extensibility and reusability: It should be easy to add a new functionality and make it available to other users of the GIMIAS framework

Motivation

A new developer wants to add a new library with new functionalities. This library provides new functionalities to segment the heart. This is the first step of the Cardiac workflow. The next step is quantification of the segmented mesh implemented by another library. A Plug-in provides a collection of functionalities that can be added to the framework at runtime. These include the data creation/data editing procedure, rendering functionality, GUI interactions or readers and writers.

FrontEnd Plugin Manager

GIMIAS Plugins Puzzle.png

  • Automatically search all DLLs in the plugins folder and registers them, so the user can select what plugins to load
  • Profile configuration that loads all plugins matching each profile
  • Use cross-platform method to load the shared library
  • Each plugin has two functions implemented automatically using a MACRO
    • getProfileDescriptor
    • newFrontEndPlugin

Plugin Extensibility

A plugin can add different components to Gimias:

  • GUI components:
    • Tab Page: Main window composed of toolbars, working areas and widgets in the right column
    • Processing Widget: Widget to process data
    • Selection Widget: Widget to select data
    • Working Area: View for the data objects
    • Toolbar: Quick access to often used functionalities
  • Non-GUI components:
    • Data Reader/Writer (e.g. cgns file reader/writer, vtk image data reader/writer, etc.)
    • Data types (e.g. mitkSurface, vtkPolyData, etc.)

Usually a plugin adds a Tab Page and several processing widgets in the command panel.


Loading plugins.PNG

Layers

GIMIASLayers.JPG

GIMIAS is a two layered system:

  • Plugin layer: Contains all plugins of GIMIAS framework like DICOM Plugin or Scene View Plugin
  • Framework layer: Contains 6 main components from top to bottom:
    • Widgets: Several widgets are available to be used by any plug-in
    • Interactors: GUI Interaction for data objects in the rendering scene
    • Kernel: Kernel objects like plug-in-manager, data container, logger, rendering tree, ...
    • IO: Reader and writers of different formats from and to files
    • Data Handling: Data types and its associated builders to create objects of each data type and create the rendering data objects
    • Common Objects: GIMIAS object base class, Exceptions, container based on observer pattern

GIMIAS Framework

GIMIASFrameworkLayers.JPG

The framework layer is built on top of two layers:

  • Modules: Open source CISTIB Libraries
    • wxMITK: Extension of MITK using wxWidgets
    • dcmAPI: Simplified interface to dcmtk for scanning DICOM data from disk and read the files
    • pacsAPI: Simplified interface to query and retrieve data from a PACS server
  • Third-party libraries: VTK, ITK, Boost, wxWidgets, DCMTK, MITK


GIMIAS Plugin

GIMIASPluginLayers.JPG

GIMIAS Plugin is built on top of two layers:

  • Modules: Your own algorithms and libraries
  • Third-party libraries: Third-party libraries needed by your Modules layer