-
Notifications
You must be signed in to change notification settings - Fork 523
/
test_auto_Normalize12.py
71 lines (66 loc) · 1.92 KB
/
test_auto_Normalize12.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from nipype.testing import assert_equal
from nipype.interfaces.spm.preprocess import Normalize12
def test_Normalize12_inputs():
input_map = dict(affine_regularization_type=dict(field='eoptions.affreg',
),
apply_to_files=dict(copyfile=True,
field='subj.resample',
),
bias_fwhm=dict(field='eoptions.biasfwhm',
),
bias_regularization=dict(field='eoptions.biasreg',
),
deformation_file=dict(copyfile=False,
field='subj.def',
mandatory=True,
xor=['image_to_align', 'tpm'],
),
ignore_exception=dict(nohash=True,
usedefault=True,
),
image_to_align=dict(copyfile=True,
field='subj.vol',
mandatory=True,
xor=['deformation_file'],
),
jobtype=dict(usedefault=True,
),
matlab_cmd=dict(),
mfile=dict(usedefault=True,
),
paths=dict(),
sampling_distance=dict(field='eoptions.samp',
),
smoothness=dict(field='eoptions.fwhm',
),
tpm=dict(copyfile=False,
field='eoptions.tpm',
xor=['deformation_file'],
),
use_mcr=dict(),
use_v8struct=dict(min_ver='8',
usedefault=True,
),
warping_regularization=dict(field='eoptions.reg',
),
write_bounding_box=dict(field='woptions.bb',
),
write_interp=dict(field='woptions.interp',
),
write_voxel_sizes=dict(field='woptions.vox',
),
)
inputs = Normalize12.input_spec()
for key, metadata in input_map.items():
for metakey, value in metadata.items():
yield assert_equal, getattr(inputs.traits()[key], metakey), value
def test_Normalize12_outputs():
output_map = dict(deformation_field=dict(),
normalized_files=dict(),
normalized_image=dict(),
)
outputs = Normalize12.output_spec()
for key, metadata in output_map.items():
for metakey, value in metadata.items():
yield assert_equal, getattr(outputs.traits()[key], metakey), value