Skip to content

Commit d871d36

Browse files
committed
fix test volume splicing matlab
1 parent 3280c6a commit d871d36

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

src/utils/volumeSplicing.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
% outputFileFullPath = volumeSplicing(inputFile, volumesToRemove)
88
%
99
% :param inputFile:
10-
% :type inputFile: path
10+
% :type inputFile: path
1111
%
1212
% :param volumesToRemove:
13-
% :type volumesToRemove: 1xn or nX1 array
13+
% :type volumesToRemove: 1xn or nX1 array
1414
%
1515
% :param outputFile: optional parameter. default: will overwrite
1616
% ``inputFile``. If only a filename is given, the file will be created in the
1717
% same folder as the input file.
18-
% :type outputFile: char
18+
% :type outputFile: char
1919
%
2020
% :returns: - :outputFileFullPath:
2121
%

tests/tests_unit/test_volumeSplicing.m

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010

1111
function test_volumeSplicing_remove_dummies()
1212

13+
if isOctave()
14+
return
15+
end
16+
1317
[inputFile, inputData] = setUp();
1418
outputFile = volumeSplicing(inputFile, 1:4, 'outputFile', 'foo.nii.gz');
1519

@@ -23,6 +27,10 @@ function test_volumeSplicing_remove_dummies()
2327

2428
function test_volumeSplicing_overwrite_input()
2529

30+
if isOctave()
31+
return
32+
end
33+
2634
inputFile = setUp();
2735
outputFile = volumeSplicing(inputFile, 1:4);
2836

@@ -37,6 +45,10 @@ function test_volumeSplicing_overwrite_input()
3745

3846
function test_volumeSplicing_remove_middle_vol()
3947

48+
if isOctave()
49+
return
50+
end
51+
4052
[inputFile, inputData] = setUp();
4153
outputFile = volumeSplicing(inputFile, 2:3, 'outputFile', 'foo.nii.gz');
4254

@@ -53,6 +65,8 @@ function test_volumeSplicing_remove_middle_vol()
5365
inputFile = fullfile(getDummyDataDir(), 'nifti_files', 'tmp.nii.gz');
5466
copyfile(fullfile(getDummyDataDir(), 'nifti_files', 'sub-01_task-auditory_bold.nii.gz'), ...
5567
inputFile);
68+
inputFile = gunzip(inputFile);
69+
inputFile = inputFile{1};
5670
pause(0.005);
5771
inputData = spm_read_vols(spm_vol(inputFile));
5872
end

0 commit comments

Comments
 (0)