Browse Source

fixed behavior when no events are available

feature/load_slices
Gregor Lichtner 6 years ago
parent
commit
926f61a8a4
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:
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 = {
'index': event[six.b('I')],
'time': event[six.b('T')],
@ -406,7 +409,6 @@ class RawMetadata(object):
self._metadata_parsed['events'].append(event_info)
@property
def image_text_info(self):
"""Textual image information


Loading…
Cancel
Save