Browse Source

#66 refactored init

zolfa-add_slices_loading
jim 9 years ago
parent
commit
177530d657
2 changed files with 6 additions and 5 deletions
  1. +6
    -5
      nd2reader/interface.py
  2. +0
    -0
      nd2reader/version.py

+ 6
- 5
nd2reader/interface.py View File

@ -1,8 +1,8 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from nd2reader.model import ImageGroup from nd2reader.model import ImageGroup
from nd2reader.driver import get_driver
from nd2reader.driver.version import get_version
from nd2reader.parser import get_parser
from nd2reader.version import get_version
import warnings import warnings
@ -12,10 +12,11 @@ class Nd2(object):
""" """
def __init__(self, filename): def __init__(self, filename):
self._filename = filename
version = get_version(filename) version = get_version(filename)
self._driver = get_driver(filename, version)
self._metadata = self._driver.get_metadata()
parser = get_parser(filename, version)
self._driver = parser.driver
self._metadata = parser.metadata
self._filename = filename
def __repr__(self): def __repr__(self):
return "\n".join(["<ND2 %s>" % self._filename, return "\n".join(["<ND2 %s>" % self._filename,


nd2reader/driver/version.py → nd2reader/version.py View File


Loading…
Cancel
Save