Browse Source

Potential fix for #138. Makes select() work with ND2s that have a single frame by iterating over a range of integers instead of the frames.

master
Jim Rybarski 9 years ago
parent
commit
0289234391
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      nd2reader/main.py

+ 1
- 1
nd2reader/main.py View File

@ -76,7 +76,7 @@ class Nd2(object):
channels = self._to_tuple(channels, self.channels) channels = self._to_tuple(channels, self.channels)
z_levels = self._to_tuple(z_levels, self.z_levels) z_levels = self._to_tuple(z_levels, self.z_levels)
for frame in self.frames:
for frame in range(len(self)):
field_of_view, channel, z_level = self._parser.driver.calculate_image_properties(frame) field_of_view, channel, z_level = self._parser.driver.calculate_image_properties(frame)
if field_of_view in fields_of_view and channel in channels and z_level in z_levels: if field_of_view in fields_of_view and channel in channels and z_level in z_levels:
image = self._parser.driver.get_image(frame) image = self._parser.driver.get_image(frame)


Loading…
Cancel
Save