Skip to content

Commit e08c67b

Browse files
committed
update test isBinaryMask
1 parent 16afef7 commit e08c67b

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/roi/createRoi.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@
110110

111111
roiImage = specification;
112112

113+
isBinaryMask(roiImage);
114+
113115
mask = struct('XYZmm', []);
114116
mask = defineGlobalSearchSpace(mask, roiImage);
115117

@@ -143,6 +145,8 @@
143145
sphere = specification.mask2;
144146
end
145147

148+
isBinaryMask(roiImage);
149+
146150
mask = createRoi('mask', roiImage);
147151
mask2 = createRoi('sphere', sphere);
148152

@@ -167,6 +171,8 @@
167171
sphere = specification.mask2;
168172
end
169173

174+
isBinaryMask(roiImage);
175+
170176
% check that input image has at least enough voxels to include
171177
maskVol = spm_read_vols(spm_vol(roiImage));
172178
totalNbVoxels = sum(maskVol(:));

tests/test_isBinaryMask.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function test_isBinaryMask_false()
2929

3030
value = fullfile(thisDir(), '..', 'demos', 'roi', 'inputs');
3131

32-
if exist(fullfile(value, 'TStatistic.nii'), 'file') == 0
32+
if exist(fullfile(value, 'visual motion_association-test_z_FDR_0.01.nii'), 'file') == 0
3333
gunzip(fullfile(value, '*.gz'));
3434
end
3535

@@ -46,7 +46,10 @@ function test_isBinaryMask_false()
4646

4747
else
4848

49+
zMap = fullfile(demoDir(), 'visual motion_association-test_z_FDR_0.01.nii');
50+
4951
zMap = renameNeuroSynth(zMap);
52+
5053
threshold = 10;
5154
roiFilename = thresholdToMask(zMap, threshold);
5255

0 commit comments

Comments
 (0)