Skip to content

Commit 19f6302

Browse files
committed
BF: removed dependency on itertools for compatibility with 2.5
1 parent 525117a commit 19f6302

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

nipype/interfaces/freesurfer/preprocess.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
import os
1515
from glob import glob
16-
import itertools
16+
#import itertools
1717
import numpy as np
1818

1919
from nipype.externals.pynifti import load
@@ -154,9 +154,8 @@ class MRIConvertInputSpec(FSTraitedSpec):
154154
in_k_dir = traits.Tuple(traits.Float, traits.Float,traits.Float,
155155
argstr='--in_k_direction %f %f %f',
156156
desc='<R direction> <A direction> <S direction>')
157-
#[''.join([i['x'],i['y'],i['z']]) for i in \
158-
# walk(dict(x=lambda:['L','R'],y=lambda:['A','P'],z=lambda:['I','S']).items())]
159-
_orientations = [comb for comb in itertools.chain(*[[''.join(c) for c in itertools.permutations(s)] for s in [a+b+c for a in 'LR' for b in 'AP' for c in 'IS']])]
157+
_orientations = ['LAI', 'LIA', 'ALI', 'AIL', 'ILA', 'IAL', 'LAS', 'LSA', 'ALS', 'ASL', 'SLA', 'SAL', 'LPI', 'LIP', 'PLI', 'PIL', 'ILP', 'IPL', 'LPS', 'LSP', 'PLS', 'PSL', 'SLP', 'SPL', 'RAI', 'RIA', 'ARI', 'AIR', 'IRA', 'IAR', 'RAS', 'RSA', 'ARS', 'ASR', 'SRA', 'SAR', 'RPI', 'RIP', 'PRI', 'PIR', 'IRP', 'IPR', 'RPS', 'RSP', 'PRS', 'PSR', 'SRP', 'SPR']
158+
#_orientations = [comb for comb in itertools.chain(*[[''.join(c) for c in itertools.permutations(s)] for s in [a+b+c for a in 'LR' for b in 'AP' for c in 'IS']])]
160159
in_orientation = traits.Enum(_orientations,
161160
argstr='--in_orientation %s',
162161
desc='specify the input orientation')

0 commit comments

Comments
 (0)