|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgeometry.object.Skeleton
public class Skeleton
A data structure to hold information about the skeleton data.
Basically, a skeleton is defined by its end nodes, ordered in clockwise direction after traversing the object contour. For each of these end nodes, a list of all emanating skeleton paths from this end node is known.
| Field Summary | |
|---|---|
private java.util.List<SkeletonNode> |
endnodes
list containing all skeleton endnodes. |
private org.apache.log4j.Logger |
logger
logger instance |
private java.util.Map<SkeletonNode,java.util.List<SkeletonPath>> |
paths
list containing all skeleton paths emanating from every skeleton node. |
| Constructor Summary | |
|---|---|
Skeleton()
|
|
| Method Summary | |
|---|---|
void |
addPaths(java.util.List<SkeletonPath> paths,
SkeletonNode endnode)
add a list of paths to the skeleton's paths. |
java.util.List<SkeletonNode> |
getAllEndNodes()
Return the skeleton's end nodes. |
java.util.Map<SkeletonNode,java.util.List<SkeletonPath>> |
getAllSkeletonPaths()
Get all skeleton paths. |
SkeletonPath |
getSkeletonPathByEndnodes(SkeletonNode node1,
SkeletonNode node2)
get the skeleton path between the specified end nodes. |
java.util.List<SkeletonPath> |
getSkeletonPathsByEndnode(SkeletonNode node)
Get a list of all skeleton paths emanating from the specified end node.The specified end node has to be the key to the path map to be a match. |
void |
setAllEndnodes(java.util.List<SkeletonNode> endnodes)
set the skeleton's endnodes. |
void |
setPaths(java.util.Map<SkeletonNode,java.util.List<SkeletonPath>> allPaths)
set the skeleton's skeleton paths. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.util.List<SkeletonNode> endnodes
private org.apache.log4j.Logger logger
private java.util.Map<SkeletonNode,java.util.List<SkeletonPath>> paths
| Constructor Detail |
|---|
public Skeleton()
| Method Detail |
|---|
public void addPaths(java.util.List<SkeletonPath> paths,
SkeletonNode endnode)
The specified list should be all skeleton paths emanating from the specified end node.
If the old map of paths previously contained a key with the value of the specified endnode, the old value is replaced.
paths - a list of paths to be addedendnode - the endnode the specified paths belong topublic java.util.List<SkeletonNode> getAllEndNodes()
They should have been already set by an external algorithm as a sorted list. Otherwise (if the list is still null at this point) the end nodes are extracted from the skeleton paths. This could result in unsorted end nodes. If no skeleton paths are given either, null is returned.
public java.util.Map<SkeletonNode,java.util.List<SkeletonPath>> getAllSkeletonPaths()
public java.util.List<SkeletonPath> getSkeletonPathsByEndnode(SkeletonNode node)
throws InvalidSkeletonException
SkeletonNode.equals(SkeletonNode) for
more information on when two skeleton nodes are assumed as equal.
node - the startpoint of all returned skeleton paths
InvalidSkeletonException - if the specified node is no end node, but an equal node is
found, or other way around.
public SkeletonPath getSkeletonPathByEndnodes(SkeletonNode node1,
SkeletonNode node2)
throws InvalidSkeletonException
For being a match, node1 has to be the key in the path map, and the path's first endnode has to be equals node1, and the path's second endnode has to be equals node2.
See SkeletonNode.equals(SkeletonNode) for more
information on when two skeleton nodes are assumed as equal.
node1 - key in the path map and the skeleton path's first end nodenode2 - the skeleton path's second end node
InvalidSkeletonExceptionpublic void setAllEndnodes(java.util.List<SkeletonNode> endnodes)
endnodes - a list of the skeleton's endnodespublic void setPaths(java.util.Map<SkeletonNode,java.util.List<SkeletonPath>> allPaths)
allPaths - the skeleton paths to be set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||