Diffusion MITK b43019736082

Speed up "Accept all slices" 2d-interpolations of segmentations


Speed up "Accept all slices" 2d-interpolations of segmentations

After a few cleanup commits, I introduced two caches in the interpolation pipeline to cache distance image computation and slice extraction. I then distributed the interpolations of different slices to different threads.

Note that this is not meant for eternity. We definitely need to completely refactor the interpolation. The two caches are only necessary because the interpolation is split up into multiple classes and they are basically a replacement for such a simple thing as a persistent variable of an outer scope.

There's a huge fixed amount of time spent after the actual interpolation to create do/undo-operations and to apply the former one to the segmentation image. In the example in T28491 it takes three times longer than the actual interpolation, stretching 10s to 40s. Still better than the original 392s. Hence I would like to get this into the upcoming snapshot release by the end of this week.

Test Plan: I manually applied a lot of interpolations in all directions on several images with and without caches and I never got differing results except for the speedup.

Reviewers: floca, O1 MITK Reviewer Group I

Reviewed By: floca, O1 MITK Reviewer Group I

Differential Revision: https://phabricator.mitk.org/D515


kislinskAuthored on Jun 30 2021, 11:33 PM
kislinskPushed on Jul 1 2021, 10:07 AM
O1: MITK Reviewer Group I
Differential Revision
Restricted Differential Revision
rMITK90a074d4c276: Fix review remarks
rMITKacdd14fb9592: Merge branch 'bugfix/T28591-SourceFileExtensions' into develop

Merged Changes