|
|
@ -1,6 +1,3 @@ |
|
|
|
import six |
|
|
|
|
|
|
|
|
|
|
|
class Metadata(object): |
|
|
|
""" A simple container for ND2 metadata. """ |
|
|
|
def __init__(self, height, width, channels, date, fields_of_view, frames, z_levels, total_images_per_channel, pixel_microns): |
|
|
@ -107,24 +104,3 @@ class Metadata(object): |
|
|
|
|
|
|
|
""" |
|
|
|
return self._pixel_microns |
|
|
|
|
|
|
|
|
|
|
|
class CameraSettings(object): |
|
|
|
""" Contains some basic information about a physical camera and its settings. """ |
|
|
|
def __init__(self, name, id, exposure, x_binning, y_binning, channel_name): |
|
|
|
self.name = name.decode("utf8") |
|
|
|
self.id = id.decode("utf8") |
|
|
|
self.exposure = exposure |
|
|
|
self.x_binning = int(x_binning) |
|
|
|
self.y_binning = int(y_binning) |
|
|
|
self.channel_name = channel_name |
|
|
|
if six.PY3: |
|
|
|
self.channel_name = self.channel_name.decode("utf8") if channel_name is not None else None |
|
|
|
|
|
|
|
def __repr__(self): |
|
|
|
return "\n".join(["<Camera Settings: %s>" % self.channel_name, |
|
|
|
"Camera: %s" % self.name, |
|
|
|
"Camera ID: %s" % self.id, |
|
|
|
"Exposure Time (ms): %s" % self.exposure, |
|
|
|
"Binning: %sx%s" % (self.x_binning, self.y_binning) |
|
|
|
]) |