wkcuber.metadata
#  
def
write_datasource_properties(dataset_path: pathlib.Path, datasource_properties: dict) -> None:
#  
def
write_webknossos_metadata(
dataset_path: pathlib.Path,
name: str,
voxel_size: Tuple[float, float, float],
max_id: int = 0,
compute_max_id: bool = False,
exact_bounding_box: Union[dict, NoneType] = None,
view_configuration: Union[dict, NoneType] = None
) -> None:
Creates a datasource-properties.json file with the specified properties for the given dataset path. Common layers are detected automatically.
#  
def
refresh_metadata(
wkw_path: pathlib.Path,
max_id: int = 0,
compute_max_id: bool = False,
exact_bounding_box: Union[dict, NoneType] = None,
view_configuration: Union[dict, NoneType] = None
) -> None:
Updates the datasource-properties.json file for a given dataset. Use this method if you added (or removed) layers and/or changed magnifications for existing layers.
Raises an exception if the datasource-properties.json file does not exist, yet. In this case, use write_webknossos_metadata instead.
#  
def
read_metadata_for_layer(
wkw_path: pathlib.Path,
layer_name: str
) -> Tuple[dict, numpy.dtype, List[int], List[int]]:
#  
def
detect_mag_path(
dataset_path: pathlib.Path,
layer: str,
mag: webknossos.geometry.mag.Mag = Mag(1)
) -> Union[pathlib.Path, NoneType]:
#  
def
detect_dtype(
dataset_path: pathlib.Path,
layer: str,
mag: webknossos.geometry.mag.Mag = Mag(1)
) -> str:
#  
def
detect_num_channels(
dataset_path: pathlib.Path,
layer: str,
mag: webknossos.geometry.mag.Mag = Mag(1)
) -> int:
#  
def
detect_cubeLength(
dataset_path: pathlib.Path,
layer: str,
mag: webknossos.geometry.mag.Mag = Mag(1)
) -> int:
#  
def
detect_bbox(
dataset_path: pathlib.Path,
layer: str,
mag: webknossos.geometry.mag.Mag = Mag(1)
) -> Union[dict, NoneType]:
#  
def
detect_resolutions(
dataset_path: pathlib.Path,
layer: str
) -> Generator[webknossos.geometry.mag.Mag, NoneType, NoneType]:
#  
def
detect_standard_layer(
dataset_path: pathlib.Path,
layer_name: str,
exact_bounding_box: Union[dict, NoneType] = None,
category: typing_extensions.Literal['color', 'segmentation'] = 'color',
layer_view_configuration: Union[dict, NoneType] = None
) -> dict:
#  
def
detect_segmentation_layer(
dataset_path: pathlib.Path,
layer_name: str,
max_id: int,
compute_max_id: bool = False,
exact_bounding_box: Union[dict, NoneType] = None
) -> dict:
#  
def
detect_layers(
dataset_path: pathlib.Path,
max_id: int,
compute_max_id: bool,
exact_bounding_box: Union[dict, NoneType] = None,
view_configuration: Union[dict, NoneType] = None
) -> Iterable[dict]: