An AnnotatedOutline contains a function to annotate tears on the outline.
AnnotatedOutline object, with extra fields for tears
latitude of rim phi0 and index of fixed point i0.
David Sterratt
retistruct::OutlineCommon -> retistruct::Outline -> retistruct::PathOutline -> AnnotatedOutline
tearsMatrix in which each row represents a cut by the
indices into the outline points of the apex (V0) and
backward (VB) and forward (VF) points
fullcutsMatrix in which each row represents a cut by the
indices into the outline points of the apex (V0) and
backward (VB) and forward (VF) points
phi0rim angle in radians
lambda0longitude of fixed point
i0index of fixed point
Inherited methods
retistruct::OutlineCommon$clearFeatureSets()retistruct::OutlineCommon$getFeatureSet()retistruct::OutlineCommon$getFeatureSetTypes()retistruct::OutlineCommon$getFeatureSets()retistruct::OutlineCommon$getIDs()retistruct::Outline$addFeatureSet()retistruct::Outline$getDepth()retistruct::Outline$getFragment()retistruct::Outline$getFragmentIDs()retistruct::Outline$getFragmentIDsFromPointIDs()retistruct::Outline$getFragmentPointIDs()retistruct::Outline$getFragmentPoints()retistruct::Outline$getImage()retistruct::Outline$getOutlineLengths()retistruct::Outline$getOutlineSet()retistruct::Outline$getPoints()retistruct::Outline$getPointsScaled()retistruct::Outline$getPointsXY()retistruct::Outline$mapFragment()retistruct::Outline$mapPids()retistruct::Outline$replaceImage()retistruct::PathOutline$insertPoint()retistruct::PathOutline$nextPoint()retistruct::PathOutline$stitchSubpaths()
new()Constructor
AnnotatedOutline$new(...)...Parameters to PathOutline
labelTearPoints()Label a set of three unlabelled points supposed
to refer to the apex and vertices of a tear with the V0
(Apex), VF (forward vertex) and VB (backward vertex) labels.
AnnotatedOutline$labelTearPoints(pids)pidsthe vector of three indices
Vector of indices labelled with V0, VF and VB
whichTear()Return index of tear in an AnnotatedOutline in which a point appears
AnnotatedOutline$whichTear(pid)pidID of point
ID of tear
getTear()Return indices of tear in AnnotatedOutline
AnnotatedOutline$getTear(tid)tidTear ID, which can be returned from whichTear()
Vector of three point IDs, labelled with V0,
VF and VB
getTears()Get tears
AnnotatedOutline$getTears()Matrix of tears
computeTearRelationships()Compute the parent relationships for a potential set of tears. The function throws an error if tears overlap.
AnnotatedOutline$computeTearRelationships(tears = NULL)tearsMatrix containing columns V0 (Apices of tears)
VB (Backward vertices of tears) and VF (Forward
vertices of tears)
List containing
Rsetthe set of points on the rim
TFsetlist containing indices of points in each forward tear
TBsetlist containing indices of points in each backward tear
hcorrespondence mapping
hfcorrespondence mapping in forward direction for points on boundary
hbcorrespondence mapping in backward direction for points on boundary
addTear()Add tear to an AnnotatedOutline
AnnotatedOutline$addTear(pids)pidsVector of three point IDs to be added
removeTear()Remove tear from an AnnotatedOutline
AnnotatedOutline$removeTear(tid)tidTear ID, which can be returned from whichTear()
checkTears()Check that all tears are correct.
AnnotatedOutline$checkTears()If all is OK, returns empty vector. If not, returns indices of problematic tears.
setFixedPoint()Set fixed point
AnnotatedOutline$setFixedPoint(i0, name)i0Index of fixed point
nameName of fixed point
getFixedPoint()Get point ID of fixed point
AnnotatedOutline$getFixedPoint()Point ID of fixed point
getRimSet()Get point IDs of points on rim
AnnotatedOutline$getRimSet()Point IDs of points on rim. If the outline has been
stitched (see StitchedOutline), the point IDs
will be ordered in the direction of the
forward pointer.
getBoundarySets()Get point IDs of points on boundaries
AnnotatedOutline$getBoundarySets()List of Point IDs of points on the boundaries.
If the outline has been stitched (see StitchedOutline),
the point IDs in each
element of the list will be ordered in the direction of the
forward pointer, and the boundary that is longest will be
named as Rim. If the outline has not been stitched,
the list will have one element named Rim.
ensureFixedPointInRim()Ensure that the fixed point i0 is in the rim, not a tear.
Alters object in which i0 may have been changed.
AnnotatedOutline$ensureFixedPointInRim()
labelFullCutPoints()Label a set of four unlabelled points supposed to refer to a cut.
AnnotatedOutline$labelFullCutPoints(pids)pidsthe vector of point indices
addFullCut()Add cut to an AnnotatedOutline
AnnotatedOutline$addFullCut(pids)pidsVector of three point IDs to be added
whichFullCut()Return index of cut in an AnnotatedOutline in which a point appears
AnnotatedOutline$whichFullCut(pid)pidID of point
ID of cut
removeFullCut()Remove cut from an AnnotatedOutline
AnnotatedOutline$removeFullCut(cid)cidFullCut ID, which can be returned from
whichFullCut
computeFullCutRelationships()Compute the cut relationships between the points
AnnotatedOutline$computeFullCutRelationships(fullcuts)fullcutsMatrix containing columns VB0,
and VB1 (Backward vertices of fullcuts) and VF0 and VF1 (Forward
vertices of fullcuts)
List containing
Rsetthe set of points on the rim
TFsetlist containing indices of points in each forward cut
TBsetlist containing indices of points in each backward cut
hcorrespondence mapping
hfcorrespondence mapping in forward direction for points on boundary
hbcorrespondence mapping in backward direction for points on boundary
getFullCut()Return indices of fullcuts in AnnotatedOutline
AnnotatedOutline$getFullCut(cid)cidFullCut ID, which can be returned from whichFullCut
Vector of four point IDs, labelled with VF1,
VF1, VB0 and VB1
getFullCuts()Return indices of fullcuts in AnnotatedOutline
AnnotatedOutline$getFullCuts()Matrix in which each row contains point IDs, for the forward and backward
sides of the cut: VF0, VF1, VB0 and VB1
addPoints()Add points to the outline register of points
AnnotatedOutline$addPoints(P, fid)P2 column matrix of points to add
fidfragment id of 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
getRimLengths()Get lengths of edges on rim
AnnotatedOutline$getRimLengths()Vector of rim lengths
clone()The objects of this class are cloneable with this method.
AnnotatedOutline$clone(deep = FALSE)deepWhether to make a deep clone.
P <- rbind(c(1,1), c(2,1), c(2,-1),
c(1,-1), c(1,-2), c(-1,-2),
c(-1,-1), c(-2,-1),c(-2,1),
c(-1,1), c(-1,2), c(1,2))
o <- TriangulatedOutline$new(P)
o$addTear(c(3, 4, 5))
o$addTear(c(6, 7, 8))
o$addTear(c(9, 10, 11))
o$addTear(c(12, 1, 2))
flatplot(o)
P <- list(rbind(c(1,1), c(2,1), c(2.5,2), c(3,1), c(4,1), c(1,4)),
rbind(c(-1,1), c(-1,4), c(-2,3), c(-2,2), c(-3,2), c(-4,1)),
rbind(c(-4,-1), c(-1,-1), c(-1,-4)),
rbind(c(1,-1), c(2,-1), c(2.5,-2), c(3,-1), c(4,-1), c(1,-4)))
o <- AnnotatedOutline$new(P)
o$addTear(c(2, 3, 4))
o$addTear(c(17, 18, 19))
o$addTear(c(9, 10, 11))
o$addFullCut(c(1, 5, 16, 20))
flatplot(o)
Run the code above in your browser using DataLab