Skip to content

Commit 98f118d

Browse files
committed
Added outputs to ExtractROIBasedSurfaceMeasures interface.
1 parent 2885499 commit 98f118d

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

nipype/interfaces/cat12/preprocess.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,10 +245,10 @@ class CAT12SegmentOutputSpec(TraitedSpec):
245245
##########################################
246246
# Label XML files
247247
##########################################
248-
label_files = List(File(exists=True), desc="Files with the labeled version of the segmentations.")
248+
label_files = List(File(exists=True), desc="Files with the measures extracted for OI ands ROIs")
249249

250-
label_rois = File(exists=True, desc="Files with labeled version of segmentations of ROIs Volumes")
251-
label_roi = File(exists=True, desc="Files with labeled version of segmentations of ROI Volumes")
250+
label_rois = File(exists=True, desc="Files with thickness values of ROIs.")
251+
label_roi = File(exists=True, desc="Files with thickness values of ROI.")
252252

253253
##########################################
254254
# MRI .nii files

nipype/interfaces/cat12/surface.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@ class ExtractROIBasedSurfaceMeasuresInputSpec(SPMCommandInputSpec):
146146
mandatory=False, copyfile=False)
147147

148148

149+
class ExtractROIBasedSurfaceMeasuresOutputSpec(TraitedSpec):
150+
label_files = List(File(exists=True), desc="Files with the measures extracted for ROIs.")
151+
152+
149153
class ExtractROIBasedSurfaceMeasures(SPMCommand):
150154
"""
151155
Extract ROI-based surface values
@@ -183,7 +187,7 @@ class ExtractROIBasedSurfaceMeasures(SPMCommand):
183187
"""
184188

185189
input_spec = ExtractROIBasedSurfaceMeasuresInputSpec
186-
output_spec = None
190+
output_spec = ExtractROIBasedSurfaceMeasuresOutputSpec
187191

188192
def __init__(self, **inputs):
189193
_local_version = SPMCommand().version
@@ -202,7 +206,15 @@ def _format_arg(self, opt, spec, val):
202206
return super(ExtractROIBasedSurfaceMeasures, self)._format_arg(opt, spec, val)
203207

204208
def _list_outputs(self):
205-
pass
209+
outputs = self._outputs().get()
210+
211+
outputs["label_files"] = []
212+
for f in self.inputs.lh_roi_atlas:
213+
pth, base, ext = split_filename(f)
214+
215+
outputs["label_files"].extend([os.path.join(os.path.join(pth, "label"), f) for f in
216+
os.listdir(os.path.join(pth, "label"))
217+
if os.path.isfile(os.path.join(os.path.join(pth, "label"), f))])
206218

207219

208220
class Cell:

0 commit comments

Comments
 (0)