Skip to content

Commit 994ea07

Browse files
authored
Merge pull request #81 from cpp-lln-lab/add_new_atlas
[FIX] fix installing atlas with octave
2 parents 53a12b5 + 5ff7063 commit 994ea07

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

initCppRoi.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ function initCppRoi()
2828
catch
2929
end
3030

31-
unzipAtlas('hcpex');
3231
copyAtlasToSpmDir('HCPex', 'verbose', true);
3332
copyAtlasToSpmDir('AAL', 'verbose', true);
3433

src/atlas/copyAtlasToSpmDir.m

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ function copyAtlasToSpmDir(varargin)
3535
sourceAtlasXml = fullfile(returnAtlasDir(), 'AAL3', 'AAL3v1_1mm.xml');
3636

3737
case 'hcpex'
38-
sourceAtlasImage = fullfile(returnAtlasDir('hcpex'), 'HCPex.nii.gz');
38+
unzipAtlas('hcpex');
39+
sourceAtlasImage = fullfile(returnAtlasDir('hcpex'), 'HCPex.nii');
3940
sourceAtlasXml = fullfile(returnAtlasDir(), 'HCPex.xml');
4041

4142
end
@@ -56,8 +57,11 @@ function copyAtlasToSpmDir(varargin)
5657
spm_mkdir(spmAtlasDir);
5758

5859
copyfile(sourceAtlasImage, spmAtlasDir);
59-
gunzip(fullfile(spmAtlasDir, '*.nii.gz'));
60-
delete(fullfile(spmAtlasDir, '*.nii.gz'));
60+
61+
if exist(fullfile(spmAtlasDir, '*.nii.gz'))
62+
gunzip(fullfile(spmAtlasDir, '*.nii.gz'));
63+
delete(fullfile(spmAtlasDir, '*.nii.gz'));
64+
end
6165

6266
copyfile(sourceAtlasXml, spmAtlasDir);
6367

0 commit comments

Comments
 (0)