Skip to content

Commit

Permalink
TEST: Fix bug in loading image/mask during testing
Browse files Browse the repository at this point in the history
In commit 43578f7, use of class instance scope settings was changed to local scope settings allow correct parallel extraction using a shared instance of the extractor.
However, this also meant that the settings had to be passed to the function that loads the image and mask. While this was done so for the call to this function from inside RadiomicsFeatureExtractor, this was not done so for the call to this function in TestUtils, which is the workflow for loading the image/mask during testing. This resulted in ignoring settings during loading, which meant no normalization or resampling was applied. This only affected the testing, and not the regular flow of PyRadiomics.
  • Loading branch information
JoostJM committed Feb 4, 2020
1 parent f719e5e commit 2005bd2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/testUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class or test case is changed, function returns True.
settings = self._current_config.get('Settings', {})

extractor = featureextractor.RadiomicsFeatureExtractor({'imageType': imageTypes, 'setting': settings})
self._image, self._mask = extractor.loadImage(self._image, self._mask)
self._image, self._mask = extractor.loadImage(self._image, self._mask, **settings)

assert self._image is not None
assert self._mask is not None
Expand Down

0 comments on commit 2005bd2

Please sign in to comment.