File tree 2 files changed +8
-2
lines changed
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -23,11 +23,13 @@ class Bru2InputSpec(CommandLineInputSpec):
23
23
argstr = '-f' ,
24
24
desc = "Force conversion of localizers images (multiple slice "
25
25
"orientations)." )
26
+ compress = traits .Bool (
27
+ argstr = '-z' , desc = 'gz compress images (".nii.gz").' )
26
28
append_protocol_name = traits .Bool (
27
29
argstr = '-p' , desc = "Append protocol name to output filename." )
28
30
output_filename = traits .Str (
29
31
argstr = "-o %s" ,
30
- desc = " Output filename (' .nii' will be appended)" ,
32
+ desc = ' Output filename (" .nii" will be appended, or ".nii.gz" if the "-z" compress option is selected)' ,
31
33
genfile = True )
32
34
33
35
@@ -57,7 +59,10 @@ def _list_outputs(self):
57
59
output_filename1 = os .path .abspath (self .inputs .output_filename )
58
60
else :
59
61
output_filename1 = self ._gen_filename ('output_filename' )
60
- outputs ["nii_file" ] = output_filename1 + ".nii"
62
+ if self .inputs .compress :
63
+ outputs ["nii_file" ] = output_filename1 + ".nii.gz"
64
+ else :
65
+ outputs ["nii_file" ] = output_filename1 + ".nii"
61
66
return outputs
62
67
63
68
def _gen_filename (self , name ):
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ def test_Bru2_inputs():
8
8
actual_size = dict (argstr = '-a' , ),
9
9
append_protocol_name = dict (argstr = '-p' , ),
10
10
args = dict (argstr = '%s' , ),
11
+ compress = dict (argstr = '-z' , ),
11
12
environ = dict (
12
13
nohash = True ,
13
14
usedefault = True ,
You can’t perform that action at this time.
0 commit comments