@@ -37,7 +37,7 @@ is presented below:
37
37
For example, ``anat_preproc_wf `` is a sub-workflow that is generated by the
38
38
:func: `~smriprep.workflows.anatomical.init_anat_preproc_wf ` (see below).
39
39
Because each task and run of functional data is processed separately,
40
- :func: `~fmriprep.workflows.bold.base.init_func_preproc_wf ` names the
40
+ :func: `~fmriprep.workflows.bold.base.init_bold_wf ` names the
41
41
resulting workflows using input parameters, resulting in
42
42
``func_preproc_task_{task}_run_{run}_wf ``.
43
43
* Datasinks begin with ``ds_ ``, and save files to the output directory.
@@ -287,19 +287,41 @@ from the ``aseg.mgz`` file as described in
287
287
288
288
BOLD preprocessing
289
289
------------------
290
- :py:func: `~fmriprep.workflows.bold.base.init_func_preproc_wf `
290
+ *fMRIPrep * performs a series of steps to preprocess :abbr: `BOLD ( blood-oxygen level-dependent ) `
291
+ data. Broadly, these are split into fit and transform stages.
292
+
293
+ The following figures show the overall workflow graph and the ``bold_fit_wf ``
294
+ subgraph:
295
+
296
+ :py:func: `~fmriprep.workflows.bold.base.init_bold_wf `
291
297
292
298
.. workflow ::
293
299
:graph2use: orig
294
300
:simple_form: yes
295
301
296
302
from fmriprep.workflows.tests import mock_config
297
303
from fmriprep import config
298
- from fmriprep.workflows.bold.base import init_func_preproc_wf
304
+ from fmriprep.workflows.bold.base import init_bold_wf
299
305
with mock_config():
300
306
bold_file = config.execution.bids_dir / 'sub-01' / 'func' \
301
307
/ 'sub-01_task-mixedgamblestask_run-01_bold.nii.gz'
302
- wf = init_func_preproc_wf(str(bold_file))
308
+ wf = init_bold_wf(bold_series=[str(bold_file)])
309
+
310
+ .. _bold_fit :
311
+
312
+ :py:func: `~fmriprep.workflows.bold.fit.init_bold_fit_wf `
313
+
314
+ .. workflow ::
315
+ :graph2use: orig
316
+ :simple_form: yes
317
+
318
+ from fmriprep.workflows.tests import mock_config
319
+ from fmriprep import config
320
+ from fmriprep.workflows.bold.fit import init_bold_fit_wf
321
+ with mock_config():
322
+ bold_file = config.execution.bids_dir / 'sub-01' / 'func' \
323
+ / 'sub-01_task-mixedgamblestask_run-01_bold.nii.gz'
324
+ wf = init_bold_fit_wf(bold_series=[str(bold_file)], fieldmap_id="fmap")
303
325
304
326
Preprocessing of :abbr: `BOLD ( blood-oxygen level-dependent ) ` files is
305
327
split into multiple sub-workflows described below.
@@ -308,31 +330,31 @@ split into multiple sub-workflows described below.
308
330
309
331
BOLD reference image estimation
310
332
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
311
- :py:func: `~niworkflows.func.util.init_bold_reference_wf `
333
+ :py:func: `~fmriprep.workflows.bold.reference.init_raw_boldref_wf `
312
334
313
335
.. workflow ::
314
336
:graph2use: orig
315
337
:simple_form: yes
316
338
317
- from niworkflows.func.util import init_bold_reference_wf
318
- wf = init_bold_reference_wf(omp_nthreads=1 )
339
+ from fmriprep.workflows.bold.reference import init_raw_boldref_wf
340
+ wf = init_raw_boldref_wf( )
319
341
320
342
This workflow estimates a reference image for a
321
- :abbr: `BOLD ( blood-oxygen level-dependent ) ` series.
322
- If a single-band reference ("sbref") image associated with the BOLD series is
323
- available, then it is used directly.
324
- If not, a reference image is estimated from the BOLD series as follows:
343
+ :abbr: `BOLD ( blood-oxygen level-dependent ) ` series as follows:
325
344
When T1-saturation effects ("dummy scans" or non-steady state volumes) are
326
345
detected, they are averaged and used as reference due to their
327
346
superior tissue contrast.
328
347
Otherwise, a median of motion corrected subset of volumes is used.
329
348
330
- The reference image is then used to calculate a brain mask for the
331
- :abbr: `BOLD ( blood-oxygen level-dependent ) ` signal using *NiWorkflows *'
332
- :py:func: `~niworkflows.func.util.init_enhance_and_skullstrip_bold_wf `.
333
- Further, the reference is fed to the :ref: `head-motion estimation
334
- workflow <bold_hmc>` and the :ref: `registration workflow to map
335
- BOLD series into the T1w image of the same subject <bold_reg>`.
349
+ This reference is used for :ref: `head-motion estimation <bold_hmc >`.
350
+
351
+ For the :ref: `registration workflow <bold_reg >`, the reference image is
352
+ either the above described reference image or a single-band reference,
353
+ if one is found in the input dataset.
354
+ In either case, this image is contrast-enhanced and skull-stripped
355
+ (see :py:func: `~niworkflows.func.util.init_enhance_and_skullstrip_bold_wf `).
356
+ If fieldmaps are present, the skull-stripped reference is corrected
357
+ prior to registration.
336
358
337
359
.. figure :: _static/sub-01_task-balloonanalogrisktask_run-1_desc-rois_bold.svg
338
360
@@ -418,14 +440,19 @@ Theory, methods and references are found within the
418
440
419
441
Pre-processed BOLD in native space
420
442
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
421
- :py:func: `~fmriprep.workflows.bold.resampling.init_bold_preproc_trans_wf `
443
+ :py:func: `~fmriprep.workflows.bold.fit.init_bold_native_wf `
422
444
423
445
.. workflow ::
424
446
:graph2use: orig
425
447
:simple_form: yes
426
448
427
- from fmriprep.workflows.bold import init_bold_preproc_trans_wf
428
- wf = init_bold_preproc_trans_wf(mem_gb=3, omp_nthreads=1)
449
+ from fmriprep.workflows.tests import mock_config
450
+ from fmriprep import config
451
+ from fmriprep.workflows.bold.fit import init_bold_native_wf
452
+ with mock_config():
453
+ bold_file = config.execution.bids_dir / 'sub-01' / 'func' \
454
+ / 'sub-01_task-mixedgamblestask_run-01_bold.nii.gz'
455
+ wf = init_bold_native_wf(bold_series=[str(bold_file)], fieldmap_id='fmap')
429
456
430
457
A new *preproc * :abbr: `BOLD ( blood-oxygen level-dependent ) ` series is generated
431
458
from the slice-timing corrected or the original data (if
@@ -442,16 +469,14 @@ Interpolation uses a Lanczos kernel.
442
469
443
470
EPI to T1w registration
444
471
~~~~~~~~~~~~~~~~~~~~~~~
445
- :py:func: `~fmriprep.workflows.bold.registration.init_bold_reg_wf `
472
+ :py:func: `~fmriprep.workflows.bold.registration.init_bbreg_wf `
446
473
447
474
.. workflow ::
448
- :graph2use: orig
475
+ :graph2use: hierarchical
449
476
:simple_form: yes
450
477
451
- from fmriprep.workflows.bold import init_bold_reg_wf
452
- wf = init_bold_reg_wf(
453
- freesurfer=True,
454
- mem_gb=1,
478
+ from fmriprep.workflows.bold.registration import init_bbreg_wf
479
+ wf = init_bbreg_wf(
455
480
omp_nthreads=1,
456
481
use_bbr=True,
457
482
bold2t1w_dof=9,
@@ -478,23 +503,14 @@ original, affine registration.
478
503
479
504
Resampling BOLD runs onto standard spaces
480
505
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
481
- :py:func: `~fmriprep.workflows.bold.resampling.init_bold_std_trans_wf `
506
+ :py:func: `~fmriprep.workflows.bold.apply.init_bold_volumetric_resample_wf `
482
507
483
508
.. workflow ::
484
509
:graph2use: colored
485
510
:simple_form: yes
486
511
487
- from niworkflows.utils.spaces import SpatialReferences
488
- from fmriprep.workflows.bold import init_bold_std_trans_wf
489
- wf = init_bold_std_trans_wf(
490
- freesurfer=True,
491
- mem_gb=3,
492
- omp_nthreads=1,
493
- spaces=SpatialReferences(
494
- spaces=[('MNI152Lin', {}), ('MNIPediatricAsym', {'cohort': '6'})],
495
- checkpoint=True),
496
- multiecho=False,
497
- )
512
+ from fmriprep.workflows.bold.apply import init_bold_volumetric_resample_wf
513
+ wf = init_bold_volumetric_resample_wf(metadata={}, fieldmap_id='fmap')
498
514
499
515
This sub-workflow concatenates the transforms calculated upstream (see
500
516
`Head-motion estimation `_, `Susceptibility Distortion Correction (SDC) `_ --if
@@ -523,7 +539,10 @@ EPI sampled to FreeSurfer surfaces
523
539
wf = init_bold_surf_wf(
524
540
mem_gb=1,
525
541
surface_spaces=['fsnative', 'fsaverage5'],
526
- medial_surface_nan=False)
542
+ medial_surface_nan=False,
543
+ metadata={},
544
+ output_dir='.',
545
+ )
527
546
528
547
If FreeSurfer processing is enabled, the motion-corrected functional series
529
548
(after single shot resampling to T1w space) is sampled to the
@@ -540,7 +559,7 @@ HCP Grayordinates
540
559
:py:func: `~fmriprep.workflows.bold.resampling.init_bold_fsLR_resampling_wf `
541
560
542
561
.. workflow ::
543
- :graph2use: colored
562
+ :graph2use: orig
544
563
:simple_form: yes
545
564
546
565
from fmriprep.workflows.bold.resampling import init_bold_fsLR_resampling_wf
@@ -595,6 +614,17 @@ T2*-driven echo combination
595
614
~~~~~~~~~~~~~~~~~~~~~~~~~~~
596
615
:py:func: `~fmriprep.workflows.bold.t2s.init_bold_t2s_wf `
597
616
617
+ .. workflow ::
618
+ :graph2use: colored
619
+ :simple_form: yes
620
+
621
+ from fmriprep.workflows.bold.t2s import init_bold_t2s_wf
622
+ wf = init_bold_t2s_wf(
623
+ echo_times=[0.015, 0.030, 0.045],
624
+ mem_gb=1,
625
+ omp_nthreads=1,
626
+ )
627
+
598
628
If multi-echo :abbr: `BOLD ( blood-oxygen level-dependent ) ` data is supplied,
599
629
this workflow uses the `tedana `_ `T2* workflow `_ to generate an adaptive T2* map
600
630
and optimally weighted combination of all supplied single echo time series.
0 commit comments