Skip to content

Commit

Permalink
Updates for Canlab2023 beta deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
bogpetre committed Jan 25, 2024
1 parent 3288267 commit 7ea4fa3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 19 deletions.
8 changes: 6 additions & 2 deletions CanlabCore/@atlas/merge_atlases.m
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,12 @@
% them are sparse and then converting to full
%atlas_obj.probability_maps = [full(atlas_obj.probability_maps) full(atlas_obj_to_add.probability_maps)];
if issparse(atlas_obj.probability_maps) || issparse(atlas_obj_to_add.probability_maps)
atlas_obj.probability_maps = sparse(double(atlas_obj.probability_maps));
atlas_obj_to_add.probability_maps = sparse(double(atlas_obj_to_add.probability_maps));
if ~issparse(atlas_obj.probability_maps)
atlas_obj.probability_maps = sparse(double(atlas_obj.probability_maps));
end
if ~issparse(atlas_obj_to_add.probability_maps)
atlas_obj_to_add.probability_maps = sparse(double(atlas_obj_to_add.probability_maps));
end
end
atlas_obj.probability_maps = full([atlas_obj.probability_maps atlas_obj_to_add.probability_maps]);

Expand Down
27 changes: 10 additions & 17 deletions CanlabCore/Data_extraction/load_atlas.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
% 'canlab2023[_fine|_coarse][_fmriprep20|_fsl6][_2mm]
% 'Combined atlas from other published, whole brain. Available in a fine or coarse (default) parcellation in
% MNI152NLin2009cAsym (aka fmriprep) space (default) or MNI152NLin6Asym (aka fsl) space in 1mm or 2mm (default)
% resolutions. Refer to github README for details.'
% resolutions. Additional parcellations available with downsample_parcellation(). Refer to github README for
% details.'
% 'canlab2018[_2mm]' 'Combined atlas from other published atlases, whole brain. (Deprecated in favor of canlab2023)'
% 'thalamus' 'Thalamus_combined_atlas_object.mat'
% 'thalamus_detail', 'morel[_fsl6|_fmriprep20]',
Expand Down Expand Up @@ -187,14 +188,6 @@
case 'canlab2018_2mm'
savefile = 'CANlab_combined_atlas_object_2018_2mm.mat';
varname = 'atlas_obj';

case 'canlab2023'
savefile = 'canlab2023_combined_atlas_MNI152NLin6Asym_1mm.mat';
varname = 'atlas_obj';

case 'canlab2023_2mm'
savefile = 'canlab2023_combined_atlas_MNI152NLin6Asym_2mm.mat';
varname = 'atlas_obj';

case 'insula'
savefile = 'Faillenot_insular_atlas.mat';
Expand Down Expand Up @@ -259,49 +252,49 @@
case {'canlab2023_coarse_fmriprep20_2mm', 'canlab2023_coarse_fmriprep20','canlab2023_coarse_2mm', ...
'canlab2023_fmriprep20_2mm', 'canlab2023_coarse', 'canlab2023_fmriprep20', 'canlab2023_2mm', ...
'canlab2023'}
savefile='CANLab2023_coarse_MNI152NLin2009cAsym_2mm_atlas_object.mat';
savefile='CANLab2023_MNI152NLin2009cAsym_coarse_2mm_atlas_object.mat';
varname = 'atlas_obj';
docreate = true;
create_atlas = @(x1)create_CANLab2023_atlas('MNI152NLin2009cAsym','coarse',2);

case {'canlab2023_coarse_fsl6_2mm', 'canlab2023_coarse_fsl6', 'canlab2023_fsl6_2mm', 'canlab2023_fsl6'}
savefile='CANLab2023_coarse_MNI152NLin2009cAsym_2mm_atlas_object.mat';
savefile='CANLab2023_MNI152NLin2009cAsym_coarse_2mm_atlas_object.mat';
varname = 'atlas_obj';
docreate = true;
create_atlas = @(x1)create_CANLab2023_atlas('MNI152NLin6Asym','coarse',2);

case {'canlab2023_coarse_fmriprep20_1mm', 'canlab2023_coarse_1mm', 'canlab2023_fmriprep20_1mm', 'canlab2023_1mm'}
savefile='CANLab2023_coarse_MNI152NLin2009cAsym_atlas_object.mat';
savefile='CANLab2023_MNI152NLin2009cAsym_coarse_atlas_object.mat';
varname = 'atlas_obj';
docreate = true;
create_atlas = @(x1)create_CANLab2023_atlas('MNI152NLin2009cAsym','coarse',1);

case {'canlab2023_coarse_fsl6_1mm', 'canlab2023_fsl6_1mm'}
savefile='CANLab2023_coarse_MNI152NLin2009cAsym_atlas_object.mat';
savefile='CANLab2023_MNI152NLin2009cAsym_coarse_atlas_object.mat';
varname = 'atlas_obj';
docreate = true;
create_atlas = @(x1)create_CANLab2023_atlas('MNI152NLin6Asym','coarse',1);

case {'canlab2023_fine_fmriprep20_2mm', 'canlab2023_fine_fmriprep20','canlab2023_fine_2mm', 'canlab2023_fine'}
savefile='CANLab2023_fine_MNI152NLin2009cAsym_2mm_atlas_object.mat';
savefile='CANLab2023_MNI152NLin2009cAsym_fine_2mm_atlas_object.mat';
varname = 'atlas_obj';
docreate = true;
create_atlas = @(x1)create_CANLab2023_atlas('MNI152NLin2009cAsym','fine',2);

case {'canlab2023_fine_fsl6_2mm', 'canlab2023_fine_fsl6'}
savefile='CANLab2023_fine_fsl6_2mm_atlas_object.mat';
savefile='CANLab2023_fsl6_fine_2mm_atlas_object.mat';
varname = 'atlas_obj';
docreate = true;
create_atlas = @(x1)create_CANLab2023_atlas('MNI152NLin6Asym','fine',2);

case {'canlab2023_fine_fmriprep20_1mm', 'canlab2023_fine_1mm'}
savefile='CANLab2023_fine_MNI152NLin2009cAsym_atlas_object.mat';
savefile='CANLab2023_MNI152NLin2009cAsym_fine_atlas_object.mat';
varname = 'atlas_obj';
docreate = true;
create_atlas = @(x1)create_CANLab2023_atlas('MNI152NLin2009cAsym','fine',1);

case {'canlab2023_fine_fsl6_1mm'}
savefile='CANLab2023_fine_MNI152NLin6Asym_atlas_object.mat';
savefile='CANLab2023_MNI152NLin6Asym_fine_atlas_object.mat';
varname = 'atlas_obj';
docreate = true;
create_atlas = @(x1)create_CANLab2023_atlas('MNI152NLin6Asym','fine',1);
Expand Down

0 comments on commit 7ea4fa3

Please sign in to comment.