Skip to content

Commit

Permalink
Learn the tile shape from the decoded data. (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
ttung authored May 30, 2018
1 parent 9fbe415 commit 597f19b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions slicedimage/_tile.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def _load(self):
self._numpy_array = self.tile_format.reader_func(src_fh)
self._source_fh_contextmanager = None
self.tile_format = ImageFormat.NUMPY
self.tile_shape = self.numpy_array.shape

@property
def numpy_array(self):
Expand All @@ -40,6 +41,7 @@ def numpy_array(self, numpy_array):
self._source_fh_contextmanager = None
self._numpy_array = numpy_array
self.tile_format = ImageFormat.NUMPY
self.tile_shape = self._numpy_array.shape

def set_source_fh_contextmanager(self, source_fh_contextmanager, tile_format):
"""
Expand Down

0 comments on commit 597f19b

Please sign in to comment.