Skip to content

URLs

URL generation for opening NimbusImage resources in the browser.

nimbusimage.urls

URL generation for opening NimbusImage in the browser.

Generates frontend URLs for datasets, dataset views, configurations, and projects. Can optionally open them in the default browser.

DEFAULT_FRONTEND_URL = 'http://localhost:5173' module-attribute

dataset_info_url(dataset_id, frontend_url=DEFAULT_FRONTEND_URL)

URL for the dataset info page.

dataset_view_url(view_id, frontend_url=DEFAULT_FRONTEND_URL, xy=None, z=None, time=None, layer=None, unroll_xy=None, unroll_z=None, unroll_t=None)

URL for the dataset image viewer.

Parameters:

Name Type Description Default
view_id str

The dataset view ID (from dataset_view endpoint).

required
frontend_url str

Base URL of the NimbusImage frontend.

DEFAULT_FRONTEND_URL
xy int | None

XY position to navigate to.

None
z int | None

Z-slice to navigate to.

None
time int | None

Time point to navigate to.

None
layer str | None

Layer mode ('single', 'multiple', 'unroll').

None
unroll_xy bool | None

Unroll XY dimension.

None
unroll_z bool | None

Unroll Z dimension.

None
unroll_t bool | None

Unroll time dimension.

None

configuration_url(config_id, frontend_url=DEFAULT_FRONTEND_URL)

URL for the configuration info page.

project_url(project_id, frontend_url=DEFAULT_FRONTEND_URL)

URL for the project info page.

open_url(url)

Open a URL in the default browser.