Last data update: 2014.03.03

R: Add object contours to a 'Frames' object
add.contoursR Documentation

Add object contours to a Frames object

Description

Creates a Frames object containing raw information, combined with the segmented images and the relative trajectory under analysis

Usage

add.contours(raw.frames, binary.frames = NULL, trajectoryset = NULL,
  trajIDs = NULL, mode = "particles", col = NULL, channel = NULL)

Arguments

raw.frames

A Frames object with raw images

binary.frames

A Frames object with preprocessed frames

trajectoryset

A TrajectorySet object

trajIDs

Numeric vector, the ID(s) of the trajectory.

mode

A character string, can assume the values particles or trajectories. Defaults to particles

col

A vector of color strings

channel

A character string, to select which channel to process

Details

If a TrajectorySet is provided and mode is set to trajectories, returns a Frames with all trajectories included in the IDs vector painted accordingly. If the mode is set to particles, it will just plot the particles (all) on all frames. If no TrajectorySet is provided, it will be computed with default parameters. If no binary.frames is provided, it will be computed also with default parameters

Value

A new Frames object with contours of the objects added

Author(s)

Federico Marini, marinif@uni-mainz.de, 2014

Examples

data("MesenteriumSubset")
## Not run: 
paintedTrajectories <- add.contours(raw.frames = MesenteriumSubset, mode = "trajectories",channel="red")
paintedParticles <- add.contours(raw.frames = MesenteriumSubset, mode = "particles",channel="red")
inspect.Frames(paintedTrajectories)
inspect.Frames(paintedParticles)

## End(Not run)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(flowcatchR)
Loading required package: EBImage
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/flowcatchR/add.contours.Rd_%03d_medium.png", width=480, height=480)
> ### Name: add.contours
> ### Title: Add object contours to a 'Frames' object
> ### Aliases: add.contours
> 
> ### ** Examples
> 
> data("MesenteriumSubset")
> ## Not run: 
> ##D paintedTrajectories <- add.contours(raw.frames = MesenteriumSubset, mode = "trajectories",channel="red")
> ##D paintedParticles <- add.contours(raw.frames = MesenteriumSubset, mode = "particles",channel="red")
> ##D inspect.Frames(paintedTrajectories)
> ##D inspect.Frames(paintedParticles)
> ## End(Not run)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>