Analysis scripts

Kymograph

The Kymograph script uses Lines or Polylines drawn on a source timelapse image to create new kmograph images.

This script processes Images, with Line or PolyLine ROIs to create kymographs.

Kymographs are created in the form of new OMERO Images, single Z and T, same sizeC as input.

Kymograph.get_line_data(image, x1, y1, x2, y2, line_w=2, the_z=0, the_c=0, the_t=0)

Grab pixel data covering the specified line, and rotates it horizontally.

Uses current rendering settings and returns 8-bit data. Rotates it 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

Kymograph.lines_kymograph(conn, script_params, image, lines, line_width, dataset)

Create a new kymograph Image from one or more lines.

If one line, use this for every time point. If multiple lines, use the first one for length and all the remaining ones for x1,y1 and direction, making all subsequent lines the same length as the first.

Kymograph.polyline_kymograph(conn, script_params, image, polylines, line_width, dataset)

Create a new kymograph Image from one or more polylines.

@param polylines: map of theT: {theZ:theZ, points: list of (x,y)}

Kymograph.process_images(conn, script_params)

Process each image passed to script, generating new Kymograph images.

Kymograph.run_script()

The main entry point of the script, as called by the client.

Called via the scripting service, passing the required parameters.

Kymograph Analysis

The Kymograph Analysis script uses can analyse the tracks from a Kymograph image to caculate the velocity of objects. It uses Lines or Polylines manually drawn on to the Kymograph image, and creates a csv table output.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.


This script is the second Kymograph script, for analyzing lines drawn on kymograph images that have been created by the ‘Kymograph.py’ Script.

@author Will Moore <a href=”mailto:will@lifesci.dundee.ac.uk”>will@lifesci.dundee.ac.uk</a> @since 3.0

Kymograph_Analysis.run_script()

The main entry point of the script, as called by the client via the scripting service, passing the required parameters.

Plot Profile

The Plot Profile script measures the intensity along Lines drawn on an image.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.


This script processes Images which have Line or PolyLine ROIs, saving the intensity of chosen channels to Excel (csv) files.

@author Will Moore <a href=”mailto:will@lifesci.dundee.ac.uk”>will@lifesci.dundee.ac.uk</a> @since 3.0

Plot_Profile.process_lines(conn, script_params, image, lines, line_width, fout)

Creates a new kymograph Image from one or more lines. If one line, use this for every time point. If multiple lines, use the first one for length and all the remaining ones for x1,y1 and direction, making all subsequent lines the same length as the first.

Plot_Profile.process_polylines(conn, script_params, image, polylines, line_width, fout)

Output data from one or more polylines on an image. Attach csv to image.

@param polylines list of theT:T, theZ:Z, points: list of (x,y)}

Plot_Profile.run_script()

The main entry point of the script, as called by the client via the scripting service, passing the required parameters.