public class AreaTree extends Tree<Area> implements AreaContainer
Modifier and Type | Class and Description |
---|---|
static class |
AreaTree.AreaNode |
Tree.MeasurementPair, Tree.MeasurePathDistance<I>, Tree.MeshData, Tree.NodePath, Tree.Pair
Displayable.DataPackage, Displayable.DoEdit, Displayable.DoEdits, Displayable.DoTransforms, Displayable.SliderListener
end_nodes, node_layer_map, root
layer_set
alpha, annotation, at, color, COMPOSITE_ADD, COMPOSITE_COLOR_YCBCR, COMPOSITE_DIFFERENCE, COMPOSITE_MULTIPLY, COMPOSITE_NORMAL, COMPOSITE_SUBTRACT, compositeModes, height, hs_linked, last_color, layer, linked_props, linked_props_origins, locked, props, TAG_ATTR1, TAG_ATTR2, title, visible, width
Constructor and Description |
---|
AreaTree(Project project,
long id,
HashMap<String,String> ht_attr,
HashMap<Displayable,String> ht_links)
Reconstruct from XML.
|
AreaTree(Project project,
long id,
String title,
float width,
float height,
float alpha,
boolean visible,
Color color,
boolean locked,
AffineTransform at)
For cloning purposes, does not call addToDatabase()
|
AreaTree(Project project,
String title) |
Modifier and Type | Method and Description |
---|---|
void |
addWorldAreaTo(Node<?> nd,
Area a)
Assumes
nd is an AreaNode. |
boolean |
calculateBoundingBox(Layer la)
May have the side effect of updating the buckets of the containing container of this Displayable.
|
AreaTree |
clone(Project pr,
boolean copy_id)
Performs a deep copy of this object, obtaining its unique id either from the given project or the exact same as this object's id.
|
protected Tree.MeasurementPair |
createMeasurementPair(Tree.NodePath np) |
void |
debug() |
static void |
exportDTD(StringBuilder sb_header,
HashSet<String> hs,
String indent) |
protected boolean |
exportXMLNodeAttributes(StringBuilder indent,
StringBuilder sb,
Node<Area> node) |
protected boolean |
exportXMLNodeData(StringBuilder indent,
StringBuilder sb,
Node<Area> node) |
Tree.MeshData |
generateMesh(double scale,
int resample) |
List<Area> |
getAreas(Layer layer,
Rectangle box)
Return the list of areas, in world coordinates, at the given layer, that intersect the given bounding box.
|
protected Rectangle |
getBounds(Collection<? extends Node<Area>> nodes) |
boolean |
interpolateAllGaps(boolean node_centric,
boolean always_use_distance_map)
Processes shorter chains first.
|
boolean |
interpolateTowardsParent(Node<Area> nd,
boolean node_centric,
boolean always_use_distance_map)
Find the nearest parent with a non-null, non-empty Area, and interpolate from
nd to it. |
protected boolean |
isAnyNear(Collection<Node<Area>> nodes,
float lx,
float ly,
float radius)
Returns true if the given point falls within a certain distance of any of the treeline segments,
where a segment is defined as the line between a clicked point and the next.
|
void |
keyPressed(KeyEvent ke) |
ij.measure.ResultsTable |
measureAreas(ij.measure.ResultsTable rt) |
void |
mouseDragged(MouseEvent me,
Layer la,
int x_p,
int y_p,
int x_d,
int y_d,
int x_d_old,
int y_d_old) |
void |
mousePressed(MouseEvent me,
Layer la,
int x_p,
int y_p,
double mag) |
void |
mouseReleased(MouseEvent me,
Layer la,
int x_p,
int y_p,
int x_d,
int y_d,
int x_r,
int y_r) |
Tree<Area> |
newInstance()
Create a new instance, intialized with same ZDisplayable-level parameters (affine, color, title, etc.).
|
Node<Area> |
newNode(float lx,
float ly,
Layer la,
Node<?> modelNode) |
Node<Area> |
newNode(HashMap<String,String> ht_attr)
To reconstruct from XML.
|
addNode, addToLinkLater, adjustEdgeConfidence, adjustNodeColors, apply, apply, asPoint, asVertices, cacheSubtree, canJoin, clearCache, clearState, colorizeByBranchBetweennessCentrality, colorizeByNodeBetweennessCentrality, computeAllDegrees, computeCentrality, contains, copyAs, createCoordinate, createMultiTableView, createNewNode, createReviewStack, crop, deselect, destroy, dropAllTags, duplicateAs, exportXML, findClosestNode, findClosestNodeW, findClosestNodeW, findConnectors, findFirstIntersectingNode, findIntersecting, findNearAndGetNext, findNearAndGetPrevious, findNearestEdge, findNearestEndNode, findNearestNode, findNextBranchOrEndPoint, findNode, findNodeNear, findNodeNear, findPreviousBranchOrRootPoint, findTaggedPairs, findTags, fireNodeRemoved, firstIntersectingNode, fix, flyThrough, flyThroughMarked, generateAllReviewStacks, generateRegions, generateReviewStackForSlab, generateReviewStackForSlab, generateSkeleton, generateSubtreeReviewStacks, generateSubtreeReviewStacks, generateTriangles, getActive, getAreaAt, getBounds, getBranchAndEndNodes, getBranchNodes, getEndNodes, getFirstLayer, getLastAdded, getLastEdited, getLastVisited, getLayerIds, getLayersWithData, getMarked, getNodesAt, getNodesToPaint, getNodesToPaint, getOriginPoint, getPaintingBounds, getRoot, getShortTitle, insertNode, intersects, intersects, intersects, isDeletable, isRoughlyInside, isTagging, join, layerRemoved, linkPatches, markNear, measure, measurePathDistance, measurePathDistance, measureTaggedPairs, mouseWheelMoved, paint, paint, paintsAt, paintSnapshot, popNode, remove2, removeFromLinkLater, removeNode, removeReviews, repaint, reRoot, reRoot, setActive, setEdgeConfidence, setLastAdded, setLastEdited, setLastMarked, setLastVisited, setRoot, splitAt, splitNear, toClosestPaintedNode, unmark, updateCache, updateView, updateViewData
exportDTD, getBucketable, getLayerSet, remove, setColor, setLayer, setLayerSet, setLayerSet, setVisible, softRemove, transformPoints, updateBucket, updateBucket
adjustProperties, areThereLayerCrossLinks, canSendTo, clone, clone, commonDTDChildren, contains, displacePoints, exportSVG, findById, findNearestPoint, findNearestPoint, getAffineTransform, getAffineTransformCopy, getAlpha, getAnnotation, getArea, getAreaForBucket, getBoundingBox, getBoundingBox, getBoundingBox, getBounds, getColor, getComposite, getComposite, getCompositeMode, getHeight, getIntersection, getLayer, getLinked, getLinked, getLinkedBox, getLinkedGroup, getLinkedProperties, getLinkedProperties, getLinkedProperty, getLinkedProperty, getMinimalBoundingBox, getNameId, getPerimeter, getPerimeter, getProperties, getProperty, getProperty, getTitle, getWidth, getX, getXMLSafeValue, getXMLSafeValue, getY, hasLinkedGroupWithinLayer, hasProperties, intersects, intersects, inverseTransformPoint, isLinked, isLinked, isLinked, isLocked, isLocked2, isOnlyLinkedTo, isOnlyLinkedTo, isOutOfRepaintingClip, isOutOfRepaintingClip, isVisible, link, link, makeAdjustPropertiesDialog, paintAsBox, paintOffscreen, preConcatenate, prePaint, preTransform, processAdjustPropertiesDialog, removeLinkedProperties, removeLinkedPropertiesFromOrigins, repaint, restXML, rotate, rotate, rotatePoints, scale, scale, scalePoints, setAffineTransform, setAlpha, setAlpha, setAnnotation, setCompositeMode, setDimensions, setDimensions, setLayer, setLinkedProperties, setLinkedProperty, setLocation, setLocked, setProperty, setTitle, setVisible, snapTo, toString, transform, transformPoint, transformPoint, transformPoints, transformPoints, transformPoints, transformPoints, transformPoints, transformPoints, transformPoints, transformPoints, transformPoints, transformRectangle, translate, translate, unlink, unlink, unlinkAll, updateInDatabase, xmlError, xmlError
addToDatabase, getId, getInfo, getProject, getUniqueIdentifier, removeFromDatabase, updateInDatabase
public AreaTree(Project project, long id, HashMap<String,String> ht_attr, HashMap<Displayable,String> ht_links)
public AreaTree(Project project, long id, String title, float width, float height, float alpha, boolean visible, Color color, boolean locked, AffineTransform at)
public Tree<Area> newInstance()
Tree
newInstance
in class Tree<Area>
public Node<Area> newNode(HashMap<String,String> ht_attr)
Tree
public AreaTree clone(Project pr, boolean copy_id)
Displayable
clone
in class Displayable
public List<Area> getAreas(Layer layer, Rectangle box)
getAreas
in interface AreaContainer
public static void exportDTD(StringBuilder sb_header, HashSet<String> hs, String indent)
protected boolean exportXMLNodeAttributes(StringBuilder indent, StringBuilder sb, Node<Area> node)
exportXMLNodeAttributes
in class Tree<Area>
protected boolean exportXMLNodeData(StringBuilder indent, StringBuilder sb, Node<Area> node)
exportXMLNodeData
in class Tree<Area>
public boolean calculateBoundingBox(Layer la)
AreaContainer
calculateBoundingBox
in interface AreaContainer
calculateBoundingBox
in class Tree<Area>
public void mousePressed(MouseEvent me, Layer la, int x_p, int y_p, double mag)
mousePressed
in class Tree<Area>
public void mouseDragged(MouseEvent me, Layer la, int x_p, int y_p, int x_d, int y_d, int x_d_old, int y_d_old)
mouseDragged
in class Tree<Area>
public void mouseReleased(MouseEvent me, Layer la, int x_p, int y_p, int x_d, int y_d, int x_r, int y_r)
mouseReleased
in class Tree<Area>
public void keyPressed(KeyEvent ke)
keyPressed
in class Tree<Area>
protected Rectangle getBounds(Collection<? extends Node<Area>> nodes)
public Tree.MeshData generateMesh(double scale, int resample)
public void debug()
protected boolean isAnyNear(Collection<Node<Area>> nodes, float lx, float ly, float radius)
public ij.measure.ResultsTable measureAreas(ij.measure.ResultsTable rt)
measureAreas
in interface AreaContainer
public boolean interpolateTowardsParent(Node<Area> nd, boolean node_centric, boolean always_use_distance_map) throws Exception
nd
to it.nd
- The node to start interpolating from, towards its nearest parent with an area.node_centric
- If true, consider areas relative to the node coordinates. If false, relative to the overall AreaTree.Exception
public boolean interpolateAllGaps(boolean node_centric, boolean always_use_distance_map) throws Exception
Exception
public void addWorldAreaTo(Node<?> nd, Area a)
nd
is an AreaNode. Otherwise fails with ClassCastException
.nd
- An AreaNode.protected Tree.MeasurementPair createMeasurementPair(Tree.NodePath np)
createMeasurementPair
in class Tree<Area>
Copyright © 2015–2021 Fiji. All rights reserved.