@@ -63,63 +63,63 @@ class C3dAffineTool(SEMLikeCommandLine):
6363
6464class C3dInputSpec (CommandLineInputSpec ):
6565 in_file = InputMultiPath (File (),
66- position = 1 ,
67- argstr = "%s" ,
68- mandatory = True ,
69- desc = "Input file (wildcard and multiple are supported)" )
66+ position = 1 ,
67+ argstr = "%s" ,
68+ mandatory = True ,
69+ desc = "Input file (wildcard and multiple are supported)" )
7070 out_file = File (exists = False ,
71- argstr = "-o %s" ,
72- position = - 1 ,
73- xor = ["out_files" ],
74- desc = "Output file of last image on the stack" )
71+ argstr = "-o %s" ,
72+ position = - 1 ,
73+ xor = ["out_files" ],
74+ desc = "Output file of last image on the stack" )
7575 out_files = InputMultiPath (File (),
76- argstr = "-oo %s" ,
77- xor = ["out_file" ],
78- position = - 1 ,
79- desc = ("Write all images on the convert3d stack as multiple files."
80- " Supports both list of output files or a pattern for the output"
81- " filenames (using %d substituion)." ))
76+ argstr = "-oo %s" ,
77+ xor = ["out_file" ],
78+ position = - 1 ,
79+ desc = ("Write all images on the convert3d stack as multiple files."
80+ " Supports both list of output files or a pattern for the output"
81+ " filenames (using %d substituion)." ))
8282 pix_type = traits .Enum ("float" , "char" , "uchar" , "short" , "ushort" , "int" , "uint" , "double" ,
83- argstr = "-type %s" ,
84- desc = ("Specifies the pixel type for the output image. By default, images are written in"
85- " floating point (float) format" ))
83+ argstr = "-type %s" ,
84+ desc = ("Specifies the pixel type for the output image. By default, images are written in"
85+ " floating point (float) format" ))
8686 scale = traits .Either (traits .Int (), traits .Float (),
87- argstr = "-scale %s" ,
88- desc = "Multiplies the intensity of each voxel in the last image on the stack by the given factor." )
87+ argstr = "-scale %s" ,
88+ desc = "Multiplies the intensity of each voxel in the last image on the stack by the given factor." )
8989 shift = traits .Either (traits .Int (), traits .Float (),
90- argstr = "-shift %s" ,
91- desc = 'Adds the given constant to every voxel.' )
90+ argstr = "-shift %s" ,
91+ desc = 'Adds the given constant to every voxel.' )
9292 interp = traits .Enum ("Linear" , "NearestNeighbor" , "Cubic" , "Sinc" , "Gaussian" ,
93- argstr = "-interpolation %s" ,
94- desc = "Specifies the interpolation used with -resample and other commands. Default is Linear." )
93+ argstr = "-interpolation %s" ,
94+ desc = "Specifies the interpolation used with -resample and other commands. Default is Linear." )
9595 resample = traits .Str (argstr = "-resample %s" ,
96- desc = ("Resamples the image, keeping the bounding box the same, but changing the number of"
97- " voxels in the image. The dimensions can be specified as a percentage, for example to"
98- " double the number of voxels in each direction. The -interpolation flag affects how"
99- " sampling is performed." ))
96+ desc = ("Resamples the image, keeping the bounding box the same, but changing the number of"
97+ " voxels in the image. The dimensions can be specified as a percentage, for example to"
98+ " double the number of voxels in each direction. The -interpolation flag affects how"
99+ " sampling is performed." ))
100100 smooth = traits .Str (argstr = "-smooth %s" ,
101- desc = ("Applies Gaussian smoothing to the image. The parameter vector specifies the"
102- " standard deviation of the Gaussian kernel." ))
101+ desc = ("Applies Gaussian smoothing to the image. The parameter vector specifies the"
102+ " standard deviation of the Gaussian kernel." ))
103103 multicomp_split = traits .Bool (False ,
104- usedefault = True ,
105- argstr = "-mcr" ,
106- position = 0 ,
107- desc = "Enable reading of multi-component images." )
108- is_4d = traits .Bool (False ,
109- usedefault = True ,
110- desc = "Changes command to support 4D file operations (default is false)." )
104+ usedefault = True ,
105+ argstr = "-mcr" ,
106+ position = 0 ,
107+ desc = "Enable reading of multi-component images." )
108+ is_4d = traits .Bool (False ,
109+ usedefault = True ,
110+ desc = "Changes command to support 4D file operations (default is false)." )
111111
112112class C3dOutputSpec (TraitedSpec ):
113113 out_files = OutputMultiPath (File (exists = False ))
114114
115115class C3d (CommandLine ):
116116 """
117- Convert3d is a command-line tool for converting 3D (or 4D) images between common
118- file formats. The tool also includes a growing list of commands for image manipulation,
119- such as thresholding and resampling. The tool can also be used to obtain information about
117+ Convert3d is a command-line tool for converting 3D (or 4D) images between common
118+ file formats. The tool also includes a growing list of commands for image manipulation,
119+ such as thresholding and resampling. The tool can also be used to obtain information about
120120 image files. More information on Convert3d can be found at:
121121 https://sourceforge.net/p/c3d/git/ci/master/tree/doc/c3d.md
122-
122+
123123
124124 Example
125125 =======
@@ -174,7 +174,7 @@ def _list_outputs(self):
174174 if isdefined (self .inputs .out_file ):
175175 outputs ["out_files" ] = os .path .abspath (self .inputs .out_file )
176176 if isdefined (self .inputs .out_files ):
177- if not len (self .inputs .out_files ) > 1 :
177+ if len (self .inputs .out_files ) == 1 :
178178 _out_files = glob (os .path .abspath (self .inputs .out_files [0 ]))
179179 else :
180180 _out_files = [os .path .abspath (fl ) for fl in self .inputs .out_files
0 commit comments