Convex hull, minimal bounding rotated rectangle, and minimal bounding circle
Source:R/methods-convHull.R
convHull.Rd
Get the convex hull, the minimal bounding rotated rectangle, or minimal bounding circle of a Giotto spatial object or terra SpatVector
Usage
# S4 method for class 'spatLocsObj'
convHull(x, by = "", ...)
# S4 method for class 'giottoSpatial'
convHull(x, by = "", ...)
# S4 method for class 'spatLocsObj'
minRect(x, by = "", ...)
# S4 method for class 'giottoSpatial'
minRect(x, by = "", ...)
# S4 method for class 'spatLocsObj'
minCircle(x, by = "", ...)
# S4 method for class 'giottoSpatial'
minCircle(x, by = "", ...)
Examples
sl <- GiottoData::loadSubObjectMini("spatLocsObj")
gpoints <- GiottoData::loadSubObjectMini("giottoPoints")
h <- convHull(sl)
plot(h)
r <- minRect(sl)
plot(r)
circ <- minCircle(gpoints, by = "feat_ID")
plot(circ, border = rainbow(100))