glszm: Gray level size zone matrix.

Description Usage Arguments Details Value References Examples

View source: R/GLSZM.R

Description

glszm returns a gray level size zone matrix for a given matrix.

Usage

1
glszm(data, n_grey = 32, truncate = TRUE, ...)

Arguments

data

A numeric 2D matrix.

n_grey

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

truncate

Logical. Remove values for sizes that have no entries

...

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

Details

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

Value

a matrix of dimension n_grey by region size, the GLSZM. The column names represent the region size, row names represent grey level, and the entries represent the count of how many times a given size of given grey level occur.

References

http://thibault.biz/Research/ThibaultMatrices/GLSZM/GLSZM.html

Examples

1
2
3
4
5
6
7
8
## Not run: 
image(psf)
glszm(psf)

image(discretizeImage(psf, n_grey=5, verbose=F))
glszm(psf, n_grey=5, verbose=F) 

## End(Not run)

Example output

radiomics: Functions for texture analysis of greyscale images.
Enter ?calc_features to see available texture features.
An object of class "glszm"
    1 2 3 4 5 6 7 8 10 11 12 17 21 24 25 39 104 108 109 112 116 120 124
1   0 0 0 0 0 0 0 0  0  0  0  0  0  0  0  0   0   0   0   0   0   1   0
2   0 0 0 0 0 0 0 0  0  0  0  0  0  0  0  0   0   0   0   0   0   1   0
3   0 0 0 0 0 0 0 0  0  0  0  0  0  0  0  0   0   0   0   0   0   1   0
4   0 0 0 0 0 0 0 0  0  0  0  0  0  0  0  0   0   1   0   0   0   0   0
5   0 0 0 0 0 0 0 0  0  0  0  0  0  0  0  0   0   0   0   0   0   0   1
6   0 0 0 0 0 0 0 0  0  0  0  0  0  0  0  0   0   0   0   0   0   0   1
7   0 0 0 0 0 0 0 0  0  0  0  0  0  0  0  0   1   0   0   0   0   0   0
8   0 0 0 0 0 0 0 0  0  0  0  0  0  0  0  0   0   0   0   0   1   0   0
9   0 0 0 0 0 0 0 0  0  0  0  0  0  0  0  0   0   0   0   0   1   0   0
10  0 0 0 0 0 0 0 0  0  0  0  0  0  0  0  0   0   0   0   0   0   0   1
11  0 0 0 0 0 0 0 0  0  0  0  0  0  0  0  0   0   0   0   1   0   0   0
12  0 0 0 0 0 0 0 0  2  0  0  3  0  0  0  1   0   0   0   0   0   0   0
13  0 0 0 0 0 0 0 0  0  0  0  0  1  0  0  0   0   0   1   0   0   0   0
14  0 0 0 0 0 0 0 4  0  0  0  0  0  4  0  0   0   0   0   0   0   0   0
15  0 0 0 0 0 4 0 0  0  0  0  0  0  0  4  0   0   0   0   0   0   0   0
16  0 0 0 8 8 4 0 0  0  0  0  0  0  0  0  0   0   0   0   0   0   0   0
17  8 8 0 0 0 0 0 0  0  4  4  0  0  0  0  0   0   0   0   0   0   0   0
18  0 0 0 0 0 0 0 0  0  0  0  0  0  4  0  0   0   0   0   0   0   0   0
19  0 0 0 0 8 0 4 0  0  0  0  0  0  0  0  0   0   0   0   0   0   0   0
20  8 0 0 0 0 0 0 0  0  0  4  0  0  0  0  0   0   0   0   0   0   0   0
21  0 0 8 0 0 0 4 0  0  0  0  0  0  0  0  0   0   0   0   0   0   0   0
22  0 0 0 0 0 0 0 0  0  0  4  0  0  0  0  0   0   0   0   0   0   0   0
23  8 0 0 0 0 0 4 0  0  0  0  0  0  0  0  0   0   0   0   0   0   0   0
24  8 0 0 0 0 4 0 0  0  0  0  0  0  0  0  0   0   0   0   0   0   0   0
25  8 0 0 0 4 0 0 0  0  0  0  0  0  0  0  0   0   0   0   0   0   0   0
26  8 0 0 4 0 0 0 0  0  0  0  0  0  0  0  0   0   0   0   0   0   0   0
27 12 0 0 0 0 0 0 0  0  0  0  0  0  0  0  0   0   0   0   0   0   0   0
28  0 8 0 0 0 0 0 0  0  0  0  0  0  0  0  0   0   0   0   0   0   0   0
29  0 0 0 4 0 0 0 0  0  0  0  0  0  0  0  0   0   0   0   0   0   0   0
30  0 0 4 0 0 0 0 0  0  0  0  0  0  0  0  0   0   0   0   0   0   0   0
31  0 4 0 0 0 0 0 0  0  0  0  0  0  0  0  0   0   0   0   0   0   0   0
32  4 0 0 0 0 0 0 0  0  0  0  0  0  0  0  0   0   0   0   0   0   0   0
An object of class "glszm"
  21 63 656 740 768
1  0  0   0   1   0
2  0  0   0   0   1
3  0  0   1   0   0
4  0  4   0   0   0
5  4  0   0   0   0

radiomics documentation built on May 2, 2019, 3:36 p.m.