mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-29 06:33:19 +08:00
Merge pull request #2030 from sdsingh/bbox
Document regionprops bbox property.
This commit is contained in:
+1
-1
@@ -28,7 +28,7 @@ sys.path.append(os.path.join(curpath, '..', 'ext'))
|
||||
# Add any Sphinx extension module names here, as strings. They can be extensions
|
||||
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
||||
extensions = ['sphinx.ext.autodoc',
|
||||
'sphinx.ext.pngmath',
|
||||
'sphinx.ext.imgmath',
|
||||
'numpydoc',
|
||||
'sphinx.ext.autosummary',
|
||||
'plot2rst',
|
||||
|
||||
@@ -112,6 +112,12 @@ class _RegionProperties(object):
|
||||
return np.sum(self.image)
|
||||
|
||||
def bbox(self):
|
||||
"""
|
||||
Returns
|
||||
-------
|
||||
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)])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user