T28118 Refactor SegTool2D and derived classes (1st batch)
Summary:
Corrected comments, removed undefined constructor
GetAffectedImageSliceAs2DImage is now static and public to lower intra class dependency and to allow the use of this feature without the need to derive from SegTool2D.
+ Added GetAffectedImageSliceAs2DImageByTimePoint
Added first draft for 2D/3D FastMarchingBaseTool
+ Added WorkingPlane support to AutoSegmentationWithPreviewTool
+ Added support of interactorType definition to AutoSegmentation base classes
Refactored TimeStepType of DiffSliceOperation
Improved constness of ContourModelUtils
Corrected use of TimeStepType
BREAKING
Removed setters from DiffSliceOperation as they where implemented in a
way that lead to an invalid state. Further some namings where missleading.
Directly configure the operation via the constructor/New() call.
+ Improved constness of several classes
Improved const support of LabelSetImage
+ added tests for const overloads
BREAKING CHANGES!!! + Changed signature of SliceInformation supporting WriteBackSegmentationResult to WriteBackSegmentationResults (needed to avoid now compiler errors due to implicit parameter conversion). + Aligned behavior of...
...WriteBackSegmentationResults to the behavior of other WriteBackSegmentationResult overloads. Until now WriteBackSegmentationResults had a complete different implementation that. No it is streamlined and WriteBackSegmentationResult overloads all call WriteBackSegmentationResults and all behave like the former WriteBackSegmentationResult(const PlaneGeometry* ...) version. + Made SliceInformation element const to avoid unintended manipulation.
Additionally:
+ improved const correctness
+ refactored redundant code into own function (RemoveContourFromInterpolator)
+ added UpdateSurfaceInterpolation overload to support the processing of
a SliceInformation vector at once.
+ Reworked LiveWireTool2D to use the new reworked WriteBackSegmentationResults
correctly
+ Fixed internal "bug"/inconsistency in working slice generation in LiveWireTool2D.
Problem was not obvious/relevant so far, because the bug got covered by an other effect (maybe that was the reason of the very "special" own implementation of the slice writing...). Would become a problem as soon as LiveWireTool2D should e.g. correctly support Undo/Do.
Added time point change support to SegTool2D
improved parameter naming
Fixed rendering of contours on time steps > 0. Fixed T28128
Corrected support of time geometries in contour interactors.
- Fixed T28129
Improved SegTool2D interface
- more constness
- protected access to LastTimePointTriggerd
- Optimized method names to be less confusing
- GetAffectedReferenceSlice overload for use without event information.
BREAKING behavior LiveWireTool2D
Reworked/fixed LiveWireTool2D. Now correctly works on 4D images
with static or dynamic segmentations.
Changed behavior to have a clearer/simpler UX. Now, unconfirmed
life wire contours are WYSIWYG. They will painted to the time step/ slice
visible when confirmed. No matter in which time step the creation of
the live wire was started/done.
+ Fixed T27800
Improve constness
Finished refactoring of FastMarchingTool for 2D and 3D to use same code base
Start to remove redundancy in tool UIs
Reworked GUI of 2D/3D FastMarchingTool to reduce redundant code and use QmitkAutoSegmentationToolGUIBase
Refactored QmitkOtsuTool3DGUI to use QmitkAutoMLSegmentationToolGUIBase and to remove redundant code
Refactored QmitkWatershedToolGUI to use QmitkAutoMLSegmentationToolGUIBase and to remove redundant code
Improve constness of contour classes
Fixed error in ContourModel::Clear(int)
- Call always reseted complete contour
- Added test for clear functions
Test Plan: code review, unit test and checklist
Reviewers: O1 MITK Reviewer Group I, O3 MITK Reviewer Group II, kalali
Reviewed By: O1 MITK Reviewer Group I, O3 MITK Reviewer Group II, kalali
Subscribers: kislinsk, neher, kalali
Maniphest Tasks: T28129, T28128, T27800, T26975
Differential Revision: https://phabricator.mitk.org/D450