Browse Source

removed NoImageError call, class def, and import references since now redundant

master
unknown 5 years ago
parent
commit
e9cd68bd44
2 changed files with 1 additions and 14 deletions
  1. +0
    -11
      nd2reader/exceptions.py
  2. +1
    -3
      nd2reader/parser.py

+ 0
- 11
nd2reader/exceptions.py View File

@ -6,17 +6,6 @@ class InvalidVersionError(Exception):
""" """
pass pass
class NoImageError(Exception):
"""No image found.
Some apparent images in ND2s are just completely blank placeholders. These are used when the number of images per
cycle are unequal (e.g. if you take fluorescent images every 2 minutes, and bright field images every minute).
"""
pass
class EmptyFileError(Exception): class EmptyFileError(Exception):
"""This .nd2 file seems to be empty. """This .nd2 file seems to be empty.


+ 1
- 3
nd2reader/parser.py View File

@ -7,7 +7,7 @@ from pims.base_frames import Frame
import numpy as np import numpy as np
from nd2reader.common import get_version, read_chunk from nd2reader.common import get_version, read_chunk
from nd2reader.exceptions import InvalidVersionError, NoImageError
from nd2reader.exceptions import InvalidVersionError
from nd2reader.label_map import LabelMap from nd2reader.label_map import LabelMap
from nd2reader.raw_metadata import RawMetadata from nd2reader.raw_metadata import RawMetadata
@ -289,8 +289,6 @@ class Parser(object):
empty_frame = np.zeros([height, width]) empty_frame = np.zeros([height, width])
return timestamp, Frame(empty_frame, metadata=self._get_frame_metadata()) return timestamp, Frame(empty_frame, metadata=self._get_frame_metadata())
# raise NoImageError # <-- delete?
def _get_frame_metadata(self): def _get_frame_metadata(self):
"""Get the metadata for one frame """Get the metadata for one frame


Loading…
Cancel
Save