From 9d851a70476667d2790fb5e7a0b25429ac26614e Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Tue, 25 Oct 2016 23:34:18 +0800 Subject: draw.py: Remove the unused "circle()" function --- fg21sim/utils/draw.py | 42 ------------------------------------------ 1 file changed, 42 deletions(-) (limited to 'fg21sim') diff --git a/fg21sim/utils/draw.py b/fg21sim/utils/draw.py index a80e301..3213fa8 100644 --- a/fg21sim/utils/draw.py +++ b/fg21sim/utils/draw.py @@ -154,45 +154,3 @@ def ellipse(r, c, r_radius, c_radius, shape): rr += upper_left[0] cc += upper_left[1] return (rr, cc) - - -def circle(r, c, radius, shape): - """Generate coordinates of pixels within the circle. - - Parameters - ---------- - r, c : int - Center coordinate of the circle. - radius : int - Radius of the circle. - shape : tuple - Image shape which is used to determine the maximum extent of output - pixel coordinates. This is useful for circles that exceed the image - size. If None, the full extent of the circle is used. - - Returns - ------- - rr, cc : integer `~numpy.ndarray` - Pixel coordinates of the circle. - May be used to directly index into an array, e.g. - ``img[rr, cc] = 1``. - - Examples - -------- - >>> from fg21sim.utils.draw import circle - >>> img = np.zeros((10, 10), dtype=np.uint8) - >>> rr, cc = circle(4, 4, 5) - >>> img[rr, cc] = 1 - >>> img - array([[0, 0, 1, 1, 1, 1, 1, 0, 0, 0], - [0, 1, 1, 1, 1, 1, 1, 1, 0, 0], - [1, 1, 1, 1, 1, 1, 1, 1, 1, 0], - [1, 1, 1, 1, 1, 1, 1, 1, 1, 0], - [1, 1, 1, 1, 1, 1, 1, 1, 1, 0], - [1, 1, 1, 1, 1, 1, 1, 1, 1, 0], - [1, 1, 1, 1, 1, 1, 1, 1, 1, 0], - [0, 1, 1, 1, 1, 1, 1, 1, 0, 0], - [0, 0, 1, 1, 1, 1, 1, 0, 0, 0], - [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], dtype=uint8) - """ - return ellipse(r, c, radius, radius, shape) -- cgit v1.2.2