Skip to content

Commit 28973c5

Browse files
authored
Merge pull request #3613 from lbutry/added_mrtrix3_functions
[ENH]: Add functions to mrtrix3 interface
2 parents 1b5793a + 5599348 commit 28973c5

10 files changed

+436
-12
lines changed

.zenodo.json

+16-12
Original file line numberDiff line numberDiff line change
@@ -891,16 +891,6 @@
891891
"name": "Mihai, Paul Glad",
892892
"orcid": "0000-0001-5715-6442"
893893
},
894-
{
895-
"affiliation": "Department of Psychology, Stanford University",
896-
"name": "Gorgolewski, Krzysztof J.",
897-
"orcid": "0000-0003-3321-7583"
898-
},
899-
{
900-
"affiliation": "MIT, HMS",
901-
"name": "Ghosh, Satrajit",
902-
"orcid": "0000-0002-5312-6729"
903-
},
904894
{
905895
"affiliation": "University of Tübingen and MPI for Biological Cybernertics",
906896
"name": "Bannert, Michael M.",
@@ -909,13 +899,27 @@
909899
{
910900
"affiliation": "Research Centre Juelich",
911901
"name": "Wu, Jianxiao",
912-
"orcid": "0000-0002-4866-272X",
902+
"orcid": "0000-0002-4866-272X"
903+
},
904+
{
905+
"affiliation": "Department of Neurology, BG-University Hospital Bergmannsheil Bochum, Germany",
906+
"name": "Butry, Lionel"
913907
},
914908
{
915909
"affiliation": "Lund University",
916910
"name": "Anijärv, Toomas Erik",
917-
"orcid": "0000-0002-3650-4230",
911+
"orcid": "0000-0002-3650-4230"
912+
},
913+
{
914+
"affiliation": "Department of Psychology, Stanford University",
915+
"name": "Gorgolewski, Krzysztof J.",
916+
"orcid": "0000-0003-3321-7583"
918917
},
918+
{
919+
"affiliation": "MIT, HMS",
920+
"name": "Ghosh, Satrajit",
921+
"orcid": "0000-0002-5312-6729"
922+
}
919923
],
920924
"keywords": [
921925
"neuroimaging",

nipype/interfaces/mrtrix3/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,7 @@
3030
SHConv,
3131
TensorMetrics,
3232
TransformFSLConvert,
33+
MaskFilter,
34+
MTNormalise,
35+
Generate5tt2gmwmi,
3336
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from ..utils import Generate5tt2gmwmi
3+
4+
5+
def test_Generate5tt2gmwmi_inputs():
6+
input_map = dict(
7+
args=dict(
8+
argstr="%s",
9+
),
10+
bval_scale=dict(
11+
argstr="-bvalue_scaling %s",
12+
),
13+
environ=dict(
14+
nohash=True,
15+
usedefault=True,
16+
),
17+
grad_file=dict(
18+
argstr="-grad %s",
19+
extensions=None,
20+
xor=["grad_fsl"],
21+
),
22+
grad_fsl=dict(
23+
argstr="-fslgrad %s %s",
24+
xor=["grad_file"],
25+
),
26+
in_bval=dict(
27+
extensions=None,
28+
),
29+
in_bvec=dict(
30+
argstr="-fslgrad %s %s",
31+
extensions=None,
32+
),
33+
in_file=dict(
34+
argstr="%s",
35+
extensions=None,
36+
mandatory=True,
37+
position=-2,
38+
),
39+
mask_in=dict(
40+
argstr="-mask_in %s",
41+
extensions=None,
42+
position=-3,
43+
),
44+
mask_out=dict(
45+
argstr="%s",
46+
extensions=None,
47+
mandatory=True,
48+
position=-1,
49+
),
50+
nthreads=dict(
51+
argstr="-nthreads %d",
52+
nohash=True,
53+
),
54+
out_bval=dict(
55+
extensions=None,
56+
),
57+
out_bvec=dict(
58+
argstr="-export_grad_fsl %s %s",
59+
extensions=None,
60+
),
61+
)
62+
inputs = Generate5tt2gmwmi.input_spec()
63+
64+
for key, metadata in list(input_map.items()):
65+
for metakey, value in list(metadata.items()):
66+
assert getattr(inputs.traits()[key], metakey) == value
67+
68+
69+
def test_Generate5tt2gmwmi_outputs():
70+
output_map = dict(
71+
mask_out=dict(
72+
extensions=None,
73+
),
74+
)
75+
outputs = Generate5tt2gmwmi.output_spec()
76+
77+
for key, metadata in list(output_map.items()):
78+
for metakey, value in list(metadata.items()):
79+
assert getattr(outputs.traits()[key], metakey) == value
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from ..utils import MTNormalise
3+
4+
5+
def test_MTNormalise_inputs():
6+
input_map = dict(
7+
args=dict(
8+
argstr="%s",
9+
),
10+
bval_scale=dict(
11+
argstr="-bvalue_scaling %s",
12+
),
13+
csf_fod=dict(
14+
argstr="%s",
15+
extensions=None,
16+
position=5,
17+
),
18+
environ=dict(
19+
nohash=True,
20+
usedefault=True,
21+
),
22+
gm_fod=dict(
23+
argstr="%s",
24+
extensions=None,
25+
position=3,
26+
),
27+
grad_file=dict(
28+
argstr="-grad %s",
29+
extensions=None,
30+
xor=["grad_fsl"],
31+
),
32+
grad_fsl=dict(
33+
argstr="-fslgrad %s %s",
34+
xor=["grad_file"],
35+
),
36+
in_bval=dict(
37+
extensions=None,
38+
),
39+
in_bvec=dict(
40+
argstr="-fslgrad %s %s",
41+
extensions=None,
42+
),
43+
mask=dict(
44+
argstr="-mask %s",
45+
extensions=None,
46+
position=-1,
47+
),
48+
nthreads=dict(
49+
argstr="-nthreads %d",
50+
nohash=True,
51+
),
52+
out_bval=dict(
53+
extensions=None,
54+
),
55+
out_bvec=dict(
56+
argstr="-export_grad_fsl %s %s",
57+
extensions=None,
58+
),
59+
out_file_csf=dict(
60+
argstr="%s",
61+
extensions=None,
62+
position=6,
63+
),
64+
out_file_gm=dict(
65+
argstr="%s",
66+
extensions=None,
67+
position=4,
68+
),
69+
out_file_wm=dict(
70+
argstr="%s",
71+
extensions=None,
72+
position=2,
73+
),
74+
wm_fod=dict(
75+
argstr="%s",
76+
extensions=None,
77+
position=1,
78+
),
79+
)
80+
inputs = MTNormalise.input_spec()
81+
82+
for key, metadata in list(input_map.items()):
83+
for metakey, value in list(metadata.items()):
84+
assert getattr(inputs.traits()[key], metakey) == value
85+
86+
87+
def test_MTNormalise_outputs():
88+
output_map = dict(
89+
out_file_csf=dict(
90+
extensions=None,
91+
),
92+
out_file_gm=dict(
93+
extensions=None,
94+
),
95+
out_file_wm=dict(
96+
extensions=None,
97+
),
98+
)
99+
outputs = MTNormalise.output_spec()
100+
101+
for key, metadata in list(output_map.items()):
102+
for metakey, value in list(metadata.items()):
103+
assert getattr(outputs.traits()[key], metakey) == value
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from ..utils import MaskFilter
3+
4+
5+
def test_MaskFilter_inputs():
6+
input_map = dict(
7+
args=dict(
8+
argstr="%s",
9+
),
10+
environ=dict(
11+
nohash=True,
12+
usedefault=True,
13+
),
14+
filter=dict(
15+
argstr="%s",
16+
mandatory=True,
17+
position=-2,
18+
),
19+
in_file=dict(
20+
argstr="%s",
21+
extensions=None,
22+
mandatory=True,
23+
position=-3,
24+
),
25+
npass=dict(
26+
argstr="-npass %d",
27+
position=1,
28+
),
29+
out_file=dict(
30+
argstr="%s",
31+
extensions=None,
32+
mandatory=True,
33+
name_source=["input_image"],
34+
position=-1,
35+
),
36+
)
37+
inputs = MaskFilter.input_spec()
38+
39+
for key, metadata in list(input_map.items()):
40+
for metakey, value in list(metadata.items()):
41+
assert getattr(inputs.traits()[key], metakey) == value
42+
43+
44+
def test_MaskFilter_outputs():
45+
output_map = dict(
46+
out_file=dict(
47+
extensions=None,
48+
),
49+
)
50+
outputs = MaskFilter.output_spec()
51+
52+
for key, metadata in list(output_map.items()):
53+
for metakey, value in list(metadata.items()):
54+
assert getattr(outputs.traits()[key], metakey) == value

0 commit comments

Comments
 (0)