Skip to content

Commit 1a02111

Browse files
committed
FSL maths interface, add auto tests for new interfaces.
1 parent 2ba1099 commit 1a02111

File tree

5 files changed

+279
-0
lines changed

5 files changed

+279
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
3+
from ..maths import AR1Image
4+
5+
6+
def test_AR1Image_inputs():
7+
input_map = dict(args=dict(argstr='%s',
8+
),
9+
dimension=dict(argstr='-%sar1',
10+
position=4,
11+
usedefault=True,
12+
),
13+
environ=dict(nohash=True,
14+
usedefault=True,
15+
),
16+
ignore_exception=dict(nohash=True,
17+
usedefault=True,
18+
),
19+
in_file=dict(argstr='%s',
20+
mandatory=True,
21+
position=2,
22+
),
23+
internal_datatype=dict(argstr='-dt %s',
24+
position=1,
25+
),
26+
nan2zeros=dict(argstr='-nan',
27+
position=3,
28+
),
29+
out_file=dict(argstr='%s',
30+
genfile=True,
31+
hash_files=False,
32+
position=-2,
33+
),
34+
output_datatype=dict(argstr='-odt %s',
35+
position=-1,
36+
),
37+
output_type=dict(),
38+
terminal_output=dict(nohash=True,
39+
),
40+
)
41+
inputs = AR1Image.input_spec()
42+
43+
for key, metadata in list(input_map.items()):
44+
for metakey, value in list(metadata.items()):
45+
assert getattr(inputs.traits()[key], metakey) == value
46+
47+
48+
def test_AR1Image_outputs():
49+
output_map = dict(out_file=dict(),
50+
)
51+
outputs = AR1Image.output_spec()
52+
53+
for key, metadata in list(output_map.items()):
54+
for metakey, value in list(metadata.items()):
55+
assert getattr(outputs.traits()[key], metakey) == value
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
3+
from ..maths import MaxnImage
4+
5+
6+
def test_MaxnImage_inputs():
7+
input_map = dict(args=dict(argstr='%s',
8+
),
9+
dimension=dict(argstr='-%smaxn',
10+
position=4,
11+
usedefault=True,
12+
),
13+
environ=dict(nohash=True,
14+
usedefault=True,
15+
),
16+
ignore_exception=dict(nohash=True,
17+
usedefault=True,
18+
),
19+
in_file=dict(argstr='%s',
20+
mandatory=True,
21+
position=2,
22+
),
23+
internal_datatype=dict(argstr='-dt %s',
24+
position=1,
25+
),
26+
nan2zeros=dict(argstr='-nan',
27+
position=3,
28+
),
29+
out_file=dict(argstr='%s',
30+
genfile=True,
31+
hash_files=False,
32+
position=-2,
33+
),
34+
output_datatype=dict(argstr='-odt %s',
35+
position=-1,
36+
),
37+
output_type=dict(),
38+
terminal_output=dict(nohash=True,
39+
),
40+
)
41+
inputs = MaxnImage.input_spec()
42+
43+
for key, metadata in list(input_map.items()):
44+
for metakey, value in list(metadata.items()):
45+
assert getattr(inputs.traits()[key], metakey) == value
46+
47+
48+
def test_MaxnImage_outputs():
49+
output_map = dict(out_file=dict(),
50+
)
51+
outputs = MaxnImage.output_spec()
52+
53+
for key, metadata in list(output_map.items()):
54+
for metakey, value in list(metadata.items()):
55+
assert getattr(outputs.traits()[key], metakey) == value
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
3+
from ..maths import MedianImage
4+
5+
6+
def test_MedianImage_inputs():
7+
input_map = dict(args=dict(argstr='%s',
8+
),
9+
dimension=dict(argstr='-%smedian',
10+
position=4,
11+
usedefault=True,
12+
),
13+
environ=dict(nohash=True,
14+
usedefault=True,
15+
),
16+
ignore_exception=dict(nohash=True,
17+
usedefault=True,
18+
),
19+
in_file=dict(argstr='%s',
20+
mandatory=True,
21+
position=2,
22+
),
23+
internal_datatype=dict(argstr='-dt %s',
24+
position=1,
25+
),
26+
nan2zeros=dict(argstr='-nan',
27+
position=3,
28+
),
29+
out_file=dict(argstr='%s',
30+
genfile=True,
31+
hash_files=False,
32+
position=-2,
33+
),
34+
output_datatype=dict(argstr='-odt %s',
35+
position=-1,
36+
),
37+
output_type=dict(),
38+
terminal_output=dict(nohash=True,
39+
),
40+
)
41+
inputs = MedianImage.input_spec()
42+
43+
for key, metadata in list(input_map.items()):
44+
for metakey, value in list(metadata.items()):
45+
assert getattr(inputs.traits()[key], metakey) == value
46+
47+
48+
def test_MedianImage_outputs():
49+
output_map = dict(out_file=dict(),
50+
)
51+
outputs = MedianImage.output_spec()
52+
53+
for key, metadata in list(output_map.items()):
54+
for metakey, value in list(metadata.items()):
55+
assert getattr(outputs.traits()[key], metakey) == value
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
3+
from ..maths import MinImage
4+
5+
6+
def test_MinImage_inputs():
7+
input_map = dict(args=dict(argstr='%s',
8+
),
9+
dimension=dict(argstr='-%smin',
10+
position=4,
11+
usedefault=True,
12+
),
13+
environ=dict(nohash=True,
14+
usedefault=True,
15+
),
16+
ignore_exception=dict(nohash=True,
17+
usedefault=True,
18+
),
19+
in_file=dict(argstr='%s',
20+
mandatory=True,
21+
position=2,
22+
),
23+
internal_datatype=dict(argstr='-dt %s',
24+
position=1,
25+
),
26+
nan2zeros=dict(argstr='-nan',
27+
position=3,
28+
),
29+
out_file=dict(argstr='%s',
30+
genfile=True,
31+
hash_files=False,
32+
position=-2,
33+
),
34+
output_datatype=dict(argstr='-odt %s',
35+
position=-1,
36+
),
37+
output_type=dict(),
38+
terminal_output=dict(nohash=True,
39+
),
40+
)
41+
inputs = MinImage.input_spec()
42+
43+
for key, metadata in list(input_map.items()):
44+
for metakey, value in list(metadata.items()):
45+
assert getattr(inputs.traits()[key], metakey) == value
46+
47+
48+
def test_MinImage_outputs():
49+
output_map = dict(out_file=dict(),
50+
)
51+
outputs = MinImage.output_spec()
52+
53+
for key, metadata in list(output_map.items()):
54+
for metakey, value in list(metadata.items()):
55+
assert getattr(outputs.traits()[key], metakey) == value
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from __future__ import unicode_literals
3+
from ..maths import PercentileImage
4+
5+
6+
def test_PercentileImage_inputs():
7+
input_map = dict(args=dict(argstr='%s',
8+
),
9+
dimension=dict(argstr='-%sperc',
10+
position=4,
11+
usedefault=True,
12+
),
13+
environ=dict(nohash=True,
14+
usedefault=True,
15+
),
16+
ignore_exception=dict(nohash=True,
17+
usedefault=True,
18+
),
19+
in_file=dict(argstr='%s',
20+
mandatory=True,
21+
position=2,
22+
),
23+
internal_datatype=dict(argstr='-dt %s',
24+
position=1,
25+
),
26+
nan2zeros=dict(argstr='-nan',
27+
position=3,
28+
),
29+
out_file=dict(argstr='%s',
30+
genfile=True,
31+
hash_files=False,
32+
position=-2,
33+
),
34+
output_datatype=dict(argstr='-odt %s',
35+
position=-1,
36+
),
37+
output_type=dict(),
38+
perc=dict(argstr='%f',
39+
position=5,
40+
usedefault=False,
41+
),
42+
terminal_output=dict(nohash=True,
43+
),
44+
)
45+
inputs = PercentileImage.input_spec()
46+
47+
for key, metadata in list(input_map.items()):
48+
for metakey, value in list(metadata.items()):
49+
assert getattr(inputs.traits()[key], metakey) == value
50+
51+
52+
def test_PercentileImage_outputs():
53+
output_map = dict(out_file=dict(),
54+
)
55+
outputs = PercentileImage.output_spec()
56+
57+
for key, metadata in list(output_map.items()):
58+
for metakey, value in list(metadata.items()):
59+
assert getattr(outputs.traits()[key], metakey) == value

0 commit comments

Comments
 (0)