def synthetic_stack( cls, num_round: int = 4, num_ch: int = 4, num_z: int = 12, tile_height: int = 50, tile_width: int = 40, tile_fetcher: TileFetcher = None, ) -> "ImageStack": """generate a synthetic ImageStack Returns ------- ImageStack : imagestack containing a tensor whose default shape is (2, 3, 4, 30, 20) and whose default values are all 1. """ if tile_fetcher is None: tile_fetcher = tile_fetcher_factory( OnesTile, False, (tile_height, tile_width), ) collection = build_image( 1, num_round, num_ch, num_z, tile_fetcher, ) tileset = list(collection.all_tilesets())[0][1] return ImageStack(tileset)
def setup_imagestack() -> ImageStack: """Build an imagestack with labeled indices (i.e., indices that do not start at 0 or are not sequential non-negative integers). """ collection = build_image( range(1), ROUND_LABELS, CH_LABELS, ZPLANE_LABELS, tile_fetcher_factory(UniqueTiles, True), ) tileset = list(collection.all_tilesets())[0][1] return ImageStack.from_tileset(tileset)