|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgeometry.object.SkeletonNode
public class SkeletonNode
data structure to hold information about single skeleton nodes (that is, points on a skeleton) like coordinates, previous node on path etc.
A skeleton node can be either an endnode or a "true" skeleton node. An end node is a point on the skeleton with exactly one neighbor skeleton point.
If a skeleton node is not explicitly declared as an endpoint, it is implicitely declared as skeleton point.
| Field Summary | |
|---|---|
private Coordinates |
coordinates
the skeleton node's coordinates |
private Index |
index
the skeleton node's index in the 2D/3D image (as coordinates and index might differ from each other) |
private boolean |
isEndNode
holds the information if this skeleton node is an end node |
private boolean |
isSkeletonNode
holds the information if this skeleton node is a true skeleton node, that is, no end node |
(package private) org.apache.log4j.Logger |
logger
logger instance |
private SkeletonNode |
previous
holds the information which skeleton node is the predecessor on the path |
| Constructor Summary | |
|---|---|
SkeletonNode(Coordinates coordinates,
boolean isEndNode)
constructor with specified isEndNode |
|
SkeletonNode(Coordinates coordinates,
Index index)
constructor. |
|
| Method Summary | |
|---|---|
boolean |
equals(SkeletonNode node)
check if the current skeleton node is equal to the one specified as parameter. |
Coordinates |
getCoordinates()
get this skeleton node's coordinates. |
Index |
getIndex()
|
SkeletonNode |
getPrevious()
get the predecessor of this skeleton node on the path. |
boolean |
isEndNode()
check if this skeleton node is an end node. |
boolean |
isSkeletonNode()
check if this skeleton node is a true skeleton node, that is, it's neither end node nor junction node. |
void |
setCoordinates(Coordinates coordinates)
set this skeleton node's coordinates. |
void |
setEndNode(boolean isEndNode)
set the information if this node is an end node |
void |
setIndex(Index index)
|
void |
setPrevious(SkeletonNode previous)
get the predecessor of this skeleton node on the path. |
void |
setSkeletonNode(boolean isSkeletonNode)
set the information if this skeleton node is a true skeleton node, that is, it not an end node. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private Coordinates coordinates
private Index index
private boolean isEndNode
private boolean isSkeletonNode
final org.apache.log4j.Logger logger
private SkeletonNode previous
| Constructor Detail |
|---|
public SkeletonNode(Coordinates coordinates,
Index index)
coordinates - the skeleton node's coordinates
public SkeletonNode(Coordinates coordinates,
boolean isEndNode)
throws InvalidSkeletonException
to create a true skeleton node, just use
SkeletonNode(Coordinates, Index)
coordinates - the skeleton node's coordinatesisEndNode - set if this skeleton node is end node or not.
InvalidSkeletonException| Method Detail |
|---|
public boolean equals(SkeletonNode node)
throws InvalidSkeletonException
two skeleton nodes are defined as equals, if their coordinates are equal.
a node can either be junction point, endpoint, or skeleton point. so if one of the nodes is defined as a junction point or as endpoint and the other one is not, something might be wrong in the skeleton and an exception is thrown. in this case the function returns true anyway.
node - the skeleton node to be compared
InvalidSkeletonException - if the nodes have the same coordinates, but one of the nodes
is defined as junction/endpoint while the other one is not.public Coordinates getCoordinates()
public SkeletonNode getPrevious()
public boolean isEndNode()
public boolean isSkeletonNode()
public void setCoordinates(Coordinates coordinates)
coordinates - the skeleton node's coordinatespublic void setEndNode(boolean isEndNode)
isEndNode - true if this is an end node, false if notpublic void setPrevious(SkeletonNode previous)
previous - the predecessor of this skeleton nodepublic void setSkeletonNode(boolean isSkeletonNode)
isSkeletonNode - true if this is a true skeleton node, false if it's an end
nodepublic void setIndex(Index index)
index - the index to setpublic Index getIndex()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||