crantpy.utils.cave.load module#
This module provides utility functions for cave-related loading and caching.
- crantpy.utils.cave.load.clear_cave_client_cache()[source]#
Clears the CAVE client cache.
- Return type:
None
- crantpy.utils.cave.load.clear_cloudvolume_cache()[source]#
Clears the cloudvolume cache.
- Return type:
None
- crantpy.utils.cave.load.get_cave_client(dataset=None, clear_cache=False, check_stale=True)[source]#
Returns a CAVE client instance. If a token is already set, it will be used for authentication. Otherwise, a new token will be generated.
- Parameters:
clear_cache (bool, default False) – If True, bypasses the cache and fetches a new client.
check_stale (bool, default True) – If True, checks if the cached client is stale based on materialization and maximum cache duration.
dataset (str, optional) – The dataset to use. If not provided, uses the default dataset.
- Returns:
A CAVE client instance authenticated with the token.
- Return type:
CAVEclient
- Raises:
ValueError – If no token is found after attempting to generate one.
- crantpy.utils.cave.load.get_cloudvolume(dataset=None, clear_cache=False, check_stale=True, **kwargs)[source]#
Returns a cloudvolume instance.
- crantpy.utils.cave.load.get_dataset_segmentation_source(dataset)[source]#
Get segmentation source for given dataset.