sopa.utils.polygon_crop
sopa.utils.polygon_crop.polygon_selection(sdata, intermediate_image=None, intermediate_polygon=None, channels=None, scale_factor=10, margin_ratio=0.1)
Crop an image based on a user-defined polygon (interactive mode).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sdata |
SpatialData
|
A |
required |
intermediate_image |
str | None
|
Path to the intermediate image, with a |
None
|
intermediate_polygon |
str | None
|
Path to the intermediate polygon, with a |
None
|
channels |
list[str] | None
|
List of channel names to be displayed. Optional if there are already only 1 or 3 channels. |
None
|
scale_factor |
float
|
Resize the image by this value (high value for a lower memory usage) |
10
|
margin_ratio |
float
|
Ratio of the image margin on the display (compared to the image size) |
0.1
|