@@ -208,7 +208,9 @@ def detect_resolutions(dataset_path, layer) -> List[Mag]:
208208 logging .info ("ignoring {} as resolution" .format (mag ))
209209
210210
211- def detect_standard_layer (dataset_path , layer_name , exact_bounding_box = None ):
211+ def detect_standard_layer (
212+ dataset_path , layer_name , exact_bounding_box = None , category = "color"
213+ ):
212214 # Perform metadata detection for well-known layers
213215
214216 mags = list (detect_resolutions (dataset_path , layer_name ))
@@ -233,7 +235,7 @@ def detect_standard_layer(dataset_path, layer_name, exact_bounding_box=None):
233235 return {
234236 "dataFormat" : "wkw" ,
235237 "name" : layer_name ,
236- "category" : layer_name ,
238+ "category" : category ,
237239 "elementClass" : dtype ,
238240 "boundingBox" : bbox ,
239241 "wkwResolutions" : list (resolutions ),
@@ -243,7 +245,9 @@ def detect_standard_layer(dataset_path, layer_name, exact_bounding_box=None):
243245def detect_segmentation_layer (
244246 dataset_path , layer_name , max_id , compute_max_id = False , exact_bounding_box = None
245247):
246- layer_info = detect_standard_layer (dataset_path , layer_name , exact_bounding_box )
248+ layer_info = detect_standard_layer (
249+ dataset_path , layer_name , exact_bounding_box , category = "segmentation"
250+ )
247251 layer_info ["mappings" ] = []
248252 layer_info ["largestSegmentId" ] = max_id
249253
0 commit comments