Skip to content

Commit 7a19449

Browse files
committed
all order of all entities to default config
1 parent 9e5916a commit 7a19449

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/defaults/check_cfg.m

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
%
1717
% ``cfg`` fields:
1818
%
19+
% - ``all_entity_order``: order of all the official bids entities
1920
% - ``entity_order``: order of the entities in bids derivatives
2021
% - ``fwhm``: value to append to smoothing desctiption label
2122
% - ``spec``: specfication details to over ride some of the defaults
@@ -67,8 +68,13 @@
6768

6869
fields_to_set.space = SPM_SPACE;
6970

71+
bidsFile = bids.File('sub-01_T1.nii', 'use_schema', false);
72+
bidsFile = bidsFile.reorder_entities;
73+
fields_to_set.all_entity_order = bidsFile.entity_order;
74+
7075
fields_to_set.entity_order = {'hemi'; ...
7176
'space'; ...
77+
'atlas'; ...
7278
'res'; ...
7379
'den'; ...
7480
'label'; ...
@@ -81,7 +87,7 @@
8187

8288
fields_to_set.spec = struct([]);
8389

84-
% fucntion to generate structures
90+
% function to generate structures
8591
desc_gen = @(x) struct('entities', struct('space', 'individual', ...
8692
'desc', x));
8793
segment_gen = @(x) struct('entities', struct('space', 'individual', ...

src/spm_2_bids.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,8 @@
217217
%
218218
%
219219

220+
% TODO should be simplifiable with bids.File
221+
220222
entities = fieldnames(bf.entities);
221223

222224
is_raw_entity = ~ismember(entities, cfg.entity_order);

0 commit comments

Comments
 (0)