Skip to content

Commit

Permalink
Update base.py
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo committed Nov 9, 2023
1 parent 33fac77 commit 23a2c01
Showing 1 changed file with 32 additions and 34 deletions.
66 changes: 32 additions & 34 deletions aslprep/workflows/asl/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,38 @@ def init_asl_preproc_wf(asl_file, has_fieldmap=False):
inputnode.inputs.m0scan = run_data["m0scan"]
inputnode.inputs.m0scan_metadata = run_data["m0scan_metadata"]

cbf_derivs = ["mean_cbf"]
mean_cbf_derivs = ["mean_cbf"]

if is_multi_pld:
cbf_derivs += ["att"]
else:
cbf_derivs += ["cbf_ts"]

if scorescrub:
cbf_derivs += [
"cbf_ts_score",
"mean_cbf_score",
"mean_cbf_scrub",
]
mean_cbf_derivs += [
"mean_cbf_score",
"mean_cbf_scrub",
]

if basil:
cbf_derivs += [
"mean_cbf_basil",
"mean_cbf_gm_basil",
"mean_cbf_wm_basil",
"att_basil",
]
# We don't want mean_cbf_wm_basil for this list.
mean_cbf_derivs += [
"mean_cbf_basil",
"mean_cbf_gm_basil",
]

if sbref_file is not None:
from niworkflows.interfaces.header import ValidateImage

Expand Down Expand Up @@ -412,9 +444,6 @@ def init_asl_preproc_wf(asl_file, has_fieldmap=False):
# Apply ASL to T1w registration
asl_t1_trans_wf = init_asl_t1_trans_wf(
freesurfer=freesurfer,
is_multi_pld=is_multi_pld,
scorescrub=scorescrub,
basil=basil,
mem_gb=mem_gb["resampled"],
omp_nthreads=omp_nthreads,
generate_reference=True,
Expand Down Expand Up @@ -477,37 +506,6 @@ def init_asl_preproc_wf(asl_file, has_fieldmap=False):
metadata=metadata,
name="compute_cbf_wf",
)
cbf_derivs = ["mean_cbf"]
mean_cbf_derivs = ["mean_cbf"]

if is_multi_pld:
cbf_derivs += ["att"]
else:
cbf_derivs += ["cbf_ts"]

if scorescrub:
cbf_derivs += [
"cbf_ts_score",
"mean_cbf_score",
"mean_cbf_scrub",
]
mean_cbf_derivs += [
"mean_cbf_score",
"mean_cbf_scrub",
]

if basil:
cbf_derivs += [
"mean_cbf_basil",
"mean_cbf_gm_basil",
"mean_cbf_wm_basil",
"att_basil",
]
# We don't want mean_cbf_wm_basil for this list.
mean_cbf_derivs += [
"mean_cbf_basil",
"mean_cbf_gm_basil",
]

# fmt:off
workflow.connect([
Expand Down

0 comments on commit 23a2c01

Please sign in to comment.