diff --git a/wkcuber/metadata.py b/wkcuber/metadata.py index 23610c1b3..c42df644e 100644 --- a/wkcuber/metadata.py +++ b/wkcuber/metadata.py @@ -208,7 +208,9 @@ def detect_resolutions(dataset_path, layer) -> List[Mag]: logging.info("ignoring {} as resolution".format(mag)) -def detect_standard_layer(dataset_path, layer_name, exact_bounding_box=None): +def detect_standard_layer( + dataset_path, layer_name, exact_bounding_box=None, category="color" +): # Perform metadata detection for well-known layers mags = list(detect_resolutions(dataset_path, layer_name)) @@ -233,7 +235,7 @@ def detect_standard_layer(dataset_path, layer_name, exact_bounding_box=None): return { "dataFormat": "wkw", "name": layer_name, - "category": layer_name, + "category": category, "elementClass": dtype, "boundingBox": bbox, "wkwResolutions": list(resolutions), @@ -243,7 +245,9 @@ def detect_standard_layer(dataset_path, layer_name, exact_bounding_box=None): def detect_segmentation_layer( dataset_path, layer_name, max_id, compute_max_id=False, exact_bounding_box=None ): - layer_info = detect_standard_layer(dataset_path, layer_name, exact_bounding_box) + layer_info = detect_standard_layer( + dataset_path, layer_name, exact_bounding_box, category="segmentation" + ) layer_info["mappings"] = [] layer_info["largestSegmentId"] = max_id