pointcloud_episodes

Functions

get_labeling_tool_link(url[, name])

Get HTML link to the labeling tool with the specified URL and name.

get_labeling_tool_url(dataset_id, pointcloud_id)

Get the URL for the labeling tool with the specified dataset ID and poin tcloud ID.

Description

Functions for processing pointcloud episodes

Get HTML link to the labeling tool with the specified URL and name.

Parameters
url : str

URL of the labeling tool.

name : str

Name of the link, default is “open in labeling tool”.

Returns

HTML link to the labeling tool with the specified URL and name.

Return type

str

Usage example
import os
from dotenv import load_dotenv

import supervisely as sly

# Load secrets and create API object from .env file (recommended)
# Learn more here: https://developer.supervisely.com/getting-started/basics-of-authentication
if sly.is_development():
    load_dotenv(os.path.expanduser("~/supervisely.env"))
api = sly.Api.from_env()

# Pass values into the API constructor (optional, not recommended)
# api = sly.Api(server_address="https://app.supervise.ly", token="4r47N...xaTatb")

pointcloud_id = 19373403
pcd_info = api.pointcloud.get_info_by_id(pointcloud_id)
url = sly.pointcloud.get_labeling_tool_url(pcd_info.dataset_id, pcd_info.id)
name = "my link"

link = sly.pointcloud.get_labeling_tool_link(url, name)

print(link)
# Output:
# <a
#     href="https://dev.supervise.ly/app/point-clouds/?datasetId=55875&pointCloudId=19373403"
#     rel="noopener noreferrer"
#     target="_blank"
# >
#     my link<i class="zmdi zmdi-open-in-new" style="margin-left: 5px"></i>
# </a>
get_labeling_tool_url(dataset_id, pointcloud_id)[source]

Get the URL for the labeling tool with the specified dataset ID and poin tcloud ID.

Parameters
dataset_id : int

Dataset ID in Supervisely.

pointcloud_id : int

Point cloud ID in Supervisely.

Returns

URL for the labeling tool with the specified dataset ID and point cloud ID

Return type

str

Usage example
import os
from dotenv import load_dotenv

import supervisely as sly

# Load secrets and create API object from .env file (recommended)
# Learn more here: https://developer.supervisely.com/getting-started/basics-of-authentication
if sly.is_development():
    load_dotenv(os.path.expanduser("~/supervisely.env"))
api = sly.Api.from_env()

# Pass values into the API constructor (optional, not recommended)
# api = sly.Api(server_address="https://app.supervise.ly", token="4r47N...xaTatb")

pointcloud_id = 19373403
pcd_info = api.pointcloud_episodes.get_info_by_id(pointcloud_id)
url = sly.pointcloud_episodes.get_labeling_tool_url(pcd_info.dataset_id, pcd_info.id)

print(url)
# Output:
# https://dev.supervise.ly/app/point-clouds-tracking/?datasetId=55875&pointCloudId=19373403