File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -274,15 +274,14 @@ def get_cell_center_coordinates(gt, mode="p"):
274274 """
275275 assert mode in ["p" , "v" ], "Choose either 'p' for regionprops or 'v' for vigra"
276276
277+ properties = regionprops (gt )
278+
277279 if mode == "p" :
278- properties = regionprops (gt )
279280 center_coordinates = [prop .centroid for prop in properties ]
280- bbox_coordinates = [prop .bbox for prop in properties ]
281-
282- elif mode == "v" : # TODO: doesn't seem to work currently, will need further testing
283- raise NotImplementedError
281+ elif mode == "v" :
284282 center_coordinates = vigra .filters .eccentricityCenters (gt .astype ('float32' ))
285- bbox_coordinates = None # TODO
283+
284+ bbox_coordinates = [prop .bbox for prop in properties ]
286285
287286 return center_coordinates , bbox_coordinates
288287
You can’t perform that action at this time.
0 commit comments