Browse Source

resolves #68: indexing was not returning the correct image and skipped frame entirely when there were multiple channels

feature/load_slices
jim 9 years ago
parent
commit
86d2924d35
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) fov = self._calculate_field_of_view(item)
channel = self._calculate_channel(item) channel = self._calculate_channel(item)
z_level = self._calculate_z_level(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) image = Image(timestamp, raw_image_data, fov, channel, z_level, self.height, self.width)
except (TypeError, ValueError): except (TypeError, ValueError):
return None return None


Loading…
Cancel
Save