Skip to content

Commit a235ec8

Browse files
committed
Added "exists" arguments for outputs
1 parent c9992d0 commit a235ec8

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

nipype/interfaces/cmtk/parcellation.py

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -351,20 +351,28 @@ def crop_and_move_datasets(subject_id, subjects_dir, fs_dir, parcellation_name,
351351
mri_cmd = 'mri_convert -rl "%s" -rt nearest "%s" -nc "%s"' % (orig, d[0], d[1])
352352
runCmd( mri_cmd,log )
353353

354+
354355
class ParcellateInputSpec(BaseInterfaceInputSpec):
355356
subject_id = traits.String(mandatory=True, desc='Subject ID')
356-
parcellation_name = traits.Enum('scale500', ['scale33', 'scale60', 'scale125', 'scale250','scale500'], usedefault=True)
357+
parcellation_name = traits.Enum('scale500', ['scale33', 'scale60', 'scale125', 'scale250', 'scale500'], usedefault=True)
357358
freesurfer_dir = Directory(desc='Freesurfer main directory')
358359
subjects_dir = Directory(desc='Freesurfer main directory')
359-
out_roi_file = File(genfile = True, desc='Region of Interest file for connectivity mapping')
360+
out_roi_file = File(genfile=True, desc='Region of Interest file for connectivity mapping')
361+
360362

361363
class ParcellateOutputSpec(TraitedSpec):
362-
roi_file = File(desc='Region of Interest file for connectivity mapping')
364+
roi_file = File(desc='Region of Interest file for connectivity mapping',
365+
exists=True)
363366
white_matter_mask_file = File(desc='White matter mask file')
364-
cc_unknown_file = File(desc='Image file with regions labelled as unknown cortical structures')
365-
ribbon_file = File(desc='Image file detailing the cortical ribbon')
366-
aseg_file = File(desc='Automated segmentation file converted from Freesurfer "subjects" directory')
367-
roi_file_in_structural_space = File(desc='ROI image resliced to the dimensions of the original structural image')
367+
cc_unknown_file = File(desc='Image file with regions labelled as unknown cortical structures',
368+
exists=True)
369+
ribbon_file = File(desc='Image file detailing the cortical ribbon',
370+
exists=True)
371+
aseg_file = File(desc='Automated segmentation file converted from Freesurfer "subjects" directory',
372+
exists=True)
373+
roi_file_in_structural_space = File(desc='ROI image resliced to the dimensions of the original structural image',
374+
exists=True)
375+
368376

369377
class Parcellate(BaseInterface):
370378
"""Subdivides segmented ROI file into smaller subregions

0 commit comments

Comments
 (0)