segmentImage: Generate segmented images of cellular structures

Description Usage Arguments Details Value References Examples

View source: R/segmentImage.R

Description

The following function uses several functions from EBImage to perform image segmentation with the provided frame numbers of cell and nuclei channels.

Usage

1
2
3
4
5
6
segmentImage(
  img,
  cell_frame,
  nuc_frame,
  show_structure = c("cell", "nuclei", "both")
)

Arguments

img

An object of Image class specific to EBImage, stored as multi- dimensional arrays containing the pixel intensities.

cell_frame

A numeric value indicating the frame in the composite image that contains stained cell (fiber)

nuc_frame

A numeric value indicating the frame in the composite image that contains stained nuclei

show_structure

A character vector specifying which segmented structure to show. Can be cell, nuclei, or both (segmented nuclei overlaying segmented cells). Default is both.

Details

Segmentation of individual image channels is often useful when it is difficult to distinguish structures by eye. (e.g. Visualizing segmentation helps users locate nuclei within a mesh of muscle fibers)

Value

Returns an Image containing the segmented structure(s) outlined.

References

Gregoire Pau, Florian Fuchs, Oleg Sklyar, Michael Boutros, and Wolfgang Huber (2010): EBImage - an R package for image processing with applications to cellular phenotypes. Bioinformatics, 26(7), pp. 979-981, link https://bioconductor.org/packages/release/bioc/html/EBImage.html

Carpenter, A.E., Jones, T.R., Lamprecht, M.R. et al. (2006) CellProfiler: image analysis software for identifying and quantifying cell phenotypes. Genome Biol R100:7. link CellProfiler software: http://www.cellprofiler.org

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# Example 1
rabbit <- loadImage(system.file('extdata/Rabbit_01.tif', package = 'MyoManager'))
# view image in Grayscale to find out which Frame stores cell body / nuclei
viewImage(rabbit, 0)
segmented_nuc <- segmentImage(rabbit, 1, 3, 'nuclei')
# only nuclei segmentation is generated
viewImage(segmented_nuc)


# Example 2
mouse <- loadImage(system.file('extdata/Mouse_01.tiff', package = 'MyoManager'))
viewImage(mouse, 0)
segmented_nuc <- segmentImage(mouse, 2, 3)
# cell segmentation with highlighted nuclei is generated
viewImage(segmented_nuc)

karenkuang37/MyoManager documentation built on Dec. 21, 2021, 5:18 a.m.