An Outline has contains the polygon describing the outline and an image associated with the outline.
retistruct::OutlineCommon
-> Outline
P
A N-by-2 matrix of points of the Outline
arranged in anticlockwise order
scale
The length of one unit of P
in arbitrary units
units
String giving units of scaled P, e.g. “um”
gf
For each row of P
, the index of P
that
is next in the outline travelling anticlockwise (forwards)
gb
For each row of P
, the index of P
that
is next in the outline travelling clockwise (backwards)
h
For each row of P
, the correspondence of that
point (which will be to itself initially)
im
An 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)
P
An N-by-2 matrix of points of the Outline
scale
The length of one unit of P
in arbitrary units
im
The image as a raster
object
units
String 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)
im
An image as a raster
object
mapFragment()
Map the point IDs of a Fragment on the point IDs of this Outline
Outline$mapFragment(fragment, pids)
fragment
Fragment to map
pids
Point IDs in Outline of points in Fragment
mapPids()
Map references to points
Outline$mapPids(x, y, pids)
x
References to point indices in source
y
References to existing point indices in target
pids
IDs of points in point register
New references to point indices in target
addPoints()
Add points to the outline register of points
Outline$addPoints(P)
P
2 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)
fs
FeatureSet to add
clone()
The objects of this class are cloneable with this method.
Outline$clone(deep = FALSE)
deep
Whether to make a deep clone.