From 1fd846bd79787fd235fcab1433221cfbc10bd629 Mon Sep 17 00:00:00 2001 From: JunhongYu <34126910+JunhongYu@users.noreply.github.com> Date: Thu, 30 Apr 2026 17:18:52 +0800 Subject: [PATCH 1/2] Update subseg_getvol.py subseg_getvol previously ignored the session label for multi-session data (sub-XXX_ses-YY; fmriprep naming convention) and place them into the same output folder, overwriting the sessions --- subcortexmesh/subseg_getvol.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subcortexmesh/subseg_getvol.py b/subcortexmesh/subseg_getvol.py index 08b8445..7d307ac 100644 --- a/subcortexmesh/subseg_getvol.py +++ b/subcortexmesh/subseg_getvol.py @@ -97,7 +97,7 @@ def subseg_getvol( roi_indices = sorted({int(line.split()[1]) for line in open(f"{toolboxdata}/template_data/{template}/{seglabel}_labels.txt") if not line.startswith("#")}) #list subs (1st depth of inputdir, and only counted as sub folders with the right "sub-xxx" pattern) - pattern = r'(sub-[^_]+)' + pattern = r'(sub-[\w]+)' sub_list = [f for f in next(os.walk(inputdir))[1] if re.search(pattern, f)] sub_list.sort() From 5471498a7b64f3360c893fc340368e8d9e3d529f Mon Sep 17 00:00:00 2001 From: JunhongYu <34126910+JunhongYu@users.noreply.github.com> Date: Thu, 30 Apr 2026 17:34:11 +0800 Subject: [PATCH 2/2] Update subseg_getvol.py subseg_getvol previously ignored the session label for multi-session data (sub-XXX_ses-YY; fmriprep naming convention) and place them into the same output folder, overwriting the sessions --- subcortexmesh/subseg_getvol.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subcortexmesh/subseg_getvol.py b/subcortexmesh/subseg_getvol.py index 7d307ac..a29f260 100644 --- a/subcortexmesh/subseg_getvol.py +++ b/subcortexmesh/subseg_getvol.py @@ -97,7 +97,7 @@ def subseg_getvol( roi_indices = sorted({int(line.split()[1]) for line in open(f"{toolboxdata}/template_data/{template}/{seglabel}_labels.txt") if not line.startswith("#")}) #list subs (1st depth of inputdir, and only counted as sub folders with the right "sub-xxx" pattern) - pattern = r'(sub-[\w]+)' + pattern = r'(sub-[\w-]+)' sub_list = [f for f in next(os.walk(inputdir))[1] if re.search(pattern, f)] sub_list.sort()