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 @@ -262,15 +262,14 @@ def get_cell_center_coordinates(gt, mode="p"):
262262 """
263263 assert mode in ["p" , "v" ], "Choose either 'p' for regionprops or 'v' for vigra"
264264
265+ properties = regionprops (gt )
266+
265267 if mode == "p" :
266- properties = regionprops (gt )
267268 center_coordinates = [prop .centroid for prop in properties ]
268- bbox_coordinates = [prop .bbox for prop in properties ]
269-
270- elif mode == "v" : # TODO: doesn't seem to work currently, will need further testing
271- raise NotImplementedError
269+ elif mode == "v" :
272270 center_coordinates = vigra .filters .eccentricityCenters (gt .astype ('float32' ))
273- bbox_coordinates = None # TODO
271+
272+ bbox_coordinates = [prop .bbox for prop in properties ]
274273
275274 return center_coordinates , bbox_coordinates
276275
You can’t perform that action at this time.
0 commit comments