Skip to content

Commit be3fdc2

Browse files
committed
fix realign unwarp and stc
1 parent a258b35 commit be3fdc2

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

run_tests.m

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
% (C) Copyright 2019 spm_2_bids developers
22

3-
folderToCover = fullfile(pwd, 'src');
4-
testFolder = fullfile(pwd, 'tests');
3+
thisDir = fullfile(fileparts(mfilename('fullpath')));
4+
5+
if isdir(fullfile(thisDir, 'lib', 'bids-matlab'))
6+
addpath(fullfile(thisDir, 'lib', 'bids-matlab'));
7+
end
8+
9+
folderToCover = fullfile(thisDir, 'src');
10+
testFolder = fullfile(thisDir, 'tests');
511

612
success = moxunit_runtests(testFolder, ...
713
'-verbose', '-recursive', '-with_coverage', ...

src/defaults/Mapping.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@
180180
{ obj.unwarp, [obj.unwarp, obj.stc] }, obj.cfg.realign_unwarp; ...
181181
{ 'rp_', ['rp_' obj.stc] }, obj.cfg.real_param; ...
182182
{ 'mean', ...
183-
['mean' obj.unwarp], ...
183+
['mean' obj.unwarp], ...
184184
['mean' obj.unwarp, obj.stc] }, obj.cfg.mean; ...
185185
{ obj.norm, ...
186186
[obj.norm, obj.bias_cor], ...

src/defaults/check_cfg.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868

6969
fields_to_set.space = SPM_SPACE;
7070

71+
% just to keep track of all the BIDS entities in the cfg
7172
bidsFile = bids.File('sub-01_T1.nii', 'use_schema', false);
7273
bidsFile = bidsFile.reorder_entities;
7374
fields_to_set.all_entity_order = bidsFile.entity_order;

src/defaults/get_spm_prefix_list.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
function prefix_list = get_spm_prefix_list()
22
%
33
% load SPM default prefix values
4+
% or use a hard coded one it this fails:
5+
% can be useful for testing when spm
6+
% is not there.
47
%
58
%
69
% (C) Copyright 2021 spm_2_bids developers

0 commit comments

Comments
 (0)