From 23a2c0157bc2bd1f686adbee6a7d5db5d6df9792 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Thu, 9 Nov 2023 11:11:05 -0500 Subject: [PATCH] Update base.py --- aslprep/workflows/asl/base.py | 66 +++++++++++++++++------------------ 1 file changed, 32 insertions(+), 34 deletions(-) diff --git a/aslprep/workflows/asl/base.py b/aslprep/workflows/asl/base.py index 16d18b336..de4f52ed3 100644 --- a/aslprep/workflows/asl/base.py +++ b/aslprep/workflows/asl/base.py @@ -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 @@ -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, @@ -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([