Browse Source

fixed behavior when no events are available

zolfa-add_slices_loading
Gregor Lichtner 6 years ago
parent
commit
26bdbf36f0
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      nd2reader/raw_metadata.py

+ 5
- 3
nd2reader/raw_metadata.py View File

@ -393,9 +393,12 @@ class RawMetadata(object):
if events is None or six.b('RLxExperimentRecord') not in events: if events is None or six.b('RLxExperimentRecord') not in events:
return return
events = events[six.b('RLxExperimentRecord')][six.b('pEvents')][six.b('')]
events = events[six.b('RLxExperimentRecord')][six.b('pEvents')]
for event in events:
if len(events) == 0:
return
for event in events[six.b('')]:
event_info = { event_info = {
'index': event[six.b('I')], 'index': event[six.b('I')],
'time': event[six.b('T')], 'time': event[six.b('T')],
@ -406,7 +409,6 @@ class RawMetadata(object):
self._metadata_parsed['events'].append(event_info) self._metadata_parsed['events'].append(event_info)
@property @property
def image_text_info(self): def image_text_info(self):
"""Textual image information """Textual image information


Loading…
Cancel
Save