cellmovie

Syntax:

cellmovie(cellList,images,cell)

cellmovie(cellList,images,cell,firstfilename,...)

cellmovie(cellList,images,cell,fieldname,...)

cellmovie(cellList,images,cell,'circle',...)

cellmovie(cellList,images,cell,'disk',...)

cellmovie(cellList,images,cell,...,parametername,parametervalue,...)

This function displays or saves a movie or a series of images of one cell through a range of frames in a timelapse series of images.

  • <cellList> is an array that contains the meshes and spots. This function can use either a cellList array generated by the SpotFinderZ, SpotFinderM and peakfinder functions, or a spotList array generated by the SpotFinderF function. You can drag-and-drop the file with the data into MATLAB workspace or open it using the MATLAB Import Tool.
  • <images> - a 3D array of images. It can be obtained using loadimageseries and loadimagestack commands, e.g.: images=loadimageseries('c:\users\test\imagefiles',1).
  • <cell> - the cell number of the cell to display.
  • <firstfilename> - the name of the first file which will be saved. If left empty (default), no file will be saved and the images will be only displayed on the screen. Otherwise the name will be taken, and if it ends with a number, the number will be incremented according to the number of the image displayed. If it does not end with a number, it will be appended automatically. The file name must end with .avi, .jpg, .eps, or .tif extension to specify the format of the file.
  • <fieldnames> - names of the fields containing spots, must start with 'spots', e.g. 'spots', 'spots1', 'spots2', etc. Several fields can be listed. Default: 'spots'. To not display spots, put a non-existent field name, e.g. 'spotsx'.
  • 'disk' - display spots as filled disks rather than dots. The radius in this case is measured in image pixels, not screen points.
  • 'circle' - display spots as circles rather than dots. The radius in this case is measured in image pixels, not screen points.

The rest of the parameters must be submitted in the format <parametername>,<parametervalue>, where <parametername> must be in quotes and <parametervalue> must be the value of this parameter. For example: cellmovie(cellList,images,cell,'resolution',300). Here are the possible parameters:

  • 'resolution' - image resolution in dots per inch, default 150.
  • 'magnification' - image magnification factor, default 5.
  • 'barlength' - length of a scale bar added, default 0 (no bar).
  • 'barpos' - position of the scalebar added from bottom left (set negative to go from top or right), default [2 2].
  • 'barwidth' - width of the scalebar added, default 2.
  • 'timestamp' - should the timestamp be added, default false.
  • 'timeinterval' - length of the time interval for the timestamp, default 1.
  • 'timestamppos' - position of the timestamp, default [] (program picks).
  • 'timestampfont' - font of the timestamp, default 14.
  • 'align' - should alignment to the center of mass be done, default true.
  • 'border' - border left around the cell, default 20.
  • 'markersize' - spots marker size, 0 - don't show, default automatic.
  • 'imagelimits' - image scaling limits, default max to min.
  • 'frange' - range (list) of frames to output, default all frames.
  • 'colortable' - table nx3 of colors each line being RGB of the particular field; if n># fields, last line represents the color of merged spots.
  • 'infocolor' - color of the timestamp and scalebar.

Examples

Simplest mode: display a movie of cell 5 through all frames not saving anything:

   cellmovie(cellList, images, 5)

Display the same cell on frames from 1 to 30:

   cellmovie(cellList, images, 5, 'frange', 1:30)

Display the same cell changing the default border to zero:

   cellmovie(cellList, images, 5, 'border', 0)

Save the movie of this cell as a series of jpeg files out1.jpg, out2.jpg, out3.jpg, etc.:

   cellmovie(cellList, images, 5, 'out.jpg')

Display the same cell with a timestamp (assuming the frame rate 1 unit s/frame) and a scalebar (1 um long assuming 1 pixel=0.0642 um):

   cellmovie(cellList, images, 5, 'barlength', 1/0.0642, 'timestamp', true)

Combination of many parameters: save a series of jpeg images for frames 1-30 displaying a scalebar and a timestamp in yellow color, changing the position of the timestamp and not displaying spots:

   cellmovie(cellList, images, 5, 'frange', 1:30, 'border', 0, 'out.jpg', 'barlength', 1/0.0642, 'timestamp',true,'timestamppos',[16 -0.1],'infocolor',[1 1 0],'circle','spotsx')