src/napari_tissuemaps_interface/napari_tissuemaps_interface.py
def read_tile(self, y_tile, x_tile):
            '''
            Reads a tile from a TissuMAPS server
            :param y_tile: the y coordinate of the tile
            :param x_tile: the x coordinate of the tile
            :return: numpy array with the the cooresponding tile updated
            '''
            api_url = (
                'api/experiments/' + str(experiment_id) + '/channel_layers/' +
                str(channel_layer_id) + '/tiles'
            )
            tiles_resp = http_get(url, api_url, token, x=x_tile, y=y_tile, z=self.zoom)
            img = PIL.Image.open(BytesIO(tiles_resp.content))
            data = np.zeros((self.tile_size, self.tile_size))
            data[:img.size[1], :img.size[0]] = np.asarray(img)
            return data

            Reads a tile from a TissuMAPS server
            :param y_tile: the y coordinate of the tile
            :param x_tile: the x coordinate of the tile
            :return: numpy array with the the cooresponding tile updated
            
Reads a tile from a TissuMAPS server
Reads a tile from a TissuMAPS server
def read_tile(self, y_tile, x_tile):
            api_url = (
                'api/experiments/' + str(experiment_id) + '/channel_layers/' +
                str(channel_layer_id) + '/tiles'
            )
            tiles_resp = http_get(url, api_url, token, x=x_tile, y=y_tile, z=self.zoom)
            img = PIL.Image.open(BytesIO(tiles_resp.content))
            data = np.zeros((self.tile_size, self.tile_size))
            data[:img.size[1], :img.size[0]] = np.asarray(img)
            return data
def read_tile ( self , y_tile , x_tile ) : api_url = ( 'api/experiments/' + str ( experiment_id ) + '/channel_layers/' + str ( channel_layer_id ) + '/tiles' ) tiles_resp = http_get ( url , api_url , token , x = x_tile , y = y_tile , z = self . zoom ) img = PIL . Image . open ( BytesIO ( tiles_resp . content ) ) data = np . zeros ( ( self . tile_size , self . tile_size ) ) data [ : img . size [ 1 ] , : img . size [ 0 ] ] = np . asarray ( img ) return data
Reads a tile from a TissuMAPS server
Reads a tile from a TissuMAPS server
'''
            Reads a tile from a TissuMAPS server
            :param y_tile: the y coordinate of the tile
            :param x_tile: the x coordinate of the tile
            :return: numpy array with the the cooresponding tile updated
            '''
numpy array with the the cooresponding tile updated
numpy array with the the cooresponding tile updated
self
y_tile
the y coordinate of the tile
the y coordinate of the tile
x_tile
the x coordinate of the tile
the x coordinate of the tile