ratiopath.tiling.annotations
annotations_intersection(tree, roi)
Get the intersection of annotations with the region of interest (ROI).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
tree
|
STRtree
|
The spatial index of annotation geometries. |
required |
roi
|
BaseGeometry
|
The region of interest geometry. |
required |
Returns:
Name | Type | Description |
---|---|---|
BaseGeometry |
BaseGeometry
|
The intersection of annotations with the ROI. |
Source code in ratiopath/tiling/annotations.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
shift_roi(roi, x, y, downsample)
Shift the region of interest (ROI) for a specific tile.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
roi
|
BaseGeometry
|
The current region of interest geometry. |
required |
x
|
int
|
The x-coordinate of the tile to shift the ROI for. |
required |
y
|
int
|
The y-coordinate of the tile to shift the ROI for. |
required |
downsample
|
float
|
The downsampling factor. |
required |
Returns:
Name | Type | Description |
---|---|---|
BaseGeometry |
BaseGeometry
|
The shifted region of interest geometry. |
Source code in ratiopath/tiling/annotations.py
9 10 11 12 13 14 15 16 17 18 19 20 21 |
|
tile_annotations(annotations, roi, x, y, downsample)
Yield annotated tiles from the annotation tree.
Annotations are assumed to be at level 0. Yielded geometries are transformed to the same level as the ROI and tiles.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
annotations
|
list[BaseGeometry]
|
The list of annotation geometries. |
required |
roi
|
BaseGeometry
|
The region of interest geometry. |
required |
x
|
list[int]
|
The x-coordinates of the tiles. |
required |
y
|
list[int]
|
The y-coordinates of the tiles. |
required |
downsample
|
float
|
The downsampling factor. |
required |
Yields:
Name | Type | Description |
---|---|---|
BaseGeometry |
BaseGeometry
|
The annotated tile geometry. |
Source code in ratiopath/tiling/annotations.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
|