|
8 | 8 | initTestSuite; |
9 | 9 | end |
10 | 10 |
|
| 11 | +function test_identify_sources_anat() |
| 12 | + |
| 13 | + anat_file = 'sub-01_T1w.nii'; |
| 14 | + |
| 15 | + prefix_output = {'wm', 'sub-01/sub-01_space-individual_desc-biascor_T1w.nii' |
| 16 | + 'wc1', 'sub-01/sub-01_space-individual_label-GM_probseg.nii' |
| 17 | + 'wc2', 'sub-01/sub-01_space-individual_label-WM_probseg.nii' |
| 18 | + 'wc3', 'sub-01/sub-01_space-individual_label-CSF_probseg.nii' |
| 19 | + 'wc1', 'sub-01/sub-01_space-individual_label-GM_probseg.nii' |
| 20 | + }; |
| 21 | + |
| 22 | + map = default_mapping(); |
| 23 | + |
| 24 | + for i = 1:size(prefix_output, 1) |
| 25 | + |
| 26 | + sources = identify_sources([prefix_output{i, 1} anat_file], map, false); |
| 27 | + |
| 28 | + assertEqual(sources{1}, prefix_output{i, 2}); |
| 29 | + |
| 30 | + end |
| 31 | + |
| 32 | +end |
| 33 | + |
11 | 34 | function test_identify_sources_func() |
12 | 35 |
|
13 | 36 | func_file = 'sub-01_task-auditory_bold.nii'; |
@@ -60,28 +83,6 @@ function test_identify_sources_mean() |
60 | 83 |
|
61 | 84 | end |
62 | 85 |
|
63 | | -function test_identify_sources_anat() |
64 | | - |
65 | | - anat_file = 'sub-01_T1w.nii'; |
66 | | - |
67 | | - prefix_output = {'wm', 'sub-01/sub-01_space-individual_desc-biascor_T1w.nii' |
68 | | - 'wc1', 'sub-01/sub-01_space-individual_label-GM_probseg.nii' |
69 | | - 'wc2', 'sub-01/sub-01_space-individual_label-WM_probseg.nii' |
70 | | - 'wc3', 'sub-01/sub-01_space-individual_label-CSF_probseg.nii' |
71 | | - }; |
72 | | - |
73 | | - map = default_mapping(); |
74 | | - |
75 | | - for i = 1:size(prefix_output, 1) |
76 | | - |
77 | | - sources = identify_sources([prefix_output{i, 1} anat_file], map, false); |
78 | | - |
79 | | - assertEqual(sources{1}, prefix_output{i, 2}); |
80 | | - |
81 | | - end |
82 | | - |
83 | | -end |
84 | | - |
85 | 86 | function test_identify_sources_suffix() |
86 | 87 |
|
87 | 88 | input_output = {'msub-01_T1w_seg8.mat', ... |
|
0 commit comments