Browse Source

Update raw_metadata.py

master
Gabriele Girelli 5 years ago
committed by GitHub
parent
commit
b87b5f6697
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      nd2reader/raw_metadata.py

+ 5
- 1
nd2reader/raw_metadata.py View File

@ -163,7 +163,11 @@ class RawMetadata(object):
""" """
z_levels = self._parse_dimension(r""".*?Z\((\d+)\).*?""") z_levels = self._parse_dimension(r""".*?Z\((\d+)\).*?""")
if 0 == len(z_levels): if 0 == len(z_levels):
z_levels = range(len(parse_if_not_none(self.z_data, self._parse_z_coordinates)))
z_levels = parse_if_not_none(self.z_data, self._parse_z_coordinates)
if isinstance(z_levels, type(None)):
z_levels = []
else:
z_levels = range(len(z_levels))
if 0 != z_levels: if 0 != z_levels:
warnings.warn("Z-levels details missing in metadata. Using Z-coordinates instead.") warnings.warn("Z-levels details missing in metadata. Using Z-coordinates instead.")
return z_levels return z_levels


Loading…
Cancel
Save