client.info
Note
The functionality described here will be accurate if the datastack you are using is using the most up-to-date version of the info service. If something seems wrong with the documentation here, try checking the version of the L2 cache returned by your client:
type(client.info)
server_version: Optional[Version]
property
¶
The version of the service running on the remote server. Note that this refers to the software running on the server and has nothing to do with the version of the datastack itself.
annotation_endpoint(datastack_name=None, use_stored=True)
¶
AnnotationEngine endpoint for a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
datastack_name |
str or None
|
Name of the datastack to look up. If None, uses the value specified by the client. Default is None. |
None
|
use_stored |
bool
|
If True, uses the cached value if available. If False, re-queries the InfoService. Default is True. |
True
|
Returns:
Type | Description |
---|---|
str
|
Location of the AnnotationEngine |
get_aligned_volume_info(datastack_name=None, use_stored=True)
¶
Gets the info record for a aligned_volume
Parameters:
Name | Type | Description | Default |
---|---|---|---|
datastack_name |
str
|
datastack_name to look up. If None, uses the one specified by the client. By default None |
None
|
use_stored |
bool
|
If True and the information has already been queried for that dataset, then uses the cached version. If False, re-queries the infromation. By default True |
True
|
Returns:
Type | Description |
---|---|
dict or None
|
The complete info record for the aligned_volume |
get_datastack_info(datastack_name=None, use_stored=True)
¶
Gets the info record for a datastack
Parameters:
Name | Type | Description | Default |
---|---|---|---|
datastack_name |
str
|
datastack to look up. If None, uses the one specified by the client. By default None |
None
|
use_stored |
bool
|
If True and the information has already been queried for that datastack, then uses the cached version. If False, re-queries the infromation. By default True |
True
|
Returns:
Type | Description |
---|---|
dict or None
|
The complete info record for the datastack |
get_datastacks()
¶
Query which datastacks are available at the info service
Returns:
Type | Description |
---|---|
list
|
List of datastack names |
get_datastacks_by_aligned_volume(aligned_volume=None)
¶
Lookup what datastacks are associated with this aligned volume
Args: aligned_volume (str, optional): aligned volume to lookup. Defaults to None.
Raises: ValueError: if no aligned volume is specified
Returns: list: a list of datastack string
image_cloudvolume(**kwargs)
¶
Generate a cloudvolume instance based on the image source, using authentication if needed and sensible default values for reading CAVE resources. By default, fill_missing is True and bounded is False. All keyword arguments are passed onto the CloudVolume initialization function, and defaults can be overridden.
Requires cloudvolume to be installed, which is not included by default.
image_source(datastack_name=None, use_stored=True, format_for='raw')
¶
Cloud path to the imagery for the dataset
Parameters:
Name | Type | Description | Default |
---|---|---|---|
datastack_name |
str or None
|
Name of the datastack to look up. If None, uses the value specified by the client. Default is None. |
None
|
use_stored |
bool
|
If True, uses the cached value if available. If False, re-queries the InfoService. Default is True. |
True
|
format_for |
'raw', 'cloudvolume', or 'neuroglancer'
|
Formats the path for different uses. If 'raw' (default), the path in the InfoService is passed along. If 'cloudvolume', a "precomputed://gs://" type path is converted to a full https URL. If 'neuroglancer', a full https URL is converted to a "precomputed://gs://" type path. |
'raw'
|
Returns:
Type | Description |
---|---|
str
|
Formatted cloud path to the flat segmentation |
raise_for_status(r, log_warning=True)
staticmethod
¶
Raises requests.HTTPError, if one occurred.
refresh_stored_data()
¶
Reload the stored info values from the server.
segmentation_cloudvolume(use_client_secret=True, **kwargs)
¶
Generate a cloudvolume instance based on the segmentation source, using authentication if needed and sensible default values for reading CAVE resources. By default, fill_missing is True and bounded is False. All keyword arguments are passed onto the CloudVolume initialization function, and defaults can be overridden.
Requires cloudvolume to be installed, which is not included by default.
segmentation_source(datastack_name=None, format_for='raw', use_stored=True)
¶
Cloud path to the chunkgraph-backed Graphene segmentation for a dataset
Parameters:
Name | Type | Description | Default |
---|---|---|---|
datastack_name |
str or None
|
Name of the datastack to look up. If None, uses the value specified by the client. Default is None. |
None
|
use_stored |
bool
|
If True, uses the cached value if available. If False, re-queries the InfoService. Default is True. |
True
|
format_for |
'raw', 'cloudvolume', or 'neuroglancer'
|
Formats the path for different uses. If 'raw' (default), the path in the InfoService is passed along. If 'cloudvolume', a "graphene://https://" type path is used If 'neuroglancer', a "graphene://https://" type path is used, as needed by Neuroglancer. |
'raw'
|
Returns:
Type | Description |
---|---|
str
|
Formatted cloud path to the Graphene segmentation |
synapse_segmentation_source(datastack_name=None, use_stored=True, format_for='raw')
¶
Cloud path to the synapse segmentation for a dataset
Parameters:
Name | Type | Description | Default |
---|---|---|---|
datastack_name |
str or None
|
Name of the dataset to look up. If None, uses the value specified by the client. Default is None. |
None
|
use_stored |
bool
|
If True, uses the cached value if available. If False, re-queries the InfoService. Default is True. |
True
|
format_for |
'raw', 'cloudvolume', or 'neuroglancer'
|
Formats the path for different uses. If 'raw' (default), the path in the InfoService is passed along. If 'cloudvolume', a "precomputed://gs://" type path is converted to a full https URL. If 'neuroglancer', a full https URL is converted to a "precomputed://gs://" type path. |
'raw'
|
Returns:
Type | Description |
---|---|
str
|
Formatted cloud path to the synapse segmentation |
viewer_resolution(datastack_name=None, use_stored=True)
¶
Get the viewer resolution metadata for this datastack
Parameters:
Name | Type | Description | Default |
---|---|---|---|
datastack_name |
If None use the default one configured in the client |
None
|
|
use_stored |
Use the cached value, if False go get a new value from server |
True
|
Returns:
Type | Description |
---|---|
array
|
Voxel resolution as a len(3) np.array |
viewer_site(datastack_name=None, use_stored=True)
¶
Get the base Neuroglancer URL for the dataset
Parameters:
Name | Type | Description | Default |
---|---|---|---|
datastack_name |
str or None
|
Name of the datastack to look up. If None, uses the value specified by the client. Default is None. |
None
|
use_stored |
bool
|
If True, uses the cached value if available. If False, re-queries the InfoService. Default is True. |
True
|
Returns:
Type | Description |
---|---|
str
|
Base URL for the Neuroglancer viewer |