src/napari_tissuemaps_interface/napari_tissuemaps_interface.py
def tissuemaps_connector(path):
    """
    Function which reads an XML specifying TissueMAPS credential and experiment/channel_layer data
    and return a multi-scale (pyramidal) JPEG from TissueMAPs api as delayed Dask
    array.

    :param path: XML file path
    :return: List of LayerData tuple
    """
    xmldoc = minidom.parse(path)
    auth_data = {}
    auth_data['url'] = xmldoc.getElementsByTagName('url')[0].attributes['url'].value
    auth_data['user'] = \
        xmldoc.getElementsByTagName('user')[0].attributes['name'].value
    auth_data['password'] = \
        xmldoc.getElementsByTagName('user')[0].attributes['password'].value
    auth_data['token'] = \
        authenticate(auth_data['url'], auth_data['user'], auth_data['password'])

    query_data = {}
    query_data['experiment_id'] = \
        xmldoc.getElementsByTagName('layerdata')[0].attributes['experiment_id'].value

    query_data['channel_layer_id'] = \
        xmldoc.getElementsByTagName('layerdata')[0].attributes['channel_layer_id'].value

    pyramid = tissuemaps_interface(
        auth_data['url'],
        auth_data['token'],
        query_data['experiment_id'],
        query_data['channel_layer_id']
    )

    return [(pyramid, {})]

    Function which reads an XML specifying TissueMAPS credential and experiment/channel_layer data
    and return a multi-scale (pyramidal) JPEG from TissueMAPs api as delayed Dask
    array.

    :param path: XML file path
    :return: List of LayerData tuple
    
Function which reads an XML specifying TissueMAPS credential and experiment/channel_layer data
and return a multi-scale (pyramidal) JPEG from TissueMAPs api as delayed Dask
array.
Function which reads an XML specifying TissueMAPS credential and experiment / channel_layer data and return a multi - scale ( pyramidal ) JPEG from TissueMAPs api as delayed Dask array .
def tissuemaps_connector(path):
    xmldoc = minidom.parse(path)
    auth_data = {}
    auth_data['url'] = xmldoc.getElementsByTagName('url')[0].attributes['url'].value
    auth_data['user'] = \
        xmldoc.getElementsByTagName('user')[0].attributes['name'].value
    auth_data['password'] = \
        xmldoc.getElementsByTagName('user')[0].attributes['password'].value
    auth_data['token'] = \
        authenticate(auth_data['url'], auth_data['user'], auth_data['password'])
    query_data = {}
    query_data['experiment_id'] = \
        xmldoc.getElementsByTagName('layerdata')[0].attributes['experiment_id'].value
    query_data['channel_layer_id'] = \
        xmldoc.getElementsByTagName('layerdata')[0].attributes['channel_layer_id'].value
    pyramid = tissuemaps_interface(
        auth_data['url'],
        auth_data['token'],
        query_data['experiment_id'],
        query_data['channel_layer_id']
    )
    return [(pyramid, {})]
def tissuemaps_connector ( path ) : xmldoc = minidom . parse ( path ) auth_data = { } auth_data [ 'url' ] = xmldoc . getElementsByTagName ( 'url' ) [ 0 ] . attributes [ 'url' ] . value auth_data [ 'user' ] = xmldoc . getElementsByTagName ( 'user' ) [ 0 ] . attributes [ 'name' ] . value auth_data [ 'password' ] = xmldoc . getElementsByTagName ( 'user' ) [ 0 ] . attributes [ 'password' ] . value auth_data [ 'token' ] = authenticate ( auth_data [ 'url' ] , auth_data [ 'user' ] , auth_data [ 'password' ] ) query_data = { } query_data [ 'experiment_id' ] = xmldoc . getElementsByTagName ( 'layerdata' ) [ 0 ] . attributes [ 'experiment_id' ] . value query_data [ 'channel_layer_id' ] = xmldoc . getElementsByTagName ( 'layerdata' ) [ 0 ] . attributes [ 'channel_layer_id' ] . value pyramid = tissuemaps_interface ( auth_data [ 'url' ] , auth_data [ 'token' ] , query_data [ 'experiment_id' ] , query_data [ 'channel_layer_id' ] ) return [ ( pyramid , { } ) ]
Function which reads an XML specifying TissueMAPS credential and experiment/channel_layer data
and return a multi-scale (pyramidal) JPEG from TissueMAPs api as delayed Dask
array.
Function which reads an XML specifying TissueMAPS credential and experiment / channel_layer data and return a multi - scale ( pyramidal ) JPEG from TissueMAPs api as delayed Dask array .
"""
    Function which reads an XML specifying TissueMAPS credential and experiment/channel_layer data
    and return a multi-scale (pyramidal) JPEG from TissueMAPs api as delayed Dask
    array.

    :param path: XML file path
    :return: List of LayerData tuple
    """
List of LayerData tuple
List of LayerData tuple
path
XML file path
XML file path