File tree Expand file tree Collapse file tree 4 files changed +21
-14
lines changed Expand file tree Collapse file tree 4 files changed +21
-14
lines changed Original file line number Diff line number Diff line change 7
7
- id : check-yaml
8
8
- id : check-added-large-files
9
9
- repo : https://github.com/psf/black
10
- rev : 22.1 .0
10
+ rev : 22.3 .0
11
11
hooks :
12
12
- id : black
Original file line number Diff line number Diff line change @@ -442,6 +442,12 @@ def _slice_time_ref(value, parser):
442
442
default = True ,
443
443
help = "do not remove median (within mask) from fieldmap" ,
444
444
)
445
+ g_fmap .add_argument (
446
+ "--topup-max-vols" ,
447
+ default = 5 ,
448
+ type = int ,
449
+ help = "maximum number of volumes to use with TOPUP, per-series (EPI or BOLD)" ,
450
+ )
445
451
446
452
# SyN-unwarp options
447
453
g_syn = parser .add_argument_group ("Specific options for SyN distortion correction" )
Original file line number Diff line number Diff line change @@ -557,6 +557,8 @@ class workflow(_Config):
557
557
spaces = None
558
558
"""Keeps the :py:class:`~niworkflows.utils.spaces.SpatialReferences`
559
559
instance keeping standard and nonstandard spaces."""
560
+ topup_max_vols = 5
561
+ """Maximum number of volumes to use with TOPUP, per-series (EPI or BOLD)."""
560
562
use_aroma = None
561
563
"""Run ICA-:abbr:`AROMA (automatic removal of motion artifacts)`."""
562
564
use_bbr = False
Original file line number Diff line number Diff line change @@ -484,21 +484,20 @@ def init_single_subject_wf(subject_id):
484
484
if estimator .method in (fm .EstimatorType .MAPPED , fm .EstimatorType .PHASEDIFF ):
485
485
continue
486
486
487
- suffices = set (s .suffix for s in estimator .sources )
488
-
489
- if estimator .method == fm .EstimatorType .PEPOLAR and sorted (suffices ) == ["epi" ]:
490
- getattr (fmap_wf .inputs , f"in_{ estimator .bids_id } " ).in_data = [
491
- str (s .path ) for s in estimator .sources
492
- ]
493
- getattr (fmap_wf .inputs , f"in_{ estimator .bids_id } " ).metadata = [
494
- s .metadata for s in estimator .sources
495
- ]
496
- continue
487
+ suffices = [s .suffix for s in estimator .sources ]
497
488
498
489
if estimator .method == fm .EstimatorType .PEPOLAR :
499
- raise NotImplementedError (
500
- "Sophisticated PEPOLAR schemes (e.g., using DWI+EPI) are unsupported."
501
- )
490
+ if set (suffices ) == {"epi" } or sorted (suffices ) == ["bold" , "epi" ]:
491
+ fmap_wf_inputs = getattr (fmap_wf .inputs , f"in_{ estimator .bids_id } " )
492
+ fmap_wf_inputs .in_data = [str (s .path ) for s in estimator .sources ]
493
+ fmap_wf_inputs .metadata = [s .metadata for s in estimator .sources ]
494
+
495
+ flatten = fmap_wf .get_node (f"wf_{ estimator .bids_id } .flatten" )
496
+ flatten .inputs .max_trs = config .workflow .topup_max_vols
497
+ else :
498
+ raise NotImplementedError (
499
+ "Sophisticated PEPOLAR schemes (e.g., using DWI+EPI) are unsupported."
500
+ )
502
501
503
502
return workflow
504
503
You can’t perform that action at this time.
0 commit comments