Learn R Programming

radiomics (version 0.1.3)

glrlm: Gray level run length matrix.

Description

glrlm returns a gray level run length matrix for a given matrix.

Usage

glrlm(data, angle = 0, n_grey = 32, max_run_length = min(dim(data)),
  truncate = TRUE, ...)

Arguments

data

A numeric 2D matrix.

angle

One of 0, 45, 90 or 135, the direction the run is calculated.

n_grey

an integer value, the number of grey levels the image should be quantized into.

max_run_length

An integer value, the default is the maximum possible run length. Setting it to a smaller value truncates the output. Desirable in cases where the matrix is extremely sparse, for example when there are few long runs.

truncate

Logical Remove run lengths which have no entries

...

Can be given verbose=FALSE to suppress output from the n_grey conversion.

Value

a matrix of class "glrlm" of dimension n_grey by run length. The column names represent the length of the run, and row names represent grey values in the image.

Details

Can be visualized using image(glrlm(data)). For visualization info see ?image.radiomics

References

http://www.sciencedirect.com/science/article/pii/S0146664X75800086

Examples

Run this code
# NOT RUN {
hallbey
glrlm(hallbey)
glrlm(hallbey, angle="90") 
# }

Run the code above in your browser using DataLab