From 52740bf991d21904ad38c6a8c867ac3b8768fb9d Mon Sep 17 00:00:00 2001 From: Ariosky Areces Gonzalez <48639831+arioskyag@users.noreply.github.com> Date: Fri, 14 Jun 2024 11:17:30 +0800 Subject: [PATCH] Updating template --- cfs_properties/functions/check_properties.m | 21 +++++++++++++++++++-- cfs_properties/general_params.json | 2 +- cfs_properties/process_import_anat.json | 2 +- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/cfs_properties/functions/check_properties.m b/cfs_properties/functions/check_properties.m index b83e7f7..3fc7ef3 100644 --- a/cfs_properties/functions/check_properties.m +++ b/cfs_properties/functions/check_properties.m @@ -83,9 +83,9 @@ anat_params = properties.anatomy_params; % Check default template configuration - if(isequal(lower(anat_params.anatomy_type.id),'template')) + if(isequal(lower(anat_params.anatomy_type.id),'default')) disp("--------------------------------------------------------------------------"); - disp('-->> Checking template configuration'); + disp('-->> Checking default configuration'); selected_anatomy = anat_params.anatomy_type; template_name = selected_anatomy.template_name; defaults = jsondecode(fileread(fullfile('bst_defaults','bst_default_anatomy.json'))); @@ -175,6 +175,23 @@ end end end + + if(isequal(lower(anat_params.anatomy_type.id),'template')) + disp("--------------------------------------------------------------------------"); + disp('-->> Checking template configuration'); + selected_anatomy = anat_params.anatomy_type; + template_name = selected_anatomy.template_name; + subjects = dir(selected_anatomy.base_path); + if(~contains(template_name, {subjects.name})) + fprintf(2,strcat('\nBC-V-->> Error: The selected template name in process_import_anat.json is wrong \n')); + disp(strcat("Name: ",template_name)); + disp(strcat("Please check the available anatomy templates in bst_template/bst_default_anatomy.json file")); + status = false; + disp('-->> Process stopped!!!'); + return; + end + end + % Check MRI transform configuration mri_transform = anat_params.common_params.mri_transformation; if(mri_transform.use_transformation) diff --git a/cfs_properties/general_params.json b/cfs_properties/general_params.json index 1b0664c..659fb2b 100644 --- a/cfs_properties/general_params.json +++ b/cfs_properties/general_params.json @@ -1 +1 @@ -{ "description":"", "modality":"EEG", "dataset":{ "Name":"CHBMP", "Description":"ICBM152" }, "bst_config":{ "description":"", "protocol_name":"HeadModel_CHBMP", "reset_protocol":false, "bst_path":"/mnt/Develop/Tools/brainstorm3", "db_path":"local", "after_MaQC":{ "run":false } }, "output_path":"/mnt/Data/Data_report/Test", "tmp_path":"local" } \ No newline at end of file +{ "description":"", "modality":"EEG", "dataset":{ "Name":"CHBMP", "Description":"ICBM152" }, "bst_config":{ "description":"", "protocol_name":"HeadModel_CHBMP", "reset_protocol":false, "bst_path":"/mnt/Develop/Tools/brainstorm3", "db_path":"local", "after_MaQC":{ "run":false } }, "output_path":"/mnt/Data/Talia/MIITRA", "tmp_path":"local" } \ No newline at end of file diff --git a/cfs_properties/process_import_anat.json b/cfs_properties/process_import_anat.json index 850c8c1..ed5d520 100644 --- a/cfs_properties/process_import_anat.json +++ b/cfs_properties/process_import_anat.json @@ -1 +1 @@ -{ "description":"", "anatomy_type":{ "description":"Select the type of anatomy to use. <