|
123 | 123 | channels = S.database_search(ndi.query('', 'isa', 'acquisition_channels', '') & ... |
124 | 124 | ndi.query('', 'depends_on', 'acquisition_system_id', systems{a}.id()) & inSession); |
125 | 125 | for c = 1:numel(channels) |
126 | | - statements = S.database_search(ndi.query('', 'isa', 'subject_statement', '') & ... |
| 126 | + statements = S.database_search(ndi.v2.isaQuery('statement') & ... |
127 | 127 | ndi.query('', 'depends_on', 'acquisition_channels_id', channels{c}.id()) & inSession); |
128 | 128 | for t = 1:numel(statements) |
129 | 129 | st = statements{t}; |
|
208 | 208 | function pm = statementProbemap(~, st, sysName) |
209 | 209 | p = st.document_properties; |
210 | 210 | type = ''; |
211 | | - if isfield(p, 'subject_interaction') && isfield(p.subject_interaction, 'method') ... |
212 | | - && isstruct(p.subject_interaction.method) && isfield(p.subject_interaction.method, 'name') |
213 | | - type = char(p.subject_interaction.method.name); |
| 211 | + m = ndi.v2.blockOf(p, 'interaction', 'method', []); |
| 212 | + if isstruct(m) && isfield(m, 'name') |
| 213 | + type = char(m.name); |
214 | 214 | end |
215 | 215 | if isempty(type) |
216 | 216 | error('NDI:navigator:bodies:noMethod', ... |
217 | 217 | ['Recording statement %s has no `method`, which names the probe ' ... |
218 | 218 | 'type (e.g. brightfield-imaging).'], st.id()); |
219 | 219 | end |
220 | | - subject = st.dependency_value('subject_id'); |
| 220 | + subject = ndi.v2.edgeIds(p, 'entity_id'); |
| 221 | + if isempty(subject), subject = ''; else, subject = subject{1}; end |
221 | 222 | pm = ndi.epoch.epochprobemap_daqsystem(sysName, 1, type, [sysName ':image1'], subject); |
222 | 223 | end |
223 | 224 | end |
|
0 commit comments