Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Detect 3D BOLD series, warn and return empty workflow #2461

Merged
merged 4 commits into from
Jul 20, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion fmriprep/workflows/bold/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,15 @@ def init_func_preproc_wf(bold_file):
from niworkflows.interfaces.utils import DictMerge
from sdcflows.workflows.base import init_sdc_estimate_wf, fieldmap_wrangler

workflow = Workflow(name=wf_name)

if nb.load(bold_file).shape[3:] <= (1,):
config.loggers.workflow.warning(
f"3D BOLD series <{ref_file}> detected. Skipping."
)
return workflow


mem_gb = {'filesize': 1, 'resampled': 1, 'largemem': 1}
bold_tlen = 10

Expand Down Expand Up @@ -224,7 +233,6 @@ def init_func_preproc_wf(bold_file):
)

# Build workflow
workflow = Workflow(name=wf_name)
workflow.__postdesc__ = """\
All resamplings can be performed with *a single interpolation
step* by composing all the pertinent transformations (i.e. head-motion
Expand Down