segmentWells {imageHTS} | R Documentation

## Segment cells in well images

### Description

Segment cells in well images.

### Usage

    segmentWells(x, uname, segmentationPar, access='cache', writeData=TRUE)

### Arguments

`x` | An imageHTS object.
`uname` | A character vector, containing the well names to segment. See `getUnames` for details.
`segmentationPar` | A character string, indicating the filename containing the segmentation parameters.
`access` | A character string indicating how to access the data. Valid values are `local`, `server` and `cache`, the default. See `fileHTS` for details.
`writeData` | A boolean indicating whether the segmentation data should be written to the project directory. Default is `TRUE`.

### Details

`segmentWells` reads the DCF segmentation parameters file pointed by `segmentationPar`. The file must contain the core segmentation function name indicated in the `seg.method` field. For each well indicated by `uname`, `segmentWells` calls the core segmentation function which returns a list containing a list of three `EBImage` images: `cal`, the calibrated image; `nseg`, the nucleus mask and `cseg`, the cell mask. See `segmentATH` for an example of a core segmentation function.

If `writeData` is `TRUE`, `segmentWells` writes for each well indicated by `uname`: the calibrated image data `cal`, the segmentation data `seg`, a calibrated JPEG image `viewfull`, untiled JPEG images `viewunmonted`, a calibrated JPEG image with segmentation annotation `viewseg`, a thumbnail JPEG image `viewthumb` and Javascript segmentation contour information `contour`. See `fileHTS` for details about these files.

### Value

If `uname` is of length 1, returns an invisible list containing: `cal`, the calibrated image; `nseg`, the nucleus mask and `cseg`, the cell mask.

### Author(s)

Gregoire Pau, gregoire.pau@embl.de, 2010

### See Also

`segmentATH`, `getUnames`, `fileHTS`

### Examples

    ## initialize imageHTS object using the local submorph screen
    local = tempdir()
    server = system.file('submorph', package='imageHTS')
    x = parseImageConf('conf/imageconf.txt', localPath=local, serverURL=server)
    x = configure(x, 'conf/description.txt', 'conf/plateconf.txt', 'conf/screenlog.txt')

    ## segment one well
    uname = getUnames(x, content='rluc')[1]
    z = segmentWells(x, uname=uname, segmentationPar='conf/segmentationpar.txt', writeData=FALSE)
    if (interactive()) {
      seg = highlightSegmentation(z$cal, z$nseg, z$cseg)
      display(seg)
    }

[Package imageHTS version 1.30.0 Index]