@@ -146,6 +146,10 @@ class ExtractROIBasedSurfaceMeasuresInputSpec(SPMCommandInputSpec):
146
146
mandatory = False , copyfile = False )
147
147
148
148
149
+ class ExtractROIBasedSurfaceMeasuresOutputSpec (TraitedSpec ):
150
+ label_files = List (File (exists = True ), desc = "Files with the measures extracted for ROIs." )
151
+
152
+
149
153
class ExtractROIBasedSurfaceMeasures (SPMCommand ):
150
154
"""
151
155
Extract ROI-based surface values
@@ -183,7 +187,7 @@ class ExtractROIBasedSurfaceMeasures(SPMCommand):
183
187
"""
184
188
185
189
input_spec = ExtractROIBasedSurfaceMeasuresInputSpec
186
- output_spec = None
190
+ output_spec = ExtractROIBasedSurfaceMeasuresOutputSpec
187
191
188
192
def __init__ (self , ** inputs ):
189
193
_local_version = SPMCommand ().version
@@ -202,7 +206,15 @@ def _format_arg(self, opt, spec, val):
202
206
return super (ExtractROIBasedSurfaceMeasures , self )._format_arg (opt , spec , val )
203
207
204
208
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 ))])
206
218
207
219
208
220
class Cell :
0 commit comments