@@ -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+
149153class 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
208220class Cell :
0 commit comments