Skip to content

Commit 49797ad

Browse files
committed
update dipy version, fix output_resolution arg and update dtifit outputs
1 parent 2634fe2 commit 49797ad

File tree

6 files changed

+34
-9
lines changed

6 files changed

+34
-9
lines changed

dmriprep/cli.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ def __init__(
9797
"--output_resolution",
9898
help="The isotropic voxel size in mm the data will be resampled to before eddy.",
9999
type=float,
100+
multiple=True
100101
)
101102
# specific options for eddy
102103
@click.option(
@@ -218,6 +219,9 @@ def main(
218219
if not work_dir:
219220
work_dir = os.path.join(output_dir, "scratch")
220221

222+
if len(output_resolution) == 1:
223+
output_resolution = output_resolution * 3
224+
221225
# Set parameters based on CLI, pass through object
222226
parameters = Parameters(
223227
layout=layout,
@@ -228,7 +232,7 @@ def main(
228232
work_dir=work_dir,
229233
ignore=list(ignore),
230234
b0_thresh=b0_thresh,
231-
output_resolution=(output_resolution, output_resolution, output_resolution),
235+
output_resolution=output_resolution,
232236
bet_dwi=bet_dwi,
233237
bet_mag=bet_mag,
234238
omp_nthreads=omp_nthreads,

dmriprep/workflows/dwi/base.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,21 @@ def init_dwi_preproc_wf(subject_id, dwi_file, metadata, parameters):
9494
dwi_prep_wf = init_prep_dwi_wf(parameters.ignore, parameters.output_resolution)
9595

9696
def gen_index(in_file):
97+
"""
98+
Create an index file that tells `eddy` which line/lines in the
99+
`acqparams.txt` file are relevant for the dwi data passed into `eddy`
100+
101+
**Inputs**
102+
103+
in_file
104+
The bval file.
105+
106+
**Outputs**
107+
108+
out_file
109+
The output index file.
110+
"""
111+
97112
import os
98113
import numpy as np
99114
import nibabel as nib
@@ -393,6 +408,9 @@ def get_b0_mask_fn(b0_file):
393408
outputnode,
394409
[
395410
("outputnode.FA_file", "out_dtifit_FA"),
411+
("outputnode.MD_file", "out_dtifit_MD"),
412+
("outputnode.AD_file", "out_dtifit_AD"),
413+
("outputnode.RD_file", "out_dtifit_RD"),
396414
("outputnode.V1_file", "out_dtifit_V1"),
397415
("outputnode.sse_file", "out_dtifit_sse"),
398416
],

dmriprep/workflows/dwi/outputs.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ def init_output_wf(subject_id, session_id, output_folder):
2424
"eddy_quad_json",
2525
"eddy_quad_pdf",
2626
"dtifit_FA",
27+
"dtifit_MD",
28+
"dtifit_AD",
29+
"dtifit_RD",
2730
"dtifit_V1",
2831
"dtifit_sse",
2932
"noise",
@@ -77,6 +80,8 @@ def build_path(output_folder, subject_id, session_id):
7780
("dtifit_MD", "@result.@md"),
7881
("dtifit_AD", "@result.@ad"),
7982
("dtifit_RD", "@result.@rd"),
83+
("dtifit_V1", "@result.@v1"),
84+
("dtifit_sse", "@result.@sse"),
8085
],
8186
),
8287
]

dmriprep/workflows/dwi/tensor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def init_tensor_wf():
1717

1818
outputnode = pe.Node(
1919
niu.IdentityInterface(
20-
fields=["FA_file", "MD_file", "AD_file", "RD_file", "sse_file", "V1_file"]
20+
fields=["FA_file", "MD_file", "AD_file", "RD_file", "V1_file", "sse_file"]
2121
),
2222
name="outputnode",
2323
)
@@ -50,8 +50,8 @@ def init_tensor_wf():
5050
("FA", "FA_file"),
5151
("MD", "MD_file"),
5252
("L1", "AD_file"),
53-
("sse", "sse_file"),
5453
("V1", "V1_file"),
54+
("sse", "sse_file"),
5555
],
5656
),
5757
]

requirements.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Click>=7.0
2-
dipy==0.16.0
2+
dipy==1.0.0
33
duecredit==0.7.0
44
nipype==1.2.0
55
pandas==0.25.0
66
parse==1.12.0
7-
tqdm==4.32.2
8-
pybids==0.9.2
7+
tqdm==4.33.0
8+
pybids==0.9.3
99
matplotlib==3.1.1
10-
numba==0.45.0
10+
numba==0.45.1

setup.cfg

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ docs =
6363
%(doc)s
6464
duecredit = duecredit
6565
resmon =
66-
sentry = sentry-sdk >=0.6.9
6766
tests =
6867
coverage
6968
codecov
@@ -72,7 +71,6 @@ all =
7271
%(datalad)s
7372
%(doc)s
7473
%(duecredit)s
75-
%(sentry)s
7674
%(tests)s
7775

7876
[options.package_data]

0 commit comments

Comments
 (0)