Skip to content

Commit

Permalink
[FIX] fix SPM loading in returnContrastImageFile (#869)
Browse files Browse the repository at this point in the history
* fix make file

* fix returnContrastImageFile
  • Loading branch information
Remi-Gau authored Dec 12, 2022
1 parent 7f94a9c commit 9b5e2c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/stats/utils/returnContrastImageFile.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

SPM = args.Results.SPM;
if ~isstruct(SPM)
SPM = load(SPM, 'SPM');
load(SPM, 'SPM');
end

result.name = args.Results.name;
Expand Down
2 changes: 1 addition & 1 deletion tests/tests_stats/utils/test_returnContrastImageFile.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function test_returnContrastImageFile_basic()
assertEqual(conImageFile, {fullfile(pwd, 'con_0002.nii')});

save(fullfile(pwd, 'SPM.mat'), 'SPM');
conImageFile = returnContrastImageFile(SPM, 'foobar');
conImageFile = returnContrastImageFile(fullfile(pwd, 'SPM.mat'), 'foobar');
assertEqual(conImageFile, {fullfile(pwd, 'con_0003.nii')});
delete(fullfile(pwd, 'SPM.mat'));

Expand Down

0 comments on commit 9b5e2c4

Please sign in to comment.