omero/rois.py
Helps access ROIs from OMERO image objects
create_roi(img, shapes)
Creates an omero RoiI object for an image from an array of shapes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
img | ImageWrapper | Omero Image object from conn.getObjects(). | required |
shapes | list[ShapeWrapper] | List of omero shape objects (Polygon, Rectangle, etc). | required |
Returns | | required | |
omero_model_RoiI | Local Omero ROI object, needs to be saved | required |
Source code in lavlab/omero/rois.py
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | |
get_rois(img, roi_service=None)
Gathers OMERO RoiI objects.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
img | ImageWrapper | Omero Image object from conn.getObjects() | required |
roi_service | Allows roiservice passthrough for performance | None |
Source code in lavlab/omero/rois.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | |
get_shapes_as_points(img, point_downsample=4, img_downsample=1, roi_service=None)
Gathers Rectangles, Polygons, and Ellipses as a tuple containing the shapeId, its rgb val, and a tuple of xy points of its bounds.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
img | ImageWrapper | Omero Image object from conn.getObjects(). | required |
point_downsample | Grabs every nth point for faster computation. | 4 | |
img_downsample | How much to scale roi points. | 1 | |
roi_service | Allows roiservice passthrough for performance. | None |
Returns:
| Name | Type | Description |
|---|---|---|
returns | list[id, (r, g, b), list[tuple(x, y)]] | list of tuples containing a shape's id, rgb value, and a tuple of row and column points |
Source code in lavlab/omero/rois.py
40 41 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 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | |