GIMIAS Architecture

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

GIMIAS Kernel has been developed focusing in two main user requirements: extensibility and reusability: It should be easy to add a new functionality and make it available to other developers of GIMIAS framework.

These two features allow GIMIAS framework to easily integrate new processing and visualization libraries into a single application. As a result, powerful applications can be built reusing available components.

Regarding the software design and architecture of the Kernel, these software engineering principles have been considered:

In this page, all extensible GIMIAS components will be explained with links to UML class diagrams and direct DoxyGen source code documentation for most important classes.

Components

The core strategy that allows to extend the framework is based on a plugin mechanism. A Plug-in provides a collection of functionalities that can be added to the framework at runtime.

GIMIAS provides a set of abstract classes with a well defined interface that should be implemented by the plugins. The implemented interface is then registered to the framework using a factory method pattern. The framework will create concrete implementations depending on the needs, using the registered factory.

The most extended components are the processing and the user interface.

Basic components

All these basic components are available in the Kernel low level library GmCommonObjects.

  • Programming: GIMIAS framework is written in C++ and based on object oriented programming.
  • Memory management: For managing objects life-cycle, SmartPointers strategy is used.
  • Events notification: For notification of events between objects, a templated subject-observer design pattern implementation has been developed (DataHolder)
  • Object creation: Factory method pattern is used to create objects, allowing to hide implementation details and dependencies between objects
  • Error handling: Specific class and macros for supporting exceptions has been developed based on standard library
  • Generic tag container: A generic tag container allows storing any kind of tag, like integers, doubles or strings and serialize these into XML format automatically

Data (Extensible Data Component)

The extensible data component allows to easily extend the supported data type representations of the framework, like for example a new image data type. As an example, the GIMIAS MITK plugin extends the framework with 3 image classes: vtkImageData, itk::Image and mitk::Image, while CMGUI plugin extends the framework with CMGUI image structure.

Read more in Extensible Data Component.

Processing (Extensible Processing Component)

New processing filters can be added to the framework to process data. The processing component uses the Data component to retrieve the required data representation of the filter.

Read more in Extensible Processing Component.

Input and Output (Extensible Input and Output Component)

This component allows to register new readers and writers for specific file formats.

Read more in Extensible Input and Output Component.

Plugin (Extensible Plugin Provider Component)

This functionality of the Kernel allows adding new Plugin providers with specific plugin specifications. The plugin provider is the responsible for scanning new plugins and for loading the selected ones.

Read more in Extensible Plugin Provider Component.

Execution (Extensible Execution Component)

This component executes processing filters directly by the main thread or in background, using multithreading. This requires a filter execution manager and GUI events communication strategy.

Read more in Extensible Execution Component.

Visualization (Extensible Visualization Component)

Some advanced visualization libraries are required to visualize specific data. For example CMGUI library developed by The University of Auckland. GIMIAS kernel doesn't provide any visualization by default. The two main visualizations available are MITK and CMGUI. This feature allows visualizing the same data object in two different views at the same time and synchronize the visualization of the object, with an automatic camera configuration. For example a surface mesh can be visualized in a 3D VTK and CMGUI view at the same time. You can find a video here.

Read more in Extensible Visualization Component.

User Interface (Extensible User Interface Component)

This component allows registering new user interface windows for user interface.

Read more in Extensible User Interface Component.

Clinical workflow component

This component allows creating clinical workflows for guiding the user through the steps of a clinical workflow. The clinical workflow can be customized with specific processing steps, windows and working areas.

Read more in Clinical workflow component.

Working Area Component

Working Area is the main user interface area of GIMIAS where the objects are rendered. This component allows creating new working areas using the already available views (3D or 2D) and rendering engines (MITK and CMGUI).

Read more in Working Area Component.

Automatic Updates Component

This component allows updating the users with new version of your plugins or libraries.

Read more in Automatic Updates Component.

Data Tree

Data tree is the main data repository and contains all data objects allocated in memory (DataEntity instances). This is the place where to put all data generated by all filters.

The main advantages of Data Tree are:

  • Provides a common repository to share data between plugins
  • Allows user to render, save and read the data using kernel components

wxWidgets components

These components are dependent of the user interface library, like the main window or the movie toolbar. Currently, the used library is wxWidgets.

Read more in wxWidgets components.

Model-View-Controller

To isolate the domain model from the user interface, three classes should be considered:

  • DataEntity: Stores data
  • Processor: Process data
  • ProcessingWidget: Provides graphical interface to the processor

When a processor generates data, a new DataEntity will be created and added to the Data tree. DataEntity is a container of any kind of data. If there's no container for your specific type of data, you should try to create a new type.

Processor is responsible to process data. Processor code should never depend on GUI library or access to the GIMIAS framework classes.

Processing Widget is the responsible of the interface with the end user and with the Framework. The widget is dependent of the GUI library. This is the less reusable code. We recommend the developers not to put processing code in the widget, because it makes it less reusable. You should put in the widget the code that is dependent on GUI library. Currently GIMIAS is using wxWidgets as GUI library.

Third party dependencies

GIMIAS Framework use these third party libraries in some of the components:

  • itk: For smart pointer implementation and itksys (GmCommonObjects). It's composed of a single dynamic library called ITKCommon and several static libraries.
  • boost: For subject observer implementation (GmCommonObjects). It's composed of seven static libraries.
  • log4cplus: For logging in some few classes (GmCommonObjects). It's composed of a single dynamic library called log4cplus
  • tinyXml: For reading/writing XML files, like the GIMIAS configuration file or GIMIAS metadata file (GmDataHandling). It's composed of a single static library called tinyxml
  • slicer: For command line module description management (GmFiltering). It's composed of one static and one dynamic library
    • expat: An XML parser used for parsing slicer XML description files
    • TCLAP: Templatized C++ Command Line Parser Library. No libraries
    • ITK: Used to implement the progress of the filter and for itksys
    • VTK: Used to implement the progress of the filter
  • libElf: Read ELF files for dynamic execution of DLLs in DynLib component (GmKernel)
  • wxWidgets: For Graphical User Interface (GmWidgets)

Available open source plugins

For a complete list of all available plugins you can access here.