fill_circle#

rlemasklib.RLEMask.fill_circle(center, radius, value=1, inplace=False)[source]#

Fill a circle in the mask.

Parameters:
  • center (ndarray) – the center of the circle, in the format [x, y]

  • radius (float) – the radius of the circle

  • value (int) – the value to fill with (0 or 1)

  • inplace (bool) – whether to perform the operation in place or to return a new object

Returns:

An RLEMask object with the circle filled (self if inplace=True)

Return type:

RLEMask

Examples

Fill a circle onto an existing pattern:

.fill_circle([5, 2], radius=2, value=1) ==

Clear a circle (value=0) from a filled mask:

.fill_circle([4, 2], radius=2, value=0) ==

See also

fill_rectangle()