Skip to content

Commit

Permalink
reuse set up
Browse files Browse the repository at this point in the history
  • Loading branch information
Remi-Gau committed Jul 13, 2024
1 parent 330239d commit b3cd282
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions tests/test_getPeakCoordinates.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@

function test_getPeakCoordinates_basic()

roiImage = extractRoiFromAtlas(pwd, 'wang', 'V1v', 'L');
inputDir = setUpDemoData();
dataImage = fullfile(inputDir, 'inputs', 'TStatistic.nii');

dataImage = fullfile(demoDir(), 'TStatistic.nii');
roiImage = extractRoiFromAtlas(pwd, 'wang', 'V1v', 'L');

reslicedImages = resliceRoiImages(dataImage, roiImage);

Expand All @@ -22,20 +23,4 @@ function test_getPeakCoordinates_basic()
assertEqual(voxelCoord, [28 8 24]);
assertElementsAlmostEqual(maxVal, 1.6212, 'absolute', 1e-3);

delete('*hemi-L_space-MNI_atlas-wang_label-V1v_mask.*');

end

function value = thisDir()
value = fileparts(mfilename('fullpath'));
end

function value = demoDir()

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

if exist(fullfile(value, 'TStatistic.nii'), 'file') == 0
gunzip(fullfile(value, '*.gz'));
end

end

0 comments on commit b3cd282

Please sign in to comment.