Browse Source

Merge pull request #79 from jimrybarski/68-getitem-bug

resolves #68: indexing was not returning the correct image and skippe…
master
Jim Rybarski 9 years ago
parent
commit
9b0b162d2e
2 changed files with 2 additions and 5 deletions
  1. +0
    -4
      jim.py
  2. +2
    -1
      nd2reader/__init__.py

+ 0
- 4
jim.py View File

@ -1,4 +0,0 @@
import nd2reader
nd2 = nd2reader.Nd2("/var/nd2s/hawkjo.nd2")
print(nd2)

+ 2
- 1
nd2reader/__init__.py View File

@ -57,7 +57,8 @@ class Nd2(Nd2Parser):
fov = self._calculate_field_of_view(item)
channel = self._calculate_channel(item)
z_level = self._calculate_z_level(item)
timestamp, raw_image_data = self._get_raw_image_data(item, channel_offset)
image_group_number = int(item / len(self.channels))
timestamp, raw_image_data = self._get_raw_image_data(image_group_number, channel_offset)
image = Image(timestamp, raw_image_data, fov, channel, z_level, self.height, self.width)
except (TypeError, ValueError):
return None


Loading…
Cancel
Save