|
168 | 168 | % map = map.default; |
169 | 169 | % |
170 | 170 |
|
171 | | - prfx_spec = {{ obj.bias_cor }, obj.cfg.segment.bias_corrected; ... |
172 | | - { 'c1' }, obj.cfg.segment.gm; ... |
173 | | - { 'c2' }, obj.cfg.segment.wm; ... |
174 | | - { 'c3' }, obj.cfg.segment.csf; ... |
175 | | - { 'iy_' }, obj.cfg.segment.deformation_field.from_mni; ... |
176 | | - { 'y_' }, obj.cfg.segment.deformation_field.to_mni; ... |
177 | | - { 'segparam_' }, obj.cfg.segment.param; ... |
178 | | - { obj.stc}, obj.cfg.stc; ... |
179 | | - { 'unwarpparam_' }, obj.cfg.realign_unwarp_param; ... |
180 | | - { obj.unwarp, [obj.unwarp, obj.stc] }, obj.cfg.realign_unwarp; ... |
181 | | - { 'rp_', ['rp_' obj.stc] }, obj.cfg.real_param; ... |
182 | | - { 'mean', ... |
183 | | - ['mean' obj.unwarp], ... |
184 | | - ['mean' obj.unwarp, obj.stc] }, obj.cfg.mean; ... |
185 | | - { obj.norm, ... |
186 | | - [obj.norm, obj.bias_cor], ... |
187 | | - [obj.norm, obj.unwarp, obj.stc], ... |
188 | | - [obj.norm, obj.realign, obj.stc], ... |
189 | | - [obj.norm, obj.unwarp], ... |
190 | | - [obj.norm, obj.realign] }, obj.cfg.preproc_norm; ... |
191 | | - { [obj.norm, 'mean', obj.unwarp] }, obj.cfg.normalized_mean; ... |
192 | | - { [obj.norm, 'c1'] }, obj.cfg.segment.gm_norm; ... |
193 | | - { [obj.norm, 'c2'] }, obj.cfg.segment.wm_norm; ... |
194 | | - { [obj.norm, 'c3'] }, obj.cfg.segment.csf_norm; ... |
195 | | - {[obj.smooth, obj.norm], ... |
196 | | - [obj.smooth, obj.norm, obj.unwarp, obj.stc], ... |
197 | | - [obj.smooth, obj.norm, obj.realign, obj.stc], ... |
198 | | - [obj.smooth, obj.norm, obj.unwarp], ... |
199 | | - [obj.smooth, obj.norm, obj.realign] }, obj.cfg.smooth_norm; ... |
200 | | - { obj.smooth, ... |
201 | | - [obj.smooth, obj.unwarp, obj.stc], ... |
202 | | - [obj.smooth, obj.realign, obj.stc], ... |
203 | | - [obj.smooth, obj.unwarp], ... |
204 | | - [obj.smooth, obj.realign]}, obj.cfg.smooth}; |
205 | | - |
206 | | - for i_map = 1:size(prfx_spec, 1) |
207 | | - obj = obj.add_mapping('prefix', prfx_spec{i_map, 1}, ... |
208 | | - 'name_spec', prfx_spec{i_map, 2}); |
| 171 | + spec = { |
| 172 | + { obj.bias_cor }, obj.cfg.segment.bias_corrected; ... |
| 173 | + { 'c1' }, obj.cfg.segment.gm; ... |
| 174 | + { 'c2' }, obj.cfg.segment.wm; ... |
| 175 | + { 'c3' }, obj.cfg.segment.csf; ... |
| 176 | + { 'iy_' }, obj.cfg.segment.deformation_field.from_mni; ... |
| 177 | + { 'y_' }, obj.cfg.segment.deformation_field.to_mni; ... |
| 178 | + { 'segparam_' }, obj.cfg.segment.param; ... |
| 179 | + { obj.stc, ... |
| 180 | + [obj.stc, obj.unwarp] }, obj.cfg.stc; ... |
| 181 | + { 'unwarpparam_' }, obj.cfg.realign_unwarp_param; ... |
| 182 | + { obj.unwarp, ... |
| 183 | + [obj.unwarp, obj.stc] }, obj.cfg.realign_unwarp; ... |
| 184 | + { 'rp_', ... |
| 185 | + ['rp_', obj.stc], ... |
| 186 | + ['rp_', obj.stc, obj.unwarp] }, obj.cfg.real_param; ... |
| 187 | + { 'mean', ... |
| 188 | + ['mean' obj.unwarp], ... |
| 189 | + ['mean' obj.unwarp, obj.stc], ... |
| 190 | + ['mean' obj.stc, obj.unwarp] }, obj.cfg.mean; ... |
| 191 | + {[obj.norm, 'mean', obj.unwarp], ... |
| 192 | + [obj.norm, 'mean', obj.unwarp, obj.stc], ... |
| 193 | + [obj.norm, 'mean', obj.stc, obj.unwarp]}, obj.cfg.normalized_mean; ... |
| 194 | + {[obj.norm, 'c1'] }, obj.cfg.segment.gm_norm; ... |
| 195 | + {[obj.norm, 'c2'] }, obj.cfg.segment.wm_norm; ... |
| 196 | + {[obj.norm, 'c3'] }, obj.cfg.segment.csf_norm |
| 197 | + }; |
| 198 | + |
| 199 | + smooth = {{ obj.smooth, ... |
| 200 | + [obj.smooth, obj.unwarp, obj.stc], ... |
| 201 | + [obj.smooth, obj.stc, obj.unwarp], ... |
| 202 | + [obj.smooth, obj.realign, obj.stc], ... |
| 203 | + [obj.smooth, obj.unwarp], ... |
| 204 | + [obj.smooth, obj.realign] }, obj.cfg.smooth}; |
| 205 | + |
| 206 | + smooth_norm = {{[obj.smooth, obj.norm], ... |
| 207 | + [obj.smooth, obj.norm, obj.unwarp, obj.stc], ... |
| 208 | + [obj.smooth, obj.norm, obj.stc, obj.unwarp], ... |
| 209 | + [obj.smooth, obj.norm, obj.realign, obj.stc], ... |
| 210 | + [obj.smooth, obj.norm, obj.unwarp], ... |
| 211 | + [obj.smooth, obj.norm, obj.realign] }, obj.cfg.smooth_norm}; |
| 212 | + |
| 213 | + preproc_norm = {{obj.norm, ... |
| 214 | + [obj.norm, obj.bias_cor], ... |
| 215 | + [obj.norm, obj.stc, obj.unwarp], ... |
| 216 | + [obj.norm, obj.unwarp, obj.stc], ... |
| 217 | + [obj.norm, obj.realign, obj.stc], ... |
| 218 | + [obj.norm, obj.unwarp], ... |
| 219 | + [obj.norm, obj.realign] }, obj.cfg.preproc_norm}; |
| 220 | + |
| 221 | + spec = cat(1, spec, smooth, smooth_norm, preproc_norm); |
| 222 | + |
| 223 | + for i_map = 1:size(spec, 1) |
| 224 | + obj = obj.add_mapping('prefix', spec{i_map, 1}, ... |
| 225 | + 'name_spec', spec{i_map, 2}); |
209 | 226 | end |
210 | 227 |
|
211 | 228 | obj = flatten_mapping(obj); |
|
0 commit comments