HomePhabricator
Diffusion MITK 608a3021ae44

T28225 Fix SegTool2D WritePreviewOnWorkingImage to work correctly with any label

Description

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

Details

Provenance
flocaAuthored on Mar 14 2021, 9:09 PM
flocaPushed on Mar 16 2021, 8:47 AM
Reviewer
O1: MITK Reviewer Group I
Differential Revision
Restricted Differential Revision
Parents
rMITKb6864e69493a: Fixed review feedback.
rMITKf80ac56d3cd7: Rotate camera back after multiplanar screenshot
Branches
Unknown
Tags
Unknown
Tasks
T28225: [Segmentation] SegTool2D::WritePreviewOnWorkingImage does not work correctly