Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
CMake FAQ

A general comment

MITK uses CMake for configuration. If you want to develop either using MITK as a toolkit or by extending the capabilities of the applications provided by us, we recommend using CMake for your own project too. While it might be possible to use MITK in conjunction with other options, such as QMake or setting up your own project manually it will invariably involve a lot of work and probably hacks as well. As we do have no experience with this, we will not be able to help you. Be prepared to do a lot of tweaking on by yourself.

This guide does not try to give a general introduction to CMake, instead it tries to answer some basic questions that might arise for those new to CMake, to help you get started on MITK. For a more comprehensive introduction on CMake see here.

We will assume in this guide, that the path to your source is /MITK/.

Basic Questions

Where do I get CMake and what version do I need?

See Prerequisites.

I coded a new plugin for the Workbench and nothing happened. Why?

Do note that you need to move the source to the Plugins directory and you will have to add the plugin to the config file (most likely Plugins/PluginList.cmake). After that see I want to use a plugin, how do I activate it?.

I want to use a plugin, how do I activate it?

  1. Start CMake in the MITK-build directory inside your superbuild folder. E.g.
    cd ~/<your_MITK_superbuild_dir>/MITK-build
    ccmake . or cmake-gui .
  2. Optional: Configure to see all CMake variables.
  3. Find the variable MITK_BUILD_<plugin-id> and activate it. The <plugin-id> refers to the package name of the plugin.
    E.g. the plugin-id (also, the package name) org.mitk.gui.qt.application is the sub-directory of same name in plugins directory (~/MITK/Plugins/).
  4. Configure, again
  5. Generate
  6. Rebuild the MITK-build target using your development environment.

I want to use a module, how do I activate it?

Modules are build automatically if a plugin that requires them is activated. See I want to use a plugin, how do I activate it?.

MITK always downloads the toolkits, but I want to use my own.

This is covered in Configure the MITK superbuild.

I want to use an MITK plugin in my own project but I can not find it.

See I want to use some MITK plugin but.