pymaid.url_to_coordinates¶
- pymaid.url_to_coordinates(coords, stack_id, active_skeleton_id=None, active_node_id=None, zoom=0, tool='tracingtool', open_browser=False, remote_instance=None)[source]¶
Generate URL to a location.
- Parameters:
coords (list | np.ndarray | pandas.DataFrame) –
x
,y
,z
coordinates.stack_id (int | list/array of ints) – ID of the image stack you want to link to. Depending on your setup this parameter might be overriden by local user settings.
active_skeleton_id (int | list/array of ints, optional) – Skeleton ID of the neuron that should be selected.
active_node_id (int | list/array of ints, optional) – Node/Connector ID of the node that should be active.
zoom (int, optional) –
tool (str, optional) –
open_browser (bool, optional) – If True will open all generated URLs as new tabs in the standard webbrowser.
remote_instance (CatmaidInstance, optional) – If not passed directly, will try using global.
- Returns:
URL(s) to the coordinates provided.
- Return type:
str | list of str
Examples
>>> # Get URL for a single coordinate >>> url = pymaid.url_to_coordinates([1000, 1000, 1000], stack_id=5) >>> # Get URLs for all low-confidence nodes of a neuron >>> n = pymaid.get_neuron(27295) >>> low_c = n.nodes.loc[n.nodes.confidence < 5] >>> urls = pymaid.url_to_coordinates(low_c[['x', 'y', 'z']].values, ... stack_id=5, ... active_node_id=low_c.node_id.values)