omero.util.roi_handling_utils module

Utility methods for manipulating roi.

util.roi_handling_utils.get_line_data(pixels, x1, y1, x2, y2, line_w=2, the_z=0, the_c=0, the_t=0)[source]

Grabs pixel data covering the specified line, and rotates it horizontally so that x1,y1 is to the left, Returning a numpy 2d array. Used by Kymograph.py script. Uses PIL to handle rotating and interpolating the data. Converts to numpy to PIL and back (may change dtype.)

@param pixels: PixelsWrapper object @param x1, y1, x2, y2: Coordinates of line @param line_w: Width of the line we want @param the_z: Z index within pixels @param the_c: Channel index @param the_t: Time index

util.roi_handling_utils.points_string_to_xy_list(string)[source]

Method for converting the string returned from omero.model.ShapeI.getPoints() into list of (x,y) points (floats) e.g. “points[309,427, 366,503, 190,491]”