T28225 Fix SegTool2D WritePreviewOnWorkingImage to work correctly with any label
Summary:
BREAKING ContourModelUtils::FillSliceInSlice
Why: Foreground detection was hard coded to 1<foreground.
This was ok for the use so far (FillContourInSlice), because there the
foreground value was 255. But was problematic for general usage.
Changed now the check to "fillForegroundThreshold<=foreground" and
the default of filForgroundThreshold to 1.
How to adapt: You only have to adapte if values of 1 are still background in
your case. Then you have to pass a fitting fillForegroundThreshold for your case.
+ Improved constness
+ Removed obsolete InternalWritePreviewOnWorkingImage
+ Removed unnecesary member CorrectorTool2D:m_WorkingSlices (reduces internal states)
+ Fixed T28225
Test Plan: code review, unit test
Reviewers: O1 MITK Reviewer Group I, O3 MITK Reviewer Group II, kislinsk
Reviewed By: O1 MITK Reviewer Group I, O3 MITK Reviewer Group II, kislinsk
Subscribers: kislinsk
Maniphest Tasks: T28225
Differential Revision: https://phabricator.mitk.org/D472