An Outline has contains the polygon describing the outline and an image associated with the outline.
retistruct::OutlineCommon -> Outline
PA N-by-2 matrix of points of the Outline
arranged in anticlockwise order
scaleThe length of one unit of P in arbitrary units
unitsString giving units of scaled P, e.g. “um”
gfFor each row of P, the index of P that
is next in the outline travelling anticlockwise (forwards)
gbFor each row of P, the index of P that
is next in the outline travelling clockwise (backwards)
hFor each row of P, the correspondence of that
point (which will be to itself initially)
imAn image as a raster object
new()Construct an outline object. This sanitises the
input points P.
Outline$new(P = NULL, scale = NA, im = NULL, units = NA)
PAn N-by-2 matrix of points of the Outline
scaleThe length of one unit of P in arbitrary units
imThe image as a raster object
unitsString giving units of scaled P, e.g. “um”
getImage()Image accessor
Outline$getImage()
An image as a raster object
replaceImage()Image setter
Outline$replaceImage(im)
imAn image as a raster object
mapFragment()Map the point IDs of a Fragment on the point IDs of this Outline
Outline$mapFragment(fragment, pids)
fragmentFragment to map
pidsPoint IDs in Outline of points in Fragment
mapPids()Map references to points
Outline$mapPids(x, y, pids)
xReferences to point indices in source
yReferences to existing point indices in target
pidsIDs of points in point register
New references to point indices in target
addPoints()Add points to the outline register of points
Outline$addPoints(P)
P2 column matrix of points to add
The ID of each added point in the register. If points already exist a point will not be created in the register, but an ID will be returned
getPoints()Get unscaled mesh points
Outline$getPoints()
Matrix with columns X and Y
getPointsScaled()Get scaled mesh points
Outline$getPointsScaled()
Matrix with columns X and Y which is
exactly scale times the matrix returned by getPoints
getRimSet()Get set of points on rim
Outline$getRimSet()
Vector of point IDs, i.e. indices of the rows in
the matrices returned by getPoints and
getPointsScaled
getOutlineSet()Get points on the edge of the outline
Outline$getOutlineSet()
Vector of points IDs on outline
getOutlineLengths()Get lengths of edges of the outline
Outline$getOutlineLengths()
Vector of lengths of edges connecting neighbouring points
addFeatureSet()Add a FeatureSet, e.g. a PointSet or LandmarkSet
Outline$addFeatureSet(fs)
fsFeatureSet to add
clone()The objects of this class are cloneable with this method.
Outline$clone(deep = FALSE)
deepWhether to make a deep clone.