From ef3c4710df1be16ab4f903d204914867eda88a93 Mon Sep 17 00:00:00 2001 From: NicolasGensollen Date: Wed, 29 Mar 2023 10:17:20 +0200 Subject: [PATCH] some fixes --- .../dwi_preprocessing_using_phasediff_fmap_pipeline.py | 2 +- .../dwi_preprocessing_using_phasediff_fmap_workflows.py | 6 +++--- test/nonregression/pipelines/test_run_pipelines_dwi.py | 7 +++++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/clinica/pipelines/dwi_preprocessing_using_fmap/dwi_preprocessing_using_phasediff_fmap_pipeline.py b/clinica/pipelines/dwi_preprocessing_using_fmap/dwi_preprocessing_using_phasediff_fmap_pipeline.py index f3a7f7076..cfdbffe2a 100644 --- a/clinica/pipelines/dwi_preprocessing_using_fmap/dwi_preprocessing_using_phasediff_fmap_pipeline.py +++ b/clinica/pipelines/dwi_preprocessing_using_fmap/dwi_preprocessing_using_phasediff_fmap_pipeline.py @@ -390,7 +390,7 @@ def build_core_nodes(self): init_node, fmap_calibration_and_registration, [ - ("fmap_magnitude", "inputnode.magnitude_fmap"), + ("fmap_magnitude", "inputnode.bias_magnitude_fmap"), ("fmap_phasediff", "inputnode.fmap_phasediff"), ("delta_echo_time", "inputnode.delta_echo_time"), ], diff --git a/clinica/pipelines/dwi_preprocessing_using_fmap/dwi_preprocessing_using_phasediff_fmap_workflows.py b/clinica/pipelines/dwi_preprocessing_using_fmap/dwi_preprocessing_using_phasediff_fmap_workflows.py index 3603c59d9..06e7031ba 100644 --- a/clinica/pipelines/dwi_preprocessing_using_fmap/dwi_preprocessing_using_phasediff_fmap_workflows.py +++ b/clinica/pipelines/dwi_preprocessing_using_fmap/dwi_preprocessing_using_phasediff_fmap_workflows.py @@ -501,16 +501,16 @@ def calibrate_and_register_fmap( [("out_file", "in_file")], ), # Output connections - (smooth_calibrated_fmap, outputnode, ["out_file", "smooth_calibrated_fmap"]), + (smooth_calibrated_fmap, outputnode, [("out_file", "smooth_calibrated_fmap")]), ( register_bet_magnitude_fmap_onto_b0, outputnode, - ["out_file", "bet_magnitude_fmap_registered_onto_b0"], + [("out_file", "bet_magnitude_fmap_registered_onto_b0")], ), ( apply_xfm_on_calibrated_fmap, outputnode, - ["out_file", "registered_calibrated_fmap"], + [("out_file", "registered_calibrated_fmap")], ), ] diff --git a/test/nonregression/pipelines/test_run_pipelines_dwi.py b/test/nonregression/pipelines/test_run_pipelines_dwi.py index f93ce037d..ebcda0666 100644 --- a/test/nonregression/pipelines/test_run_pipelines_dwi.py +++ b/test/nonregression/pipelines/test_run_pipelines_dwi.py @@ -176,7 +176,10 @@ def test_prepare_phasediff_fmap(cmdopt, tmp_path): @pytest.mark.fast def test_dwi_calibrate_and_register_fmap(cmdopt, tmp_path): - """Test step 2 of pipeline DWIPreprocessingUsingPhaseDiff.""" + """Test step 2 of pipeline DWIPreprocessingUsingPhaseDiff. + + This is a fast test which should run in about 1 minute. + """ from clinica.pipelines.dwi_preprocessing_using_fmap.dwi_preprocessing_using_phasediff_fmap_workflows import ( calibrate_and_register_fmap, ) @@ -193,7 +196,7 @@ def test_dwi_calibrate_and_register_fmap(cmdopt, tmp_path): ) delta_echo_time = abs(echo_time2 - echo_time1) - wf = calibrate_and_register_fmap() + wf = calibrate_and_register_fmap(output_dir=str(tmp_path / "tmp")) wf.inputs.inputnode.reference_b0 = str( input_dir / "sub-01_ses-M000_avg_b0_brain.nii.gz" )