From 6671a8fd918e3db751146cbaee71ac674784fc1c Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Sat, 13 Jul 2024 17:52:35 +0200 Subject: [PATCH] fix default path output create roi --- lib/CPP_ROI | 2 +- src/bidspm/bidspm.py | 2 +- tests/tests_slow/tests_cli/test_bidspm_create_roi.m | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/CPP_ROI b/lib/CPP_ROI index 21ec30d3..330239d3 160000 --- a/lib/CPP_ROI +++ b/lib/CPP_ROI @@ -1 +1 @@ -Subproject commit 21ec30d3181eea25c6306e533de02eaa61722e7c +Subproject commit 330239d34ecd425da5a5e10b82eb934b46d3165b diff --git a/src/bidspm/bidspm.py b/src/bidspm/bidspm.py index 62fd4e6f..d591db9c 100755 --- a/src/bidspm/bidspm.py +++ b/src/bidspm/bidspm.py @@ -186,7 +186,7 @@ def create_roi( ) -> str: roi_name = "{ '" + "', '".join(roi_name) + "' }" if roi_name is not None else None # type: ignore if roi_dir is None: - roi_dir = Path() + roi_dir = output_dir cmd = generate_cmd( bids_dir=bids_dir, diff --git a/tests/tests_slow/tests_cli/test_bidspm_create_roi.m b/tests/tests_slow/tests_cli/test_bidspm_create_roi.m index a9d58413..7bca3de1 100644 --- a/tests/tests_slow/tests_cli/test_bidspm_create_roi.m +++ b/tests/tests_slow/tests_cli/test_bidspm_create_roi.m @@ -46,6 +46,12 @@ function test_bidsCreateROI_glasser() 'space', {'IXI549Space'}, ... 'verbosity', 3); + assert(exist(fullfile(outputPath, ... + 'derivatives', ... + 'bidspm-roi', ... + 'reports', ... + 'create_roi_atlas-glasser_citation.md'), 'file') == 2); + rois = spm_select('FPList', fullfile(outputPath, ... 'derivatives', ... 'bidspm-roi', 'group'), '.*glasser.*_mask\.nii');