Page MenuHomePhabricator

Migrate MITK to use ITK 5.x
Open, HighPublic


MITK should migrate to use the ITK 5.x series. This task is meant to document findings, overall progress etc..

Official migration guide is here:

  • After migration, we should go through all filters that implement ThreadedGenerateData(), to check, if they have a constructor that calls this->DynamicMultiThreadingOff();. Otherwise they should override DynamicThreadedGenerateData() instead.

Revisions and Commits

Event Timeline

nolden triaged this task as Normal priority.May 22 2020, 1:27 PM
nolden created this task.

I changed the superbuild to use ITK 5 with compatibilty and fixed some straightforward issues. This branch can be used for further investigations @floca : some ideas about the geometry issues would be very helpful. The migration guide has an overview on the topic but my experience in that area is limited

I had a swift look into ITK and our code base and I would guess the following:

  • mitkBaseGeometry.h: typedef itk::AffineGeometryFrame<ScalarType, 3> AffineGeometryFrame3D can be completly removed because it is not used any more in our code base
  • mitkAffineGeometry3D.h: typename itk::AffineGeometryFrame<ScalarType, 3>::TransformType AffineTransform3D; can be replaced with using AffineTransform3D = itk::ScalableAffineTransform<ScalarType, 3>

That should do the trick, if I have not missed something. Pressing thumbs.

@floca : thanks. Not the whole trick but helped a lot. I will follow up with more geometry questions later ;)

For now if someone wants to pick up work on this, there are some uncurated fixes here which are correct but have to be cleaned up before pushing to MITK repo:

kislinsk raised the priority of this task from Normal to High.Apr 12 2021, 10:54 AM
kislinsk edited projects, added MITK (v2021.10); removed MITK.

@kislinsk thanks for taking over. The WIP stuff I put on github still could be useful, see comment above. let me know if I can help.

Is this task finished or if not when is it planned?

Is this task finished or if not when is it planned?

We are currently working on it. Our plan is to finish the migration within the next weeks. It will be part of the next official release in October.

Can this also be matched with this other task I created?

Can this also be matched with this other task I created?

I only need help in one place if that part is cleared then I already refactored the Core to reflect the changes suitable for version 3.6.0 of CppMicroServices.

I cannot see your task since you set the policies too strict.

Fixed the task policy :D Did you get acces to it ?

Let me know if you got hold of it.

kislinsk added a revision: Restricted Differential Revision.Jun 28 2021, 2:18 PM

I continued migrating MITK. Without explicitly switching on any plugins, the Workbench already compiles and run. Switching on the WorkbenchRelease configuration (without MatchPoint, since I cannot currently compile it because of a compiler bug) compiles as well except for the following two classes which need a rewrite of their multi-threaded implementation, since the ITK base class changed its implementation in that regard:

  • mitk::ExtendedStatisticsImageFilter
  • mitk::ExtendedLabelStatisticsImageFilter

Will not be included in the upcoming release. Very likely will make it into the spring release, though, and we will have a few months time to discover bugs and other odd things after the upgrade if we resolve this task soon after the upcoming release.