cmtk.statistics: Calculate image statistics for a nrrd or other CMTK...

Description Usage Arguments Details Value Examples

View source: R/cmtk-reformat.R

Description

Calculate image statistics for a nrrd or other CMTK compatible file

Usage

1
2
cmtk.statistics(f, mask, imagetype = c("greyscale", "label"),
  masktype = c("label", "binary"), ..., Verbose = FALSE)

Arguments

f

Path to image file (any CMTK compatible format)

mask

Optional path to a mask file

imagetype

Whether image should be treated as greyscale (default) or label field.

masktype

Whether mask should be treated as label field or binary mask (default label)

...

Additional arguments for ctmk's statistics tool processed by cmtk.call.

Verbose

Whether to show cmtk status messages and be verbose about file update checks. Sets command line --verbose option.

Details

When given a label mask, returns a dataframe with a row for each level of the label field.

Note that the Entropy column (sometimes H, sometimes Entropy) will always be named Entropy in the returned dataframe.

Value

data.frame describing results with the following columns when image f is of imagetype='greyscale' (optionally with a mask):

When image f is of imagetype='label', the following results are returned:

Examples

1
2
3
4
5
## Not run: 
cmtk.statistics('someneuron.nrrd', mask='neuropilregionmask.nrrd')
cmtk.statistics('somelabelfield.nrrd', imagetype='label')

## End(Not run)

jefferis/nat documentation built on Sept. 29, 2018, 5:22 p.m.