Migration Guide

From mitk.org
Jump to navigation Jump to search

Migrating from v2016.11 to v2018.04

Theming: adaptive icon colors

We provide basic theming support for SVG icons. The color #00ff00 (green) can be replaced by a theme-defined color at loading time. In this process, also the color #ff00ff (magenta) is replaced by a theme-defined accent color. While toolbar icons are automatically styled at program start, you have to manually style all other icons by either using QmitkStyleManager or berry::QtStyleManager:

button->setIcon(QmitkStyleManager::ThemeIcon(QStringLiteral(":/MyIcon.svg")));

button->setIcon(berry::QtStyleManager::ThemeIcon(QStringLiteral(":/MyThemedIcon.svg")));

WARNINGS_AS_ERRORS vs. WARNINGS_NO_ERRORS

MITK modules and plugins cannot be marked with WARNINGS_AS_ERRORS anymore and warnings are handled as errors by default now. While discouraged, you can disable this behavior with WARNINGS_NO_ERRORS, though.

Load() methods of mitk::IOUtil class

Before:

auto image = mitk::IOUtil::LoadImage("path"); auto surface = mitk::IOUtil::LoadSurface("path"); auto pointSet = mitk::IOUtil::LoadPointSet("path");

Now:

auto image = mitk::IOUtil::Load<mitk::Image>("path"); auto surface = mitk::IOUtil::Load<mitk::Surface>("path"); auto pointSet = mitk::IOUtil::Load<mitk::PointSet>("path");

MITK_PP_* macros

These macros were replaced by their original BOOST_PP_* counterparts. Only mitkPPArgCount.h is left as it does not originate from Boost.

SOFA and MITK Simulation

Experimental support of SOFA and hence MITK Simulation was removed as SOFA is not compatible with VTK 8.1 regarding essential concepts. If you rely on these functionalities, we recommend to stick to MITK v2016.11.