Skip to content

Commit

Permalink
BUG: Fix axis definition in wavelet
Browse files Browse the repository at this point in the history
Use a list instead of a set to ensure the order of elements is preserved. A tuple is not used from the start, as elements cannot be deleted from the tuple.
  • Loading branch information
JoostJM committed Jun 26, 2018
1 parent f0e82e3 commit 4027a52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions radiomics/imageoperations.py
Expand Up @@ -683,9 +683,9 @@ def getWaveletImage(inputImage, inputMask, **kwargs):

logger.debug('Generating Wavelet images')

axes = {2, 1, 0} # set
axes = [2, 1, 0]
if kwargs.get('force2D', False):
axes -= {kwargs.get('force2Ddimension', 0)} # set
axes.remove(kwargs.get('force2Ddimension', 0))

approx, ret = _swt3(inputImage, kwargs.get('wavelet', 'coif1'), kwargs.get('level', 1), kwargs.get('start_level', 0), axes=tuple(axes))

Expand Down

0 comments on commit 4027a52

Please sign in to comment.