Skip to contents

Calculate a set of shape metrics of a set of polygons

Usage

totalShapeMetrics(sfInput)

Arguments

sfInput

MULTIPOLYGON of class sf

Value

matrix; matrix of shape metrics

Details

Calculate a set of shape metrics of a set of polygons. The function calculates all metrics that are implemented in the function shapeMetrics()

Examples

spe <- imcdatasets::Damond_2019_Pancreas("spe", full_dataset = FALSE)
#> see ?imcdatasets and browseVignettes('imcdatasets') for documentation
#> loading from cache
islet_poly <- reconstructShapeDensityImage(spe,
    marks = "cell_category",
    image_col = "image_name", image_id = "E04", mark_select = "islet", dim = 500
)
totalShapeMetrics(islet_poly)
#>               islet_poly1  islet_poly2  islet_poly3 islet_poly4
#> Area         7082.8795517 6340.0362029 2.516882e+04 380.6950145
#> Compactness     1.8616047    1.8255160 2.004980e+00   1.7270356
#> Eccentricity    0.6306815    0.6698200 6.259738e-01   0.8399975
#> Circularity     0.8704870    0.8729335 8.453156e-01   0.9024481
#> Solidity        0.9805405    0.9641505 9.524408e-01   0.9431681
#> Curl            0.2265576    0.2558640 2.791609e-01   0.2813982
#> fibreLength   158.9740482  147.7826322 3.193511e+02  34.3723053
#> fibreWidth     44.5536843   42.9010914 7.881239e+01  11.0756323