Page MenuHomePhabricator

[Segmentation] 3d region growing does not work with low seed point values
Closed, ResolvedPublic

Description

using the 3d region growing segmentation tool with the lung_001_image.nii.gz (alternative link) data set, setting the seed point inside the lung (very low pixel value) and running the segmentation leads to a workbench crash.

To reproduce:

  • start MITK workbench
  • load mentioned data set
  • open segmentation plugin
  • create new segmentation
  • switch to 3d tools
  • activate region growing 3d
  • set seed point (shift + left click) inside dark lung area
  • run segmentation
--> crash with the following error-message:
\ITK-4.13\itkBinaryThresholdImageFilter.hxx:242:itk::ERROR: BinaryThresholdImageFilter(000001D6A76ECB00): Lower threshold cannot be greater than upper threshold.

MITK-version: MITK v2021.02
tested on macos and windows (VS community 2019)

is this related?
D486

Revisions and Commits

rMITK MITK
Restricted Differential Revision
Restricted Differential Revision

Related Objects

Event Timeline

m907r triaged this task as Unbreak Now! priority.Wed, Oct 13, 5:04 PM
m907r created this task.
kislinsk lowered the priority of this task from Unbreak Now! to High.Thu, Oct 14, 7:48 AM
kislinsk moved this task from Backlog to Cycle on the MITK (v2021.10) board.

We actually talked about the priority and I explicitly said to set it to "Unbreak Now" because it HAS to be fixed for the upcoming release. What are your thoughts?

We actually talked about the priority and I explicitly said to set it to "Unbreak Now" because it HAS to be fixed for the upcoming release. What are your thoughts?

If it has to be in the installer it as to be resolved tomorrow; independent of the chosen priority. The only realistic option is, to add save guard in the tool that only performes the filter pipeline if thresholds are valid. And in other cases an error due to illposed intensity spectrum at the selected position.

Is doesn't have to be in the installer - but it has to be in the final release, meaning: It will probably be a bug found by some manual checklist testing by some random people.

Found the bug. The lower threshold for the region growing preview is set to itk::NumericTraits<TPixel>::min() when the region growing direction is downwards. However, itk::NumericTraits<TPixel>::min() is the wrong method as it has a different meaning for floating point values than the author obviously expected (compare to min() vs. lowest() in std::numeric_limits<>). The correct method is itk::NumericTraits<TPixel>::NonpositiveMin(), which works for all cases and is the right semantic minimum of a range of values.

BTW I recommend to test always with the latest snapshot installer instead of the last release.

kislinsk added a revision: Restricted Differential Revision.Fri, Oct 15, 7:01 AM