client.info
Client for interacting with the info service.
Methods:
Name | Description |
---|---|
annotation_endpoint |
AnnotationEngine endpoint for a dataset. |
get_aligned_volume_info |
Gets the info record for a aligned_volume |
get_aligned_volume_info_by_id |
Gets the info record for a aligned_volume from its id instead of its name |
get_datastack_info |
Gets the info record for a datastack |
get_datastacks |
Query which datastacks are available at the info service |
get_datastacks_by_aligned_volume |
Lookup what datastacks are associated with this aligned volume |
get_image_mirror_names |
Get all image mirror names for a given aligned volume. |
get_image_mirrors |
Get all image sources for a given aligned volume |
image_cloudvolume |
Generate a cloudvolume instance based on the image source, using authentication if needed and |
image_source |
Cloud path to the imagery for the dataset |
local_server |
Get the local server address for the datastack. |
refresh_stored_data |
Reload the stored info values from the server. |
segmentation_cloudvolume |
Generate a cloudvolume instance based on the segmentation source, using authentication if needed and |
segmentation_source |
Cloud path to the chunkgraph-backed Graphene segmentation for a dataset |
synapse_segmentation_source |
Cloud path to the synapse segmentation for a dataset |
viewer_resolution |
Get the viewer resolution metadata for this datastack |
viewer_site |
Get the base Neuroglancer URL for the dataset |
Attributes:
Name | Type | Description |
---|---|---|
server_version |
Optional[Version]
|
The version of the service running on the remote server. Note that this |
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, image_mirror=None)
¶
Gets the info record for a aligned_volume
Parameters
Parameters
datastack_name : str, optional
datastack_name to look up. If None, uses the one specified by the client. By default None
use_stored : bool, optional
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
Returns
Returns
dict or None
The complete info record for the aligned_volume
get_aligned_volume_info_by_id(aligned_volume_id=None, use_stored=True)
¶
Gets the info record for a aligned_volume from its id instead of its name
Parameters:
Name | Type | Description | Default |
---|---|---|---|
aligned_volume_id
|
int
|
aligned volume id 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
|
The complete info record for the aligned_volume |
get_datastack_info(datastack_name=None, use_stored=True, image_mirror=None)
¶
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
|
image_mirror
|
str
|
If not None, will use this image mirror to get the datastack info. By default None. Requires info service app version >= 4.3.1.
Note that getting the datastack info with a specific image mirror will overwrite the cached info.
Use |
None
|
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)
¶
get_image_mirror_names(datastack_name=None)
¶
Get all image mirror names for a given aligned volume.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
datastack_name
|
Optional[str]
|
Name of the aligned volume to look up. If None, uses the value specified by the client. Default is None. |
None
|
Returns:
Type | Description |
---|---|
list
|
List of image mirror names for the aligned volume |
get_image_mirrors(datastack_name=None)
¶
Get all image sources for a given aligned volume
Parameters:
Name | Type | Description | Default |
---|---|---|---|
datastack_name
|
str
|
Name of the datastack to look up. If None, uses the value specified by the client. Default is None. |
None
|
Returns:
Type | Description |
---|---|
list
|
List of image mirror info files for the aligned volume |
image_cloudvolume(image_mirror=None, **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', image_mirror=None)
¶
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. If 'cave_explorer', 'cave-explorer' or "spelunker', a full https URL is converted to a modern neuroglancer path. |
'raw'
|
image_mirror
|
str
|
If not None, will use this image mirror to get the datastack info. By default None. |
None
|
Returns:
Type | Description |
---|---|
str
|
Formatted cloud path to the imagery |
local_server(datastack_name=None, use_stored=True)
¶
Get the local server address for the datastack.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
datastack_name
|
str
|
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
|
Local server url for the datastack |
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, use_stored=True, format_for='raw')
¶
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. If 'cave_explorer', 'cave-explorer' or "spelunker', a full https URL is converted to a modern neuroglancer path. |
'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
|
Optional[str]
|
If None use the default one configured in the client |
None
|
use_stored
|
bool
|
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 |