cmtk.statistics {nat}R Documentation

Calculate image statistics for a nrrd or other CMTK compatible file

Description

Calculate image statistics for a nrrd or other CMTK compatible file

Usage

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

## Not run: 
cmtk.statistics('someneuron.nrrd', mask='neuropilregionmask.nrrd')
cmtk.statistics('somelabelfield.nrrd', imagetype='label')

## End(Not run)

[Package nat version 1.8.24 Index]