Medical Imaging Interaction Toolkit  2018.4.99-9a29ffc6
Medical Imaging Interaction Toolkit
The spectral unmixing (SU) plugin
Icon of Spectralunmixing

of contents

  • Introduction
  • Overview
  • How to add an additional algorithm


The spectral unmixing plugin provides a GUI tool to perform spectral unmixing of multispectral MITK images. It was designed to unmix beamformed photoacoustic images. The outputs are MITK images for every chosen absorber (endmember). Furthermore it is possible to calculate the oxygen saturation of the multispectral input if the endmembers oxy- and deoxyhemoglobin are selected in the GUI as well as an output image that contains the information about the relative error between unmixing result and the input image. Detailed information about the Plugin, the baseclass and its subclasses can be found in their header files. If you want to call the SU filter from your own class have a look at the “mitkSpectralUnmixingTest.cpp”. There you find information about which functions are callable or have to be called from your class to guarantee the promised functionality of the SU filter.


  • supports several linear Eigen solvers collected in the “mitkPALinearSpectralUnmixingFilter”
  • supports several linear Vigra solvers collected in the “mitkPASpectralUnmixingVigraFilter”
  • calculates oxygen saturation with the “mitkPASpectralUnmixingSO2”

to add an additional algorithm:

If the algorithm fits in one of the existing classes you can ignore steps 0. – 3. 0. Have a look at the commit rMITK36cfd1731089: implement three empty classes for Simplex, Lagrange and Vigra SU algorithms. Which actually are exactly the first (not all!) steps to implement a new algorithm.

  1. Add your future header and cpp file to files.cmake
  2. Create a header file which needs at least the methods shown in header.png
    empty header for a new SU algorithm
  3. Create a cpp file which takes an Eigen endmember matrix and an Eigen input vector as inputs and returns an Eigen vector as result. A structure like in the cpp.png is recommended. If your class will consist of more than one algorithm you should have an if/else decision between them with an enum like in the cpp.png otherwise you can directly return your result.
    example cpp file for a new SU algorithm
  4. In the Plugin you just have to add another “else if” like in the plugin.png. The string in the else if has to be the same then selectable in the GUI(step 5).
    changes of Plugin for a new SU algorithm
  5. To make you algorithm selectable you have to add to the GUI Combobox. Klick at 1. (GUI.png), then at 2. and then name your algorithm 3. like in step 4.
    changes of GUI for a new SU algorithm