Skip to content

Commit d1cb8cc

Browse files
authored
Merge pull request #55 from cpp-lln-lab/copy_atlas
[ENH] add copy atlas function
2 parents 0579645 + 5af848e commit d1cb8cc

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

.github/workflows/run_tests_matlab.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ on:
2020
workflow_dispatch:
2121

2222
jobs:
23-
build:
23+
tests_matlab:
2424
runs-on: ubuntu-20.04
2525

2626
steps:

tests/test_copyAtlasToSpmDir.m

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
function test_suite = test_copyAtlasToSpmDir %#ok<*STOUT>
2+
% (C) Copyright 2022 CPP ROI developers
3+
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
4+
test_functions = localfunctions(); %#ok<*NASGU>
5+
catch % no problem; early Matlab versions can use initTestSuite fine
6+
end
7+
initTestSuite;
8+
end
9+
10+
function test_copyAtlasToSpmDir_basic()
11+
12+
if isGithubCi()
13+
return
14+
end
15+
16+
copyAtlasToSpmDir('AAL', 'verbose', false);
17+
18+
spmAtlasDir = fullfile(spm('dir'), 'atlas');
19+
20+
targetAtlasImage = fullfile(spmAtlasDir, 'AAL3v1_1mm.nii');
21+
targetAtlasXml = fullfile(spmAtlasDir, 'AAL3v1_1mm.xml');
22+
23+
assertEqual(exist(targetAtlasImage, 'file'), 2);
24+
assertEqual(exist(targetAtlasXml, 'file'), 2);
25+
26+
end

0 commit comments

Comments
 (0)