Browse Source

Merge remote-tracking branch 'origin/master'

zolfa-add_slices_loading
Jim Rybarski 9 years ago
parent
commit
50c5b02fe6
2 changed files with 1 additions and 25 deletions
  1. +0
    -24
      nd2reader/model/metadata.py
  2. +1
    -1
      nd2reader/parser/v3.py

+ 0
- 24
nd2reader/model/metadata.py View File

@ -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)
])

+ 1
- 1
nd2reader/parser/v3.py View File

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from datetime import datetime
from nd2reader.model.metadata import Metadata, CameraSettings
from nd2reader.model.metadata import Metadata
from nd2reader.model.label import LabelMap
from nd2reader.parser.base import BaseParser
from nd2reader.driver.v3 import V3Driver


Loading…
Cancel
Save