An Outline has contains the polygon describing the outline and an image associated with the outline.
David Sterratt
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 the X-Y plane in arbitrary units
scalezThe length of one unit of P in the Z-direction 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 cut of that
point (which will be to itself initially)
imAn image as a raster object
dmDepthmap, with same dimensions as im, which indicates
height of each pixel in Z-direction
A.fragmentsAreas of fragments
dm.inferna.window.minMinimum window size (in pixels) for inferring missing values in depthmaps
dm.inferna.window.maxMinimum window size (in pixels) for inferring missing values in depthmaps
new()Construct an outline object. This sanitises the
input points P.
Outline$new(
fragments = list(),
scale = NA,
im = NULL,
scalez = NA,
dm = NULL,
units = NA
)fragmentsA list of N-by-2 matrix of points for each fragment of the Outline
scaleThe length of one unit of P in arbitrary units
imThe image as a raster object
scalezThe length of one unit of P in the Z-direction in arbitrary units. If NA, the depthmap is ignored.
dmDepthmap, with same dimensions as im, which indicates
height of each pixel in Z-direction
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
getDepth()Get depth of points P
Outline$getDepth(P)Pmatrix containing unscaled X-Y coordinates of points
Vector of unscaled Z coordinates of points P
addPoints()Add points to the outline register of points
Outline$addPoints(P, fid)P2 or 3 column matrix of points to add
fidID of fragment to which to add the points
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
getFragmentPointIDs()Get the point IDs in a fragment
Outline$getFragmentPointIDs(fid)fidfragment id of the points
Vector of point IDs, i.e. indices of the rows in
the matrices returned by getPoints and
getPointsScaled
getFragmentPoints()Get the points in a fragment
Outline$getFragmentPoints(fid)fidfragment id of the points
Vector of points
getFragment()Get fragment
Outline$getFragment(fid)fidFragment ID
The Fragment object with ID fid
getFragmentIDsFromPointIDs()Get fragment IDs from point IDS
Outline$getFragmentIDsFromPointIDs(pids)pidsVector of point IDs
The Fragment ID to which each point belongs
getFragmentIDs()Get fragment IDs
Outline$getFragmentIDs()IDs of all fragments
getPoints()Get unscaled mesh points
Outline$getPoints(pids = NULL)pidsIDs of point to return
Matrix with columns X, Y and Z
getPointsXY()Get X-Y coordinates of unscaled mesh points
Outline$getPointsXY(pids = NULL)pidsIDs of point to return
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.