Skip to content

Commit

Permalink
Merge pull request #148 from CCC-members/develop
Browse files Browse the repository at this point in the history
Updating template
  • Loading branch information
arioskyag authored Jun 14, 2024
2 parents 0e415df + 52740bf commit dc1984f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
21 changes: 19 additions & 2 deletions cfs_properties/functions/check_properties.m
Original file line number Diff line number Diff line change
Expand Up @@ -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')));
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion cfs_properties/general_params.json
Original file line number Diff line number Diff line change
@@ -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"}
{ "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"}
Expand Down
2 changes: 1 addition & 1 deletion cfs_properties/process_import_anat.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "description":"", "anatomy_type":{ "description":"Select the type of anatomy to use. <<template>> Brainstorm default anatomy. <<individual>> HCP individual anatomy", "type":"default", "type_list":[ { "id":"default", "name":"default_anatomy", "description":"Select the Brainstorm anatomy template. See app/bst_default_anatomy.json file and select all params from there", "template_name":"ICBM152_2023b", "default_atlas":"Desikan-Killiany" },{ "id":"individual", "name":"hcp_anat_individual", "description":"HCP individual anatomy", "base_path":"/mnt/Data/Data_report/CHBMP_EEG_and_MRI/ds_bids_cbm_loris_24_11_21/derivatives/ciftify", "T1w_file_name":"T1w.nii.gz", "Atlas_file_name":"aparc.a2009s+aseg.nii.gz" },{ "id":"template", "name":"hcp_anat_template", "description":"HCP anatomy to use as template for EEG dataset", "base_path":"/mnt/Data/Data_report/CHBMP_EEG_and_MRI/ds_bids_cbm_loris_24_11_21/derivatives/ciftify-ICBM152", "template_name":"ICBM152", "T1w_file_name":"T1w.nii.gz", "Atlas_file_name":"aparc.a2009s+aseg.nii.gz" } ] }, "common_params":{ "mri_transformation":{ "use_transformation":false, "base_path":"/mnt/Store/Data/Conectome/Sample", "file_name":"meg/SubID/MEG/anatomy/SubID_MEG_anatomy_transform.txt" }, "non_brain_surfaces":{ "description":"FSL Bet command output", "base_path":"/mnt/Data/Data_report/CHBMP_EEG_and_MRI/ds_bids_cbm_loris_24_11_21/derivatives/fsl_bet-ICBM152" }, "layer_desc":{ "description":"Layer descriptor. Options <<white>> OR <<midthickness>> OR <<pial>> OR <<bigbrain>> multilayer like bigbrain OR <<fs_LR>> like HCP FSAve (three layers).", "desc":"Midthickness" }, "surfaces_resolution":{ "description":"Numbers of vertices for downsample the surfaces: default <<8000>>", "nvertices":8000 } }}
{ "description":"", "anatomy_type":{ "description":"Select the type of anatomy to use. <<template>> Brainstorm default anatomy. <<individual>> HCP individual anatomy", "type":"template", "type_list":[ { "id":"default", "name":"default_anatomy", "description":"Select the Brainstorm anatomy template. See app/bst_default_anatomy.json file and select all params from there", "template_name":"ICBM152_2023b", "default_atlas":"Desikan-Killiany" },{ "id":"individual", "name":"hcp_anat_individual", "description":"HCP individual anatomy", "base_path":"/mnt/Data/Data_report/CHBMP_EEG_and_MRI/ds_bids_cbm_loris_24_11_21/derivatives/ciftify", "T1w_file_name":"T1w.nii.gz", "Atlas_file_name":"aparc.a2009s+aseg.nii.gz" },{ "id":"template", "name":"hcp_anat_template", "description":"HCP anatomy to use as template for EEG dataset", "base_path":"/mnt/Data/Talia/MIITRA/ciftify", "template_name":"MIITRA", "T1w_file_name":"T1w.nii.gz", "Atlas_file_name":"aparc.a2009s+aseg.nii.gz" } ] }, "common_params":{ "mri_transformation":{ "use_transformation":false, "base_path":"/mnt/Store/Data/Conectome/Sample", "file_name":"meg/SubID/MEG/anatomy/SubID_MEG_anatomy_transform.txt" }, "non_brain_surfaces":{ "description":"FSL Bet command output", "base_path":"/mnt/Data/Talia/MIITRA/bet" }, "layer_desc":{ "description":"Layer descriptor. Options <<white>> OR <<midthickness>> OR <<pial>> OR <<bigbrain>> multilayer like bigbrain OR <<fs_LR>> like HCP FSAve (three layers).", "desc":"Midthickness" }, "surfaces_resolution":{ "description":"Numbers of vertices for downsample the surfaces: default <<8000>>", "nvertices":8000 } }}
Expand Down

0 comments on commit dc1984f

Please sign in to comment.