def __init__(self, bounds, orig_resolution, tile_width, tile_height, tile_format_url,
zoom_level=0, missing_z=None, image_leaf_shape=None):
self.orig_bounds = bounds
self.orig_resolution = orig_resolution
self.tile_width = tile_width
self.tile_height = tile_height
self.tile_format_url = tile_format_url
self.zoom_level = int(zoom_level)
if missing_z is None:
missing_z = []
self.missing_z = frozenset(missing_z)
if image_leaf_shape is None:
image_leaf_shape = [10, tile_height, tile_width]
scale = np.exp2(np.array([0, self.zoom_level, self.zoom_level])).astype(np.int64)
data_shape = (np.zeros(3), np.divide(bounds, scale).astype(np.int64))
self.image_data = OctreeVolume(image_leaf_shape,
data_shape,
'float32',
populator=self.image_populator)
self.label_data = None
评论列表
文章目录