squidpy.im.ImageContainer.crop_center
- ImageContainer.crop_center(y, x, radius, **kwargs)[source]
Extract a circular crop.
The extracted crop will have shape
(radius[0] * 2 + 1, radius[1] * 2 + 1)
.- Parameters:
y (
int
|float
) – Coordinate of the crop along theheight
dimension in the pixel space. If afloat
, it specifies the relative position and must be in [0, 1].x (
int
|float
) – Coordinate of the crop along thewidth
dimension in the pixel space. If afloat
, it specifies the relative position and must be in [0, 1].radius (
int
|float
|tuple
[int
|float
,int
|float
]) – Radius along theheight
andwidth
dimensions, respectively.kwargs (
Any
) – Keyword arguments forcrop_corner()
.
- Return type:
- Returns:
: The cropped image of size
size * scale
.