Skip to content

wkcuber.metadata

# &nbsp def parse_cube_file_name(filename: Union[os.PathLike, str]) -> Tuple[int, int, int]:
# &nbsp def get_datasource_path(dataset_path: pathlib.Path) -> pathlib.Path:
# &nbsp def create_parser() -> argparse.ArgumentParser:
# &nbsp def write_datasource_properties(dataset_path: pathlib.Path, datasource_properties: dict) -> None:
# &nbsp def read_datasource_properties(dataset_path: pathlib.Path) -> dict:
# &nbsp 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.

# &nbsp 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.

# &nbsp def convert_element_class_to_dtype(elementClass: str) -> numpy.dtype:
# &nbsp def read_metadata_for_layer( wkw_path: pathlib.Path, layer_name: str ) -> Tuple[dict, numpy.dtype, List[int], List[int]]:
# &nbsp def convert_dtype_to_element_class(dtype: numpy.dtype) -> str:
# &nbsp def detect_mag_path( dataset_path: pathlib.Path, layer: str, mag: webknossos.geometry.mag.Mag = Mag(1) ) -> Union[pathlib.Path, NoneType]:
# &nbsp def detect_dtype( dataset_path: pathlib.Path, layer: str, mag: webknossos.geometry.mag.Mag = Mag(1) ) -> str:
# &nbsp def detect_num_channels( dataset_path: pathlib.Path, layer: str, mag: webknossos.geometry.mag.Mag = Mag(1) ) -> int:
# &nbsp def detect_cubeLength( dataset_path: pathlib.Path, layer: str, mag: webknossos.geometry.mag.Mag = Mag(1) ) -> int:
# &nbsp def detect_bbox( dataset_path: pathlib.Path, layer: str, mag: webknossos.geometry.mag.Mag = Mag(1) ) -> Union[dict, NoneType]:
# &nbsp def detect_resolutions( dataset_path: pathlib.Path, layer: str ) -> Generator[webknossos.geometry.mag.Mag, NoneType, NoneType]:
# &nbsp 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:
# &nbsp def detect_mappings(dataset_path: pathlib.Path, layer_name: str) -> List[str]:
# &nbsp 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:
# &nbsp 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]: