Updated centroid to use coords - words in 3d

This commit is contained in:
Jeremy Metz
2016-05-13 13:46:52 +01:00
parent 545b7d9d66
commit 1c0095f8e5
+2 -5
View File
@@ -115,17 +115,14 @@ class _RegionProperties(object):
"""
Returns
-------
A tuple of the bounding box's start coordinates for each dimension,
A tuple of the bounding box's start coordinates for each dimension,
followed by the end coordinates for each dimension
"""
return tuple([self._slice[i].start for i in range(self._ndim)] +
[self._slice[i].stop for i in range(self._ndim)])
def centroid(self):
centroid_coords = self.local_centroid
return tuple(centroid_coords +
np.array([self._slice[i].start
for i in range(self._ndim)]))
return tuple(self.coords.mean(axis=0))
@only2d
def convex_area(self):