In the segmentation tools deriving from AutoMLSegmentationWithPreviewTool tool manager class viz. Otsu and Watershed, when Preview labels are selected for Confirmation; the tool requests the segmentation to be recomputed. In other words, ComputeMLPreview method is called again when a label in the QmitkSimpleLabelListWidget is selected for the first time.
Steps:
- Load image into the workbench
- Open Segmentation plugin -> Otsu Tool
- Click Preview (now OtsuTool3D.ComputeMLPreview method is called to compute a segmentation)
- Now click on any of the labels listed in the list widget below.
Again, a redundant call is made to OtsuTool3D.ComputeMLPreview method to recompute the same segmentation.
However, a redundant recomputation never really happens numerically due to some checks implemented in the tool's ComputeMLPreview method to circumvent this behaviour. This is why we don't see a performance drop.