Medical Imaging Interaction Toolkit  2025.12.99-499a58d9
Medical Imaging Interaction Toolkit
Build Instructions

Introduction

MITK uses a CMake-based superbuild system. The superbuild downloads and builds almost all required third-party libraries before building MITK itself.

This page explains how to configure and use the MITK superbuild.

Prerequisites

You need the following software:

  1. Git
  2. CMake (version 3.22 or later; CMake 4 is not yet supported)
  3. Qt (version 6.6 or later; see below)
  4. Doxygen (version 1.9; Doxygen 1.10 and later are not yet supported)
  5. GraphViz

Linux

On Linux, install the following packages including Git, Doxygen, and GraphViz as mentioned above (example for Ubuntu using APT):

sudo apt install bison build-essential doxygen git graphviz \
libegl-dev libfreetype6-dev libglu1-mesa-dev libopengl-dev \
libpcre2-dev libssl-dev libtiff5-dev libxcomposite1 libxcursor-dev \
libxcb-cursor-dev libxdamage-dev libxi-dev libxcb-icccm4 \
libxcb-keysyms1 libxcb-shape0 libxkbcommon-dev libxkbcommon-x11-0 \
libxkbfile1 libxrandr2 libxtst6 libxt-dev mesa-common-dev

Windows

On Windows, install Visual Studio 2022 with the Desktop development with C++ workload.

You also need an OpenSSL version that matches the OpenSSL dependency of MITK’s Python package. Currently, this is OpenSSL 3.5. We recommend using the builds provided by Shining Light Productions.

macOS

On macOS, install the Command Line Tools (they provide the required compilers and SDKs):

xcode-select --install

Then install the following packages, for example via Homebrew:

brew install freetype graphviz libomp openssl@3

Note: Because of known incompatibilities, OpenMP is disabled on macOS when MITK_USE_Python3 is enabled (default), though.

Qt

MITK does not provide Qt as part of its superbuild. You must install Qt manually. The Qt Group provides installers for all supported platforms:

https://www.qt.io/download/

We highly recommend installing Qt to the default location, so CMake can find it automatically.

In the Qt installer, make sure to select the following additional libraries:

  • Qt 5 Compatibility Module
  • Qt State Machines
  • Qt WebEngine (see note below)
  • Qt WebChannel (Qt 6.8 and later)
  • Qt Positioning (Qt 6.8 and later)

Note: Starting with Qt 6.8, Qt WebEngine is no longer listed under "Additional Libraries". It is now located under "Extensions > Qt WebEngine".

Build MITK with CMake

With all prerequisites installed and using standard/default settings, building MITK with CMake is straightforward.

Linux or macOS:

git clone https://github.com/MITK/MITK.git
cmake -S MITK -B MITK-superbuild -G "Unix Makefiles"
cmake --build MITK-superbuild -- -j6

Windows:

git clone https://github.com/MITK/MITK.git
cmake -S MITK -B MITK-superbuild -G "Visual Studio 17 2022"
cmake --build MITK-superbuild -- -m

A note on the MITK superbuild

The MITK superbuild has the major advantage that most of MITK’s dependencies are built automatically and do not need to be provided manually. The trade-off is that it requires a short introduction to understand how the superbuild concept works.

The superbuild compiles not only all dependencies, but also MITK itself as the final step.

When developing with MITK, and as long as no dependencies are changed or updated, it is sufficient to continuously build only MITK. There is no need to run the superbuild again and again.

Here is the crucial point from a CMake perspective: Both the superbuild and the MITK build share the same source directory. The only difference is the build directory, for example:

  • Superbuild: /path/to/MITK-superbuild
  • MITK build (inside the superbuild): /path/to/MITK-superbuild/MITK-build

Once the superbuild has finished, you usually switch the build directory in CMake to the MITK-build directory. This reveals an entirely different set of CMake options, now specific to building MITK itself.