Skip to content

Commit 88b2f22

Browse files
committed
add AAL3 atlas
1 parent 164cc09 commit 88b2f22

File tree

4 files changed

+221
-0
lines changed

4 files changed

+221
-0
lines changed

atlas/AAL3/AAL3v1.nii.gz

38 KB
Binary file not shown.

atlas/AAL3/AAL3v1_1mm.nii.gz

115 KB
Binary file not shown.

atlas/AAL3/LUT.csv

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
label,ROI,hemi
2+
1,Precentral,L
3+
2,Precentral,R
4+
3,Frontal_Sup_2,L
5+
4,Frontal_Sup_2,R
6+
5,Frontal_Mid_2,L
7+
6,Frontal_Mid_2,R
8+
7,Frontal_Inf_Oper,L
9+
8,Frontal_Inf_Oper,R
10+
9,Frontal_Inf_Tri,L
11+
10,Frontal_Inf_Tri,R
12+
11,Frontal_Inf_Orb_2,L
13+
12,Frontal_Inf_Orb_2,R
14+
13,Rolandic_Oper,L
15+
14,Rolandic_Oper,R
16+
15,Supp_Motor_Area,L
17+
16,Supp_Motor_Area,R
18+
17,Olfactory,L
19+
18,Olfactory,R
20+
19,Frontal_Sup_Medial,L
21+
20,Frontal_Sup_Medial,R
22+
21,Frontal_Med_Orb,L
23+
22,Frontal_Med_Orb,R
24+
23,Rectus,L
25+
24,Rectus,R
26+
25,OFCmed,L
27+
26,OFCmed,R
28+
27,OFCant,L
29+
28,OFCant,R
30+
29,OFCpost,L
31+
30,OFCpost,R
32+
31,OFClat,L
33+
32,OFClat,R
34+
33,Insula,L
35+
34,Insula,R
36+
37,Cingulate_Mid,L
37+
38,Cingulate_Mid,R
38+
39,Cingulate_Post,L
39+
40,Cingulate_Post,R
40+
41,Hippocampus,L
41+
42,Hippocampus,R
42+
43,ParaHippocampal,L
43+
44,ParaHippocampal,R
44+
45,Amygdala,L
45+
46,Amygdala,R
46+
47,Calcarine,L
47+
48,Calcarine,R
48+
49,Cuneus,L
49+
50,Cuneus,R
50+
51,Lingual,L
51+
52,Lingual,R
52+
53,Occipital_Sup,L
53+
54,Occipital_Sup,R
54+
55,Occipital_Mid,L
55+
56,Occipital_Mid,R
56+
57,Occipital_Inf,L
57+
58,Occipital_Inf,R
58+
59,Fusiform,L
59+
60,Fusiform,R
60+
61,Postcentral,L
61+
62,Postcentral,R
62+
63,Parietal_Sup,L
63+
64,Parietal_Sup,R
64+
65,Parietal_Inf,L
65+
66,Parietal_Inf,R
66+
67,SupraMarginal,L
67+
68,SupraMarginal,R
68+
69,Angular,L
69+
70,Angular,R
70+
71,Precuneus,L
71+
72,Precuneus,R
72+
73,Paracentral,Lobule,L
73+
74,Paracentral,Lobule,R
74+
75,Caudate,L
75+
76,Caudate,R
76+
77,Putamen,L
77+
78,Putamen,R
78+
79,Pallidum,L
79+
80,Pallidum,R
80+
83,Heschl,L
81+
84,Heschl,R
82+
85,Temporal_Sup,L
83+
86,Temporal_Sup,R
84+
87,Temporal_Pole_Sup,L
85+
88,Temporal_Pole_Sup,R
86+
89,Temporal_Mid,L
87+
90,Temporal_Mid,R
88+
91,Temporal_Pole_Mid,L
89+
92,Temporal_Pole_Mid,R
90+
93,Temporal_Inf,L
91+
94,Temporal_Inf,R
92+
95,Cerebellum_Crus1,L
93+
96,Cerebellum_Crus1,R
94+
97,Cerebellum_Crus2,L
95+
98,Cerebellum_Crus2,R
96+
99,Cerebellum_3,L
97+
100,Cerebellum_3,R
98+
101,Cerebellum_4_5,L
99+
102,Cerebellum_4_5,R
100+
103,Cerebellum_6,L
101+
104,Cerebellum_6,R
102+
105,Cerebellum_7b,L
103+
106,Cerebellum_7b,R
104+
107,Cerebellum_8,L
105+
108,Cerebellum_8,R
106+
109,Cerebellum_9,L
107+
110,Cerebellum_9,R
108+
111,Cerebellum_10,L
109+
112,Cerebellum_10,R
110+
113,Vermis_1_2
111+
114,Vermis_3
112+
115,Vermis_4_5
113+
116,Vermis_6
114+
117,Vermis_7
115+
118,Vermis_8
116+
119,Vermis_9
117+
120,Vermis_10
118+
121,Thal_AV,L
119+
122,Thal_AV,R
120+
123,Thal,LP,L
121+
124,Thal,LP,R
122+
125,Thal_VA,L
123+
126,Thal_VA,R
124+
127,Thal_VL,L
125+
128,Thal_VL,R
126+
129,Thal_VPL,L
127+
130,Thal_VPL,R
128+
131,Thal_IL,L
129+
132,Thal_IL,R
130+
133,Thal,Re,L
131+
134,Thal,Re,R
132+
135,Thal_MDm,L
133+
136,Thal_MDm,R
134+
137,Thal_MDl,L
135+
138,Thal_MDl,R
136+
139,Thal,LGN,L
137+
140,Thal,LGN,R
138+
141,Thal_MGN,L
139+
142,Thal_MGN,R
140+
143,Thal_PuI,L
141+
144,Thal_PuI,R
142+
145,Thal_PuM,L
143+
146,Thal_PuM,R
144+
147,Thal_PuA,L
145+
148,Thal_PuA,R
146+
149,Thal_PuL,L
147+
150,Thal_PuL,R
148+
151,ACC_sub,L
149+
152,ACC_sub,R
150+
153,ACC_pre,L
151+
154,ACC_pre,R
152+
155,ACC_sup,L
153+
156,ACC_sup,R
154+
157,N_Acc,L
155+
158,N_Acc,R
156+
159,VTA,L
157+
160,VTA,R
158+
161,SN_pc,L
159+
162,SN_pc,R
160+
163,SN_pr,L
161+
164,SN_pr,R
162+
165,Red_N,L
163+
166,Red_N,R
164+
167,LC,L
165+
168,LC,R
166+
169,Raphe_D,n/a
167+
170,Raphe_M,n/a

src/atlas/copyAtlasToSpmDir.m

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
function copyAtlasToSpmDir(atlas)
2+
%
3+
% copies a given atlas to the SPM atlas dir
4+
%
5+
% USAGE::
6+
%
7+
% copyAtlasToSpmDir(atlas)
8+
%
9+
% :param atlas: Any of ``{'AAL'}``. Defaults to ``'AAL'``
10+
% :type atlas: char
11+
%
12+
% (C) Copyright 2022 CPP_SPM developers
13+
14+
if nargin < 1
15+
atlas = 'AAL';
16+
end
17+
18+
spmAtlasDir = fullfile(spm('dir'), 'atlas');
19+
cppRoiAtlasDir = returnAtlasDir();
20+
21+
switch lower(atlas)
22+
23+
case 'aal'
24+
sourceAtlasImage = fullfile(cppRoiAtlasDir, 'AAL3', 'AAL3v1_1mm.nii.gz');
25+
sourceAtlasXml = fullfile(cppRoiAtlasDir, 'AAL3', 'AAL3v1_1mm.xml');
26+
end
27+
28+
targetAtlasImage = fullfile(spmAtlasDir, spm_file(sourceAtlasImage, 'filename'));
29+
targetAtlasXml = fullfile(spmAtlasDir, spm_file(sourceAtlasXml, 'filename'));
30+
31+
atlasPresent = isdir(spmAtlasDir) && ...
32+
exist(targetAtlasImage(1:end-3), 'file') && ...
33+
exist(targetAtlasXml, 'file');
34+
35+
if ~atlasPresent
36+
fprintf('\nCopying atlas "%s" to spm atlas directory:\n\t%s\n', ...
37+
atlas, ...
38+
spmAtlasDir)
39+
spm_mkdir(spmAtlasDir);
40+
41+
copyfile(sourceAtlasImage, spmAtlasDir);
42+
gunzip(fullfile(spmAtlasDir, '*.nii.gz'))
43+
delete(fullfile(spmAtlasDir, '*.nii.gz'))
44+
45+
copyfile(sourceAtlasXml, spmAtlasDir);
46+
47+
else
48+
fprintf('\nAtlas "%s" already in spm atlas directory:\n\t%s\n', ...
49+
atlas, ...
50+
spmAtlasDir)
51+
52+
end
53+
54+
end

0 commit comments

Comments
 (0)