Skip to content

Commit d915269

Browse files
committed
Update region-props
1 parent fd2cb96 commit d915269

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

boxkit/api/_regionprops.py

+9-5
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,16 @@ def skimage_props_blk(block, lsetkey, labelkey):
5959
listprops = skimage_measure.regionprops(block[labelkey].astype(int))
6060

6161
# proplist = ["area", "centroid", "equivalent_diameter_area"]
62-
proplist = ["area"]
62+
# proplist = ["area"]
6363

64-
# listprops = [
65-
# {"area": props["area"] * block.dx * block.dy * block.dz} for props in listprops
66-
# ]
64+
listprops = [
65+
{
66+
"area": props["area"] * block.dx * block.dy * block.dz,
67+
"centroid": props["centroid"],
68+
}
69+
for props in listprops
70+
]
6771

68-
listprops = [{key: props[key] for key in proplist} for props in listprops]
72+
# listprops = [{key: props[key] for key in proplist} for props in listprops]
6973

7074
return listprops

0 commit comments

Comments
 (0)