@@ -1212,10 +1212,13 @@ class KellyKapowskiInputSpec(ANTSCommandInputSpec):
12121212 desc = "Maximum number of iterations for estimating the invert \n "
12131213 "displacement field." )
12141214
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' ,
12161217 desc = 'Filename for the cortical thickness.' , hash_files = False )
12171218
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 )
12191222
12201223
12211224class KellyKapowskiOutputSpec (TraitedSpec ):
@@ -1244,7 +1247,7 @@ class KellyKapowski(ANTSCommand):
12441247 >>> kk.inputs.number_integration_points = 10
12451248 >>> kk.inputs.thickness_prior_estimate = 10
12461249 >>> kk.cmdline # doctest: +ALLOW_UNICODE
1247- "KellyKapowski --convergence "[45,0.0,10]" \
1250+ u "KellyKapowski --convergence "[45,0.0,10]" \
12481251 --output "[segmentation0_cortical_thickness.nii.gz,segmentation0_warped_white_matter.nii.gz]" \
12491252 --image-dimensionality 3 --gradient-step 0.025000 \
12501253 --number-of-integration-points 10 \
@@ -1280,12 +1283,6 @@ def _parse_inputs(self, skip=None):
12801283 skip += ['warped_white_matter' , 'gray_matter_label' , 'white_matter_label' ]
12811284 return super (KellyKapowski , self )._parse_inputs (skip = skip )
12821285
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-
12891286 def _gen_filename (self , name ):
12901287 if name == 'cortical_thickness' :
12911288 output = self .inputs .cortical_thickness
0 commit comments