mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-08 12:31:49 +08:00
Updated centroid to use coords - words in 3d
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user