Skip to content

ENH: Find graymid/midthickness surfs #1972

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions nipype/interfaces/freesurfer/tests/test_auto_ReconAll.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ def test_ReconAll_outputs():
),
filled=dict(loc='mri',
),
graymid=dict(altkey=['graymid', 'midthickness'],
loc='surf',
),
inflated=dict(loc='surf',
),
jacobian_white=dict(loc='surf',
Expand Down
15 changes: 9 additions & 6 deletions nipype/interfaces/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -1546,6 +1546,9 @@ class FSSourceOutputSpec(TraitedSpec):
File(exists=True),
desc='Distortion required to register to spherical atlas',
loc='surf')
graymid = OutputMultiPath(
File(exists=True), desc='Graymid/midthickness surface meshes',
loc='surf', altkey=['graymid', 'midthickness'])
label = OutputMultiPath(
File(exists=True), desc='Volume and surface label files',
loc='label', altkey='*label')
Expand Down Expand Up @@ -1617,12 +1620,12 @@ def _get_files(self, path, key, dirval, altkey=None):
globprefix = '*'
elif key in ('aseg_stats', 'wmparc_stats'):
globprefix = ''
keydir = os.path.join(path, dirval)
if altkey:
key = altkey
globpattern = os.path.join(
keydir, ''.join((globprefix, key, globsuffix)))
return [os.path.abspath(f) for f in glob.glob(globpattern)]
keys = filename_to_list(altkey) if altkey else [key]
globfmt = os.path.join(path, dirval,
''.join((globprefix, '{}', globsuffix)))
return [os.path.abspath(f)
for key in keys
for f in glob.glob(globfmt.format(key))]

def _list_outputs(self):
subjects_dir = self.inputs.subjects_dir
Expand Down
3 changes: 3 additions & 0 deletions nipype/interfaces/tests/test_auto_FreeSurferSource.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ def test_FreeSurferSource_outputs():
),
filled=dict(loc='mri',
),
graymid=dict(altkey=['graymid', 'midthickness'],
loc='surf',
),
inflated=dict(loc='surf',
),
jacobian_white=dict(loc='surf',
Expand Down