|
@ -123,16 +123,6 @@ class Nd2(Nd2Parser): |
|
|
""" |
|
|
""" |
|
|
return self.metadata[six.b('ImageAttributes')][six.b('SLxImageAttributes')][six.b('uiWidth')] |
|
|
return self.metadata[six.b('ImageAttributes')][six.b('SLxImageAttributes')][six.b('uiWidth')] |
|
|
|
|
|
|
|
|
def _calculate_field_of_view(self, frame_number): |
|
|
|
|
|
images_per_cycle = len(self.z_levels) * len(self.channels) |
|
|
|
|
|
return int((frame_number - (frame_number % images_per_cycle)) / images_per_cycle) % len(self.fields_of_view) |
|
|
|
|
|
|
|
|
|
|
|
def _calculate_channel(self, frame_number): |
|
|
|
|
|
return self._channels[frame_number % len(self.channels)] |
|
|
|
|
|
|
|
|
|
|
|
def _calculate_z_level(self, frame_number): |
|
|
|
|
|
return self.z_levels[int(((frame_number - (frame_number % len(self.channels))) / len(self.channels)) % len(self.z_levels))] |
|
|
|
|
|
|
|
|
|
|
|
def get_image(self, time_index, field_of_view, channel_name, z_level): |
|
|
def get_image(self, time_index, field_of_view, channel_name, z_level): |
|
|
""" |
|
|
""" |
|
|
Returns an Image if data exists for the given parameters, otherwise returns None. In general, you should avoid |
|
|
Returns an Image if data exists for the given parameters, otherwise returns None. In general, you should avoid |
|
|