Page MenuHomePhabricator

Fix mitkSegmentationInterpolationTest
Closed, ResolvedPublic

Description

As many many tests failed on the Dashboard because of a missing rebuild from scratch, a few tests flew under our radar which are probably really broken:

  • usModuleResourceTest
  • mitkLevelWindowManagerCppUnitTest
  • mitkLevelWindowManagerTest
  • mitkPreferenceListReaderOptionsFunctorTest
  • mitkUnstructuredGridClusteringFilterTest
  • mitkSegmentationInterpolationTest

Revisions and Commits

Event Timeline

usModuleResourceTest

The size of a PNG file that is used in the test has changed but it is hard-coded in the test.

mitkUnstructuredGridClusteringFilterTest

No reader available for .vtu files. Related to the deletion efforts of @hentsch in T23711: Delete LegacyIO Module. I revived the LegacyIO and IOExt modules.

mitkSegmentationInterpolationTest

282: 1) test: mitkSegmentationInterpolationTestSuite::Equal_Frontal_TestInterpolationAndReferenceInterpolation_ReturnsTrue (F) line: 145 /home/kislinsk/MITK/Modules/Segmentation/Testing/mitkSegmentationInterpolationTest.cpp
282: assertion failed
282: - Expression: readAccess.GetPixelByIndexSafe(currentPoint) == 1
282: - Have false negative segmentation.
282: 
282: 
282: 2) test: mitkSegmentationInterpolationTestSuite::Equal_Sagittal_TestInterpolationAndReferenceInterpolation_ReturnsTrue (F) line: 145 /home/kislinsk/MITK/Modules/Segmentation/Testing/mitkSegmentationInterpolationTest.cpp
282: assertion failed
282: - Expression: readAccess.GetPixelByIndexSafe(currentPoint) == 1
282: - Have false negative segmentation.

mitkPreferenceListReaderOptionsFunctorTest

T23640: mitkPreferenceListReaderOptionsFunctorTest fails

121: 1) test: mitkPreferenceListReaderOptionsFunctorTestSuite::UseOverlappingBlackAndPreferenceList (F) line: 102 /home/kislinsk/MITK/Modules/Core/test/mitkPreferenceListReaderOptionsFunctorTest.cpp
121: equality assertion failed
121: - Expected: MITK DICOM Reader v2 (autoselect)
121: - Actual  : MITK Simple Volume Importer

mitkLevelWindowManager[CppUnit]Test

Working again with the previous fixes. Was probably also related to the missing IO modules.

kislinsk renamed this task from Fix various tests to Fix mitkSegmentationInterpolationTest.Nov 22 2017, 2:29 PM
kislinsk removed kislinsk as the assignee of this task.
kislinsk added a project: Restricted Project.
kislinsk removed subscribers: floca, norajitr, hentsch.

The cause of the error seems to be in

Modules\Segmentation\Algorithms\mitkShapeBasedInterpolationAlgorithm.cpp

in the following lines (std::cout added for debugging purposes)

isoContourFilter->SetInput(binaryImage);
isoContourFilter->SetFarValue(maximumDistance + 1);
isoContourFilter->SetLevelSetValue(0.5);
std::cout << "LevelSetValue: " << isoContourFilter->GetLevelSetValue() <<std::endl;
// Prints
//   LevelSetValue: 0    - for my regular build
//   LevelSetValue: 0.50 - for the dart client

I have two builds on my computer where one fails the test (my nightly dart client) and one works (my regular build). Both use the same CMake, Generator and commit hash. However the regular build is not cleaned every night, so it might contain remnants of prior ITK versions.

That seems to be it, my regular build still uses a ITK 4.11 template header instead of the ITK 4.12.2 one.

The relevant difference in

itkIsoContourDistanceImageFilter.h

is in 4.11

  /** Set/Get the value of the level set to be located. The default value is
  *  0. */
itkSetMacro(LevelSetValue, InputPixelType);
itkGetConstMacro(LevelSetValue, InputPixelType);

in 4.12.2

  /** Set/Get the value of the level set to be located. The default value is
  *  0. */
itkSetMacro(LevelSetValue, PixelRealType);
itkGetConstMacro(LevelSetValue, PixelRealType);

so it uses floating type instead of unsigned int in case of the test.

Changing the level set value to 0 will produce the same images as before, so I am going to go with that as a fix.