Skip to content

Commit cfd1429

Browse files
committed
enh: final integration stretch - pin deps, cleanup
1 parent 0ee693f commit cfd1429

File tree

4 files changed

+24
-19
lines changed

4 files changed

+24
-19
lines changed

.circleci/config.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,8 @@ jobs:
314314
-v /tmp/ds000206/work:/work \
315315
--user $(id -u):$(id -g) \
316316
nipreps/dmriprep:latest /data /out participant -vv $eddy \
317-
--fs-subjects-dir /data/derivatives/freesurfer-6.0.1 --sloppy --use-syn-sdc \
317+
--fs-subjects-dir /data/derivatives/freesurfer-6.0.1 --sloppy \
318+
--output-spaces MNI152NLin2009cAsym --use-syn-sdc \
318319
--notrack --skip-bids-validation -w /work --omp-nthreads 2 --nprocs 2
319320
- store_artifacts:
320321
path: /tmp/ds000206/derivatives/dmriprep

dmriprep/config/reports-spec.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ sections:
2626
caption: Surfaces (white and pial) reconstructed with FreeSurfer (<code>recon-all</code>)
2727
overlaid on the participant's T1w template.
2828
subtitle: Surface reconstruction
29-
- name: Fieldmaps
29+
- name: <em>B<sub>0</sub></em> field mapping
3030
ordering: session,run,fmapid
3131
reportlets:
3232
- bids: {datatype: figures, desc: mapped, suffix: fieldmap}
@@ -38,7 +38,7 @@ sections:
3838
description: Hover over the panels with the mouse pointer to also visualize the intensity of the
3939
field inhomogeneity in Hertz.
4040
static: false
41-
subtitle: "Susceptibility-derived Distortion Correction (SDC): field inhomogeneity estimation"
41+
subtitle: "Preprocessed <em>B<sub>0</sub></em> mapping acquisition"
4242
- bids: {datatype: figures, desc: phasediff, suffix: fieldmap}
4343
caption: Inhomogeneities of the <em>B<sub>0</sub></em> field introduce (oftentimes severe) spatial distortions
4444
along the phase-encoding direction of the image. A Gradient-Recalled Echo (GRE) scheme for the
@@ -48,7 +48,7 @@ sections:
4848
description: Hover over the panels with the mouse pointer to also visualize the intensity of the
4949
field inhomogeneity in Hertz.
5050
static: false
51-
subtitle: "Susceptibility-derived Distortion Correction (SDC): field inhomogeneity estimation"
51+
subtitle: "Preprocessed mapping of phase-difference acquisition"
5252
- bids: {datatype: figures, desc: pepolar, suffix: fieldmap}
5353
caption: Inhomogeneities of the <em>B<sub>0</sub></em> field introduce (oftentimes severe) spatial distortions
5454
along the phase-encoding direction of the image. Utilizing two or more images with different
@@ -58,7 +58,17 @@ sections:
5858
description: Hover on the panels with the mouse pointer to also visualize the intensity of the
5959
inhomogeneity of the field in Hertz.
6060
static: false
61-
subtitle: "Susceptibility-derived Distortion Correction (SDC): field inhomogeneity estimation"
61+
subtitle: "Preprocessed estimation with varying Phase-Endocing (PE) blips"
62+
- bids: {datatype: figures, desc: anat, suffix: fieldmap}
63+
caption: Inhomogeneities of the <em>B<sub>0</sub></em> field introduce (oftentimes severe) spatial distortions
64+
along the phase-encoding direction of the image. Utilizing an <em>anatomically-correct</em> acquisition
65+
(for instance, T1w or T2w), it is possible to estimate the inhomogeneity of the field by means of nonlinear
66+
registration. The plot below shows a reference EPI (echo-planar imaging) volume generated
67+
using two or more EPI images with the same PE encoding, after alignment to the anatomical scan.
68+
description: Hover on the panels with the mouse pointer to also visualize the intensity of the
69+
inhomogeneity of the field in Hertz.
70+
static: false
71+
subtitle: "Preprocessed estimation by nonlinear registration to an anatomical scan (&ldquo;<em>fieldmap-less</em>&rdquo;)"
6272
- name: Diffusion
6373
ordering: session,acquisition,run
6474
reportlets:

dmriprep/workflows/base.py

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ def init_single_subject_wf(subject_id):
368368

369369
# SDC Step 2: Manually add further estimators (e.g., fieldmap-less)
370370
fmap_wf = init_fmap_preproc_wf(
371-
debug=config.execution.debug,
371+
debug=config.execution.debug is True,
372372
estimators=fmap_estimators,
373373
omp_nthreads=config.nipype.omp_nthreads,
374374
output_dir=str(output_dir),
@@ -424,8 +424,6 @@ def init_single_subject_wf(subject_id):
424424
)
425425

426426
if estimator.method == fm.EstimatorType.ANAT:
427-
from niworkflows.utils.connections import pop_file as _pop
428-
from sdcflows.interfaces.brainmask import BrainExtraction
429427
from sdcflows.workflows.fit.syn import init_syn_preprocessing_wf
430428
from ..interfaces.vectors import CheckGradientTable
431429

@@ -436,6 +434,7 @@ def init_single_subject_wf(subject_id):
436434
layout = config.execution.layout
437435
syn_preprocessing_wf = init_syn_preprocessing_wf(
438436
omp_nthreads=config.nipype.omp_nthreads,
437+
debug=config.execution.debug is True,
439438
auto_bold_nss=False,
440439
t1w_inversion=True,
441440
name=f"syn_preprocessing_{estimator.bids_id}",
@@ -450,26 +449,21 @@ def init_single_subject_wf(subject_id):
450449
b0_masks.inputs.in_bvec = [str(layout.get_bvec(s)) for s in sources]
451450
b0_masks.inputs.in_bval = [str(layout.get_bval(s)) for s in sources]
452451

453-
epi_brain = pe.Node(BrainExtraction(), name=f"epi_brain_{estimator.bids_id}")
454-
455452
# fmt:off
456453
workflow.connect([
457454
(anat_preproc_wf, syn_preprocessing_wf, [
458455
("outputnode.t1w_preproc", "inputnode.in_anat"),
459456
("outputnode.t1w_mask", "inputnode.mask_anat"),
457+
("outputnode.std2anat_xfm", "inputnode.std2anat_xfm"),
460458
]),
461459
(b0_masks, syn_preprocessing_wf, [("b0_mask", "inputnode.t_masks")]),
462460
(syn_preprocessing_wf, fmap_wf, [
463461
("outputnode.epi_ref", f"in_{estimator.bids_id}.epi_ref"),
462+
("outputnode.epi_mask", f"in_{estimator.bids_id}.epi_mask"),
464463
("outputnode.anat_ref", f"in_{estimator.bids_id}.anat_ref"),
465-
("outputnode.anat2epi_xfm", f"in_{estimator.bids_id}.anat2epi_xfm"),
466-
]),
467-
(syn_preprocessing_wf, epi_brain, [
468-
(("outputnode.epi_ref", _pop), "in_file")]),
469-
(anat_preproc_wf, fmap_wf, [
470-
("outputnode.std2anat_xfm", f"in_{estimator.bids_id}.std2anat_xfm"),
464+
("outputnode.anat_mask", f"in_{estimator.bids_id}.anat_mask"),
465+
("outputnode.sd_prior", f"in_{estimator.bids_id}.sd_prior"),
471466
]),
472-
(epi_brain, fmap_wf, [("out_mask", f"in_{estimator.bids_id}.epi_mask")]),
473467
])
474468
# fmt:on
475469

docs/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ niworkflows >=1.4.0rc5,<1.5
66
packaging
77
pydot>=1.2.3
88
pydotplus
9-
sdcflows ~= 2.0.0
9+
sdcflows ~= 2.0.1
1010
smriprep >= 0.8.0rc2
1111
sphinx >=2.1.2,<3.0
1212
sphinx-argparse
1313
sphinx_rtd_theme
1414
sphinxcontrib-apidoc ~= 0.3.0
1515
templateflow
16-
toml
16+
toml

0 commit comments

Comments
 (0)