@@ -1212,10 +1212,13 @@ class KellyKapowskiInputSpec(ANTSCommandInputSpec):
1212
1212
desc = "Maximum number of iterations for estimating the invert \n "
1213
1213
"displacement field." )
1214
1214
1215
- cortical_thickness = File (argstr = '--output "%s"' , genfile = True ,
1215
+ cortical_thickness = File (argstr = '--output "%s"' , genfile = True , keep_extension = True ,
1216
+ name_source = ["segmentation_image" ], name_template = '%s_cortical_thickness' ,
1216
1217
desc = 'Filename for the cortical thickness.' , hash_files = False )
1217
1218
1218
- warped_white_matter = File (desc = 'Filename for the warped white matter file.' , hash_files = False )
1219
+ warped_white_matter = File (name_source = ["segmentation_image" ], keep_extension = True ,
1220
+ name_template = '%s_warped_white_matter' ,
1221
+ desc = 'Filename for the warped white matter file.' , hash_files = False )
1219
1222
1220
1223
1221
1224
class KellyKapowskiOutputSpec (TraitedSpec ):
@@ -1244,7 +1247,7 @@ class KellyKapowski(ANTSCommand):
1244
1247
>>> kk.inputs.number_integration_points = 10
1245
1248
>>> kk.inputs.thickness_prior_estimate = 10
1246
1249
>>> kk.cmdline # doctest: +ALLOW_UNICODE
1247
- "KellyKapowski --convergence "[45,0.0,10]" \
1250
+ u "KellyKapowski --convergence "[45,0.0,10]" \
1248
1251
--output "[segmentation0_cortical_thickness.nii.gz,segmentation0_warped_white_matter.nii.gz]" \
1249
1252
--image-dimensionality 3 --gradient-step 0.025000 \
1250
1253
--number-of-integration-points 10 \
@@ -1280,12 +1283,6 @@ def _parse_inputs(self, skip=None):
1280
1283
skip += ['warped_white_matter' , 'gray_matter_label' , 'white_matter_label' ]
1281
1284
return super (KellyKapowski , self )._parse_inputs (skip = skip )
1282
1285
1283
- def _list_outputs (self ):
1284
- outputs = self ._outputs ().get ()
1285
- outputs ['cortical_thickness' ] = os .path .abspath (self ._gen_filename ('cortical_thickness' ))
1286
- outputs ['warped_white_matter' ] = os .path .abspath (self ._gen_filename ('warped_white_matter' ))
1287
- return outputs
1288
-
1289
1286
def _gen_filename (self , name ):
1290
1287
if name == 'cortical_thickness' :
1291
1288
output = self .inputs .cortical_thickness
0 commit comments