Learn R Programming

radiomics (version 0.1.3)

calc_features: Calculate texture and first order statistics.

Description

calc_features Calculates features of given texture matrix. If a simple matrix is given, will calculate first order features. If desired, user may input the features they wish to calculate for a given matrix type by passing them as a vector of strings to the features argument.

Usage

calc_features(object, features = c())

# S4 method for matrix calc_features(object, features = c())

# S4 method for glcm calc_features(object, features = c())

# S4 method for glrlm calc_features(object, features = c())

# S4 method for glszm calc_features(object, features = c())

# S4 method for mglszm calc_features(object, features = c())

Arguments

object

An object of class "matrix", "glcm", "glrlm", "glszm", or "mglszm"

features

A vector containing the features the user wishes to calculate for a given matrix type.

Value

A data frame with a single observation. The columns of the dataframe correspond to the calculated features.

Methods (by class)

  • matrix: Calculate first order features of a numeric matrix

  • glcm: Calculate texture features of a glcm matrix

  • glrlm: Calculate texture features of a glrlm matrix

  • glszm: Calculate texture features of a glszm matrix

  • mglszm: Calculate texture features of an mglszm matrix

Details

Lists of features available for each matrix type can be accessed through ?first_order_features ?glcm_features, ?glrlm_features, ?glszm_features.

Matrices of class mglszm accept features belonging to the glszm.

References

http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0102107

See Also

glcm glrlm glszm mglszm

Examples

Run this code
# NOT RUN {
calc_features(glcm(hallbey))
calc_features(glrlm(psf, n_grey=10))
calc_features(glcm(hallbey), features=c("glcm_mean", "glcm_variance", "pickles"))
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab