Skip to content

Commit 67b5781

Browse files
MINC interface tests.
1 parent 6fec463 commit 67b5781

30 files changed

+2214
-0
lines changed

nipype/interfaces/minc/tests/__init__.py

Whitespace-only changes.
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from ....testing import assert_equal
3+
from ..minc2 import Average
4+
5+
6+
def test_Average_inputs():
7+
input_map = dict(args=dict(argstr='%s',
8+
),
9+
avgdim=dict(argstr='-avgdim %s',
10+
),
11+
binarize=dict(argstr='-binarize',
12+
),
13+
binrange=dict(argstr='-binrange %s %s',
14+
),
15+
binvalue=dict(argstr='-binvalue %s',
16+
),
17+
check_dimensions=dict(argstr='-check_dimensions',
18+
xor=('check_dimensions', 'no_check_dimensions'),
19+
),
20+
clobber=dict(argstr='-clobber',
21+
usedefault=True,
22+
),
23+
copy_header=dict(argstr='-copy_header',
24+
xor=('copy_header', 'no_copy_header'),
25+
),
26+
debug=dict(argstr='-debug',
27+
),
28+
environ=dict(nohash=True,
29+
usedefault=True,
30+
),
31+
filelist=dict(argstr='-filelist %s',
32+
mandatory=True,
33+
xor=('input_files', 'filelist'),
34+
),
35+
format_byte=dict(argstr='-byte',
36+
xor=('format_filetype', 'format_byte', 'format_short', 'format_int', 'format_long', 'format_float', 'format_double', 'format_signed', 'format_unsigned'),
37+
),
38+
format_double=dict(argstr='-double',
39+
xor=('format_filetype', 'format_byte', 'format_short', 'format_int', 'format_long', 'format_float', 'format_double', 'format_signed', 'format_unsigned'),
40+
),
41+
format_filetype=dict(argstr='-filetype',
42+
xor=('format_filetype', 'format_byte', 'format_short', 'format_int', 'format_long', 'format_float', 'format_double', 'format_signed', 'format_unsigned'),
43+
),
44+
format_float=dict(argstr='-float',
45+
xor=('format_filetype', 'format_byte', 'format_short', 'format_int', 'format_long', 'format_float', 'format_double', 'format_signed', 'format_unsigned'),
46+
),
47+
format_int=dict(argstr='-int',
48+
xor=('format_filetype', 'format_byte', 'format_short', 'format_int', 'format_long', 'format_float', 'format_double', 'format_signed', 'format_unsigned'),
49+
),
50+
format_long=dict(argstr='-long',
51+
xor=('format_filetype', 'format_byte', 'format_short', 'format_int', 'format_long', 'format_float', 'format_double', 'format_signed', 'format_unsigned'),
52+
),
53+
format_short=dict(argstr='-short',
54+
xor=('format_filetype', 'format_byte', 'format_short', 'format_int', 'format_long', 'format_float', 'format_double', 'format_signed', 'format_unsigned'),
55+
),
56+
format_signed=dict(argstr='-signed',
57+
xor=('format_filetype', 'format_byte', 'format_short', 'format_int', 'format_long', 'format_float', 'format_double', 'format_signed', 'format_unsigned'),
58+
),
59+
format_unsigned=dict(argstr='-unsigned',
60+
xor=('format_filetype', 'format_byte', 'format_short', 'format_int', 'format_long', 'format_float', 'format_double', 'format_signed', 'format_unsigned'),
61+
),
62+
ignore_exception=dict(nohash=True,
63+
usedefault=True,
64+
),
65+
input_files=dict(argstr='%s',
66+
exists=True,
67+
mandatory=True,
68+
position=-2,
69+
sep=' ',
70+
xor=('input_files', 'filelist'),
71+
),
72+
max_buffer_size_in_kb=dict(argstr='-max_buffer_size_in_kb %d',
73+
),
74+
no_check_dimensions=dict(argstr='-nocheck_dimensions',
75+
xor=('check_dimensions', 'no_check_dimensions'),
76+
),
77+
no_copy_header=dict(argstr='-nocopy_header',
78+
xor=('copy_header', 'no_copy_header'),
79+
),
80+
nonormalize=dict(argstr='-nonormalize',
81+
xor=('normalize', 'nonormalize'),
82+
),
83+
normalize=dict(argstr='-normalize',
84+
xor=('normalize', 'nonormalize'),
85+
),
86+
output_file=dict(argstr='%s',
87+
genfile=True,
88+
hash_files=False,
89+
name_source=['input_files'],
90+
name_template='%s_averaged.mnc',
91+
position=-1,
92+
),
93+
quiet=dict(argstr='-quiet',
94+
xor=('verbose', 'quiet'),
95+
),
96+
sdfile=dict(argstr='-sdfile %s',
97+
),
98+
terminal_output=dict(nohash=True,
99+
),
100+
two=dict(argstr='-2',
101+
),
102+
verbose=dict(argstr='-verbose',
103+
xor=('verbose', 'quiet'),
104+
),
105+
voxel_range=dict(argstr='-range %d %d',
106+
),
107+
weights=dict(argstr='-weights %s',
108+
sep=',',
109+
),
110+
width_weighted=dict(argstr='-width_weighted',
111+
requires=('avgdim',),
112+
),
113+
)
114+
inputs = Average.input_spec()
115+
116+
for key, metadata in list(input_map.items()):
117+
for metakey, value in list(metadata.items()):
118+
yield assert_equal, getattr(inputs.traits()[key], metakey), value
119+
120+
121+
def test_Average_outputs():
122+
output_map = dict(output_file=dict(),
123+
)
124+
outputs = Average.output_spec()
125+
126+
for key, metadata in list(output_map.items()):
127+
for metakey, value in list(metadata.items()):
128+
yield assert_equal, getattr(outputs.traits()[key], metakey), value
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from ....testing import assert_equal
3+
from ..minc2 import BBox
4+
5+
6+
def test_BBox_inputs():
7+
input_map = dict(args=dict(argstr='%s',
8+
),
9+
environ=dict(nohash=True,
10+
usedefault=True,
11+
),
12+
format_minccrop=dict(argstr='-minccrop',
13+
),
14+
format_mincresample=dict(argstr='-mincresample',
15+
),
16+
format_mincreshape=dict(argstr='-mincreshape',
17+
),
18+
ignore_exception=dict(nohash=True,
19+
usedefault=True,
20+
),
21+
input_file=dict(argstr='%s',
22+
mandatory=True,
23+
position=-2,
24+
),
25+
one_line=dict(argstr='-one_line',
26+
xor=('one_line', 'two_lines'),
27+
),
28+
out_file=dict(argstr='> %s',
29+
genfile=True,
30+
position=-1,
31+
),
32+
output_file=dict(hash_files=False,
33+
keep_extension=False,
34+
name_source=['input_file'],
35+
name_template='%s_bbox.txt',
36+
position=-1,
37+
),
38+
terminal_output=dict(nohash=True,
39+
),
40+
threshold=dict(argstr='-threshold',
41+
),
42+
two_lines=dict(argstr='-two_lines',
43+
xor=('one_line', 'two_lines'),
44+
),
45+
)
46+
inputs = BBox.input_spec()
47+
48+
for key, metadata in list(input_map.items()):
49+
for metakey, value in list(metadata.items()):
50+
yield assert_equal, getattr(inputs.traits()[key], metakey), value
51+
52+
53+
def test_BBox_outputs():
54+
output_map = dict(output_file=dict(),
55+
)
56+
outputs = BBox.output_spec()
57+
58+
for key, metadata in list(output_map.items()):
59+
for metakey, value in list(metadata.items()):
60+
yield assert_equal, getattr(outputs.traits()[key], metakey), value
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from ....testing import assert_equal
3+
from ..minc2 import Beast
4+
5+
6+
def test_Beast_inputs():
7+
input_map = dict(abspath=dict(argstr='-abspath',
8+
usedefault=True,
9+
),
10+
args=dict(argstr='%s',
11+
),
12+
clobber=dict(argstr='-clobber',
13+
usedefault=True,
14+
),
15+
confidence_level_alpha=dict(argstr='-alpha %s',
16+
),
17+
configuration_file=dict(argstr='-configuration %s',
18+
),
19+
environ=dict(nohash=True,
20+
usedefault=True,
21+
),
22+
fill_holes=dict(argstr='-fill',
23+
),
24+
flip_images=dict(argstr='-flip',
25+
),
26+
ignore_exception=dict(nohash=True,
27+
usedefault=True,
28+
),
29+
input_file=dict(argstr='%s',
30+
mandatory=True,
31+
position=-2,
32+
),
33+
library_dir=dict(argstr='%s',
34+
mandatory=True,
35+
position=-3,
36+
),
37+
load_moments=dict(argstr='-load_moments',
38+
),
39+
median_filter=dict(argstr='-median',
40+
),
41+
nlm_filter=dict(argstr='-nlm_filter',
42+
),
43+
number_selected_images=dict(argstr='-selection_num %s',
44+
),
45+
output_file=dict(argstr='%s',
46+
hash_files=False,
47+
name_source=['input_file'],
48+
name_template='%s_beast_mask.mnc',
49+
position=-1,
50+
),
51+
patch_size=dict(argstr='-patch_size %s',
52+
),
53+
probability_map=dict(argstr='-probability',
54+
),
55+
same_resolution=dict(argstr='-same_resolution',
56+
),
57+
search_area=dict(argstr='-search_area %s',
58+
),
59+
smoothness_factor_beta=dict(argstr='-beta %s',
60+
),
61+
terminal_output=dict(nohash=True,
62+
),
63+
threshold_patch_selection=dict(argstr='-threshold %s',
64+
),
65+
voxel_size=dict(argstr='-voxel_size %s',
66+
),
67+
)
68+
inputs = Beast.input_spec()
69+
70+
for key, metadata in list(input_map.items()):
71+
for metakey, value in list(metadata.items()):
72+
yield assert_equal, getattr(inputs.traits()[key], metakey), value
73+
74+
75+
def test_Beast_outputs():
76+
output_map = dict(output_file=dict(),
77+
)
78+
outputs = Beast.output_spec()
79+
80+
for key, metadata in list(output_map.items()):
81+
for metakey, value in list(metadata.items()):
82+
yield assert_equal, getattr(outputs.traits()[key], metakey), value
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from ....testing import assert_equal
3+
from ..minc2 import BestLinReg
4+
5+
6+
def test_BestLinReg_inputs():
7+
input_map = dict(args=dict(argstr='%s',
8+
),
9+
clobber=dict(argstr='-clobber',
10+
usedefault=True,
11+
),
12+
environ=dict(nohash=True,
13+
usedefault=True,
14+
),
15+
ignore_exception=dict(nohash=True,
16+
usedefault=True,
17+
),
18+
output_mnc=dict(argstr='%s',
19+
genfile=True,
20+
hash_files=False,
21+
keep_extension=False,
22+
name_source=['source'],
23+
name_template='%s_bestlinreg.mnc',
24+
position=-1,
25+
),
26+
output_xfm=dict(argstr='%s',
27+
genfile=True,
28+
hash_files=False,
29+
keep_extension=False,
30+
name_source=['source'],
31+
name_template='%s_bestlinreg.xfm',
32+
position=-2,
33+
),
34+
source=dict(argstr='%s',
35+
mandatory=True,
36+
position=-4,
37+
),
38+
target=dict(argstr='%s',
39+
mandatory=True,
40+
position=-3,
41+
),
42+
terminal_output=dict(nohash=True,
43+
),
44+
verbose=dict(argstr='-verbose',
45+
),
46+
)
47+
inputs = BestLinReg.input_spec()
48+
49+
for key, metadata in list(input_map.items()):
50+
for metakey, value in list(metadata.items()):
51+
yield assert_equal, getattr(inputs.traits()[key], metakey), value
52+
53+
54+
def test_BestLinReg_outputs():
55+
output_map = dict(output_mnc=dict(),
56+
output_xfm=dict(),
57+
)
58+
outputs = BestLinReg.output_spec()
59+
60+
for key, metadata in list(output_map.items()):
61+
for metakey, value in list(metadata.items()):
62+
yield assert_equal, getattr(outputs.traits()[key], metakey), value
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from ....testing import assert_equal
3+
from ..minc2 import BigAverage
4+
5+
6+
def test_BigAverage_inputs():
7+
input_map = dict(args=dict(argstr='%s',
8+
),
9+
clobber=dict(argstr='--clobber',
10+
usedefault=True,
11+
),
12+
environ=dict(nohash=True,
13+
usedefault=True,
14+
),
15+
ignore_exception=dict(nohash=True,
16+
usedefault=True,
17+
),
18+
input_files=dict(argstr='%s',
19+
exists=True,
20+
mandatory=True,
21+
position=-2,
22+
sep=' ',
23+
),
24+
output_file=dict(argstr='%s',
25+
genfile=True,
26+
hash_files=False,
27+
name_source=['input_files'],
28+
name_template='%s_bigaverage.mnc',
29+
position=-1,
30+
),
31+
output_float=dict(argstr='--float',
32+
),
33+
robust=dict(argstr='-robust',
34+
),
35+
sd_file=dict(argstr='--sdfile %s',
36+
hash_files=False,
37+
name_source=['input_files'],
38+
name_template='%s_bigaverage_stdev.mnc',
39+
),
40+
terminal_output=dict(nohash=True,
41+
),
42+
tmpdir=dict(argstr='-tmpdir %s',
43+
),
44+
verbose=dict(argstr='--verbose',
45+
),
46+
)
47+
inputs = BigAverage.input_spec()
48+
49+
for key, metadata in list(input_map.items()):
50+
for metakey, value in list(metadata.items()):
51+
yield assert_equal, getattr(inputs.traits()[key], metakey), value
52+
53+
54+
def test_BigAverage_outputs():
55+
output_map = dict(output_file=dict(),
56+
sd_file=dict(),
57+
)
58+
outputs = BigAverage.output_spec()
59+
60+
for key, metadata in list(output_map.items()):
61+
for metakey, value in list(metadata.items()):
62+
yield assert_equal, getattr(outputs.traits()[key], metakey), value

0 commit comments

Comments
 (0)