create_movie: Create movie

Description Usage Arguments Details Prerequisites See Also

Description

Creates the movie of the segmented cells.

Usage

1
2
create_movie(overallLT, LT, cell_list, col_list, frameH, frameW, Ncols,
  attrC = "", unitC = "", NC = NULL, savePath = getwd())

Arguments

overallLT

The lineage tree the cells of which will be visualized in the created movie, an object of class "igraph". Cells that do not belong to the LT are colored white.

For visualizing all cells extracted from the analysis of the movie, use the tree returned from unite_trees when called for all parts of the overall FLT (main part and possible motherless branches).

LT

The lineage tree the cells of which will be colored in the created movie, an object of class "igraph". This tree must be a subtree of the overallLT regarding the included cells in the analysis.

cell_list

A list containing all the cell instants of the movie.

col_list

A list containing all the colony instants of the movie.

frameH

Frame image height in pixels, a non-zero positive integer value.

frameW

Frame image width in pixels, a non-zero positive integer value.

Ncols

Number of colonies in the movie, a non-zero positive integer value.

attrC

The name of the attribute in the LT by which the cells will be colored, a character string. It can be any numeric or boolean attribute, as returned from get_attr_names. Coloring is applied to all non-root cells of the LT, as returned from get_cells, except for cells with NA value in this attribute which are colored gray. When the default value "" (the empty character) is used, all cells of the LT are colored gray. Cells that belong to the overallLT but not to the LT are always colored white.

unitC

The unit of attrC, a character string. It should be in the format "<string>,<number>", where ",<number>" represents the power and is optional (e.g. "m" for meters and "cm,3" for cubic centimeters). The default value is the empty character "", which implies that attrC is in arbitrary units. This argument is ignored in case attrC = "".

NC

Number of colonies in the movie (if attrC = "colony") or number of generations in the movie (if attrC = "generation"), a non-zero positive integer value. This argument is ignored in case attrC != "colony" and attrC != "generation".

savePath

A character string naming the absolute path of the directory where the generated .png files will be saved (excluding the last "/"). The default value is the current working directory getwd(). Image files are named as "frame_<i>.png", where "<i>" is the frame ID. The movie file is named as "movie.mp4". All files will be saved in folder "<attrC>" (or "noColor" in case attrC = ""), created under the specified directory.

NOTE: The components should be separated by "/") on Windows.

Details

A separate image for each frame existing in the overallLT is generated.

Prerequisites

This function can be used by BaSCA users, importing the data with import_basca.

Users of Oufti or SuperSegger who imported the data with import_oufti or import_ss, respectively, are excluded from using this function, as no colony list was returned.

If import_json was used for importing the data, it is necessary that cell list elements have the pixelList and colId components and colony list elements have the ULcorner component. See import_json for more details. In other case, this function cannot be used (throws an error).

FFmpeg is required in the system in order to automatically convert the series of the generated .png files to an .mp4 file, at 5 fps (frames per second). Image files for more than two consequtive frames starting from frame 1 must have been generated.

See Also

isSubtree for checking if a tree is a subtree of another tree.


vicstefanou/ViSCA documentation built on May 31, 2019, 10:50 p.m.