def _get_tile(self, tile: Interval5D) -> Array5D: if self.location != self.scale.voxel_offset: tile = tile.translated(-self.location).translated( self.scale.location) tile_path = self.path / self.scale.get_tile_path(tile) with self.filesystem.openbin(tile_path.as_posix()) as f: raw_tile_bytes = f.read() tile_5d = self.scale.encoding.decode( roi=tile, dtype=self.dtype, raw_chunk=raw_tile_bytes) #type: ignore return tile_5d
def _get_tile(self, tile: Interval5D) -> Array5D: slices = tile.translated(-self.location).to_slices(self.axiskeys) raw: np.ndarray = self._dataset[slices] return Array5D(raw, axiskeys=self.axiskeys, location=tile.start)