Skip to content

Commit 4d6f4c3

Browse files
aschaeferaschaefer
authored andcommitted
added check for dilation==TRUE to ROIv outputs
1 parent 4bf1b32 commit 4d6f4c3

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

nipype/interfaces/cmtk/parcellation.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ class ParcellateInputSpec(BaseInterfaceInputSpec):
532532
class ParcellateOutputSpec(TraitedSpec):
533533
roi_file = File(
534534
exists=True, desc='Region of Interest file for connectivity mapping')
535-
roiv_file = File(exists=False, desc='Region of Interest file for fMRI connectivity mapping')
535+
roiv_file = File(desc='Region of Interest file for fMRI connectivity mapping')
536536
white_matter_mask_file = File(exists=True, desc='White matter mask file')
537537
cc_unknown_file = File(
538538
desc='Image file with regions labelled as unknown cortical structures',
@@ -546,8 +546,7 @@ class ParcellateOutputSpec(TraitedSpec):
546546
desc='ROI image resliced to the dimensions of the original structural image',
547547
exists=True)
548548
dilated_roi_file_in_structural_space = File(
549-
desc='dilated ROI image resliced to the dimensions of the original structural image',
550-
exists=True)
549+
desc='dilated ROI image resliced to the dimensions of the original structural image')
551550

552551

553552
class Parcellate(BaseInterface):
@@ -594,15 +593,17 @@ def _list_outputs(self):
594593
else:
595594
outputs['roi_file'] = op.abspath(
596595
self._gen_outfilename('nii.gz', 'ROI'))
597-
outputs['roiv_file'] = op.abspath(self._gen_outfilename(
596+
if(self.inputs.dilation==True):
597+
outputs['roiv_file'] = op.abspath(self._gen_outfilename(
598598
'nii.gz', 'ROIv'))
599599
outputs['white_matter_mask_file'] = op.abspath('fsmask_1mm.nii.gz')
600600
outputs['cc_unknown_file'] = op.abspath('cc_unknown.nii.gz')
601601
outputs['ribbon_file'] = op.abspath('ribbon.nii.gz')
602602
outputs['aseg_file'] = op.abspath('aseg.nii.gz')
603603
outputs['roi_file_in_structural_space'] = op.abspath(
604604
'ROI_HR_th.nii.gz')
605-
outputs['dilated_roi_file_in_structural_space'] = op.abspath(
605+
if(self.inputs.dilation==True):
606+
outputs['dilated_roi_file_in_structural_space'] = op.abspath(
606607
'ROIv_HR_th.nii.gz')
607608
return outputs
608609

0 commit comments

Comments
 (0)