Page MenuHomePhabricator

[Image statistics] Error is logged if a label is empty
Open, NormalPublic

Description

Using a mask (multilabel segmentation node) for the image statistics with an empty label prints an error message to the log and to the status bar in the bottom, but it is not prominently shown to the user.

To reproduce:

  1. start the MITK workbench, open the Segmentation and the Image Statistics view
  2. load a basic 3D image
  3. create a new segmentation for that image and do not draw a mask
  4. select both nodes in the Image Statistics view

--> See how the hourglass does not disappear and the following error message is printed to the terminal / status bar:

Error when calculating statistics: Error while running computation. Error description: Failure while calculating the statistics: C:\jenkins\MITK\snap\src\MITK\Modules\ImageStatistics\mitkImageStatisticsCalculator.cpp:165:

I think the error message is important and should be shown to the user explicitly.

Event Timeline

kalali triaged this task as Normal priority.Apr 27 2022, 12:41 PM
kalali created this task.

This was already discovered here:

Also: When using a segmentation without any label the log says

459.42 core.mod.imgStatUi.imgStatCalculationrunnable ERROR: Failure while calculating the statistics: MITK-dev\src\Modules\ImageStatistics\mitkImageStatisticsCalculator.cpp:165:
unknown label
460.60 WARNING: Error when calculating statistics: Error while running computation. Error description: Failure while calculating the statistics: MITK-dev\src\Modules\ImageStatistics\mitkImageStatisticsCalculator.cpp:165:
unknown label

without giving any hint on the workbench UI. Only the hourglass won't disappear.