diff --git a/sources/nd2/large_image_source_nd2/__init__.py b/sources/nd2/large_image_source_nd2/__init__.py index 1fa78f63d..0d74d7bae 100644 --- a/sources/nd2/large_image_source_nd2/__init__.py +++ b/sources/nd2/large_image_source_nd2/__init__.py @@ -305,20 +305,11 @@ def getTile(self, x, y, z, pilImageAllowed=False, numpyAllowed=False, **kwargs): x1 = min((x + 1) * step * self.tileWidth, self.sizeX) y0 = y * step * self.tileHeight y1 = min((y + 1) * step * self.tileHeight, self.sizeY) - if getattr(self, 'style', None) and not getattr(self, '_skipStyle', False): - with self._tileLock: - if 0 not in self._recentFrames: - self._recentFrames[0] = self._nd2[0] - tileframe = self._recentFrames[0] - tile = tileframe[0:1, 0:1].copy() - tile = numpy.zeros( - tuple([self.tileHeight, self.tileWidth] + list(tile.shape[2:])), dtype=tile.dtype) - else: - with self._tileLock: - if frame not in self._recentFrames: - self._recentFrames[frame] = self._nd2[frame] - tileframe = self._recentFrames[frame] - tile = tileframe[y0:y1:step, x0:x1:step].copy() + with self._tileLock: + if frame not in self._recentFrames: + self._recentFrames[frame] = self._nd2[frame] + tileframe = self._recentFrames[frame] + tile = tileframe[y0:y1:step, x0:x1:step].copy() return self._outputTile(tile, TILE_FORMAT_NUMPY, x, y, z, pilImageAllowed, numpyAllowed, **kwargs)