Skip to content

Commit addee02

Browse files
committed
PEP8-ing that utils.py
1 parent 4dc3923 commit addee02

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

nipype/interfaces/ants/utils.py

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@
1111

1212
import os
1313

14-
from ...utils.filemanip import split_filename
15-
from ..base import (TraitedSpec, File, traits, isdefined, InputMultiPath,
16-
CommandLine, CommandLineInputSpec)
14+
from ..base import (TraitedSpec, File, traits, isdefined, InputMultiPath)
1715
from .base import ANTSCommand, ANTSCommandInputSpec
1816

1917

@@ -101,7 +99,8 @@ def _list_outputs(self):
10199
class MultiplyImagesInputSpec(ANTSCommandInputSpec):
102100
dimension = traits.Enum(3, 2, argstr='%d', usedefault=False, mandatory=True, position=0,
103101
desc='image dimension (2 or 3)')
104-
first_input = File(argstr='%s', exists=True, mandatory=True, position=1, desc='image 1')
102+
first_input = File(argstr='%s', exists=True,
103+
mandatory=True, position=1, desc='image 1')
105104
second_input = traits.Either(File(exists=True), traits.Float, argstr='%s', mandatory=True, position=2,
106105
desc='image 2 or multiplication weight')
107106
output_product_image = File(argstr='%s', mandatory=True, position=3,
@@ -138,22 +137,25 @@ def _list_outputs(self):
138137
self.inputs.output_product_image)
139138
return outputs
140139

140+
141141
class CreateJacobianDeterminantImageInputSpec(ANTSCommandInputSpec):
142142
imageDimension = traits.Enum(3, 2, argstr='%d', usedefault=False, mandatory=True,
143-
position=0, desc='image dimension (2 or 3)')
143+
position=0, desc='image dimension (2 or 3)')
144144
deformationField = File(argstr='%s', exists=True, mandatory=True,
145-
position=1, desc='deformation transformation file')
145+
position=1, desc='deformation transformation file')
146146
outputImage = File(argstr='%s', mandatory=True,
147-
position=2,
148-
desc='output filename')
147+
position=2,
148+
desc='output filename')
149149
doLogJacobian = traits.Enum(0, 1, argstr='%d', position=3,
150-
desc='return the log jacobian')
150+
desc='return the log jacobian')
151151
useGeometric = traits.Enum(0, 1, argstr='%d', position=4,
152-
desc='return the geometric jacobian')
152+
desc='return the geometric jacobian')
153+
153154

154155
class CreateJacobianDeterminantImageOutputSpec(TraitedSpec):
155156
jacobian_image = File(exists=True, desc='jacobian image')
156157

158+
157159
class CreateJacobianDeterminantImage(ANTSCommand):
158160
"""
159161
Examples
@@ -203,6 +205,7 @@ class AffineInitializerInputSpec(ANTSCommandInputSpec):
203205
desc=' determines if a local optimization is run at each search point for the set '
204206
'number of iterations')
205207

208+
206209
class AffineInitializerOutputSpec(TraitedSpec):
207210
out_file = File(desc='output transform file')
208211

@@ -231,9 +234,10 @@ class ComposeMultiTransformInputSpec(ANTSCommandInputSpec):
231234
dimension = traits.Enum(3, 2, argstr='%d', usedefault=True, mandatory=True,
232235
position=0, desc='image dimension (2 or 3)')
233236
output_transform = File(argstr='%s', mandatory=True, position=1,
234-
desc='Outputfname.txt: the name of the resulting transform.')
237+
name_source=['transforms'], name_template='%s_composed',
238+
desc='the name of the resulting transform.')
235239
reference_image = File(argstr='%s', mandatory=False, position=2,
236-
desc='Reference image (only necessary when output is warpfield)')
240+
desc='Reference image (only necessary when output is warpfield)')
237241
transforms = InputMultiPath(File(exists=True), argstr='%s', mandatory=True,
238242
position=3, desc='transforms to average')
239243

@@ -258,4 +262,3 @@ class ComposeMultiTransform(ANTSCommand):
258262

259263
def _format_arg(self, opt, spec, val):
260264
return super(ComposeMultiTransform, self)._format_arg(opt, spec, val)
261-

0 commit comments

Comments
 (0)