countObjects {imageHTS} | R Documentation

## Count the number of objects in a segmented image

### Description

Count the number of objects in a segmented image.

### Usage

    countObjects(cseg)

### Arguments

`cseg` | An image containing the objects.

### Value

An integer indicating the number of objects in the cell mask.

### Author(s)

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

### See Also

`segmentWells`

### 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)
    n = countObjects(z$cseg)
    cat('number of cells=', n, '\n')

[Package imageHTS version 1.30.0 Index]