|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectio.loader.shared.SkeletonParser
public abstract class SkeletonParser
Abstract class to handle the parsing of 2D and 3D skeletons, respectively.
| Field Summary | |
|---|---|
protected java.util.List<SkeletonNode> |
allEndnodes
list containing all skeleton end nodes |
protected java.util.List<SkeletonNode> |
allJunctionNodes
list containing all skeleton junction nodes |
protected Config |
config
|
protected org.apache.log4j.Logger |
logger
logger instance |
protected SkeletonObject |
skeletonObject
meta skeleton object |
| Constructor Summary | |
|---|---|
SkeletonParser(Config config)
Constructor. |
|
| Method Summary | |
|---|---|
protected void |
deleteUnconnectedComponents(SkeletonGraph graph)
In some cases, the skeletons might not be connected (that is, there are "holes" in the skeleton which makes the sampling of the whole paths impossible). |
protected void |
deleteUnnecessaryBranches(SkeletonGraph graph)
Deletes short branches from the skeleton, based on their length. |
protected void |
extractPaths(SkeletonGraph graph)
From the skeleton graph, extract all skeleton paths. |
protected abstract void |
getCriticalNodes()
extract all critical nodes, that is, end nodes and junction nodes |
protected abstract void |
getDistanceTransform()
compute and set the shape's distance transform |
SkeletonObject |
getSkeleton()
parse the skeleton and return it, according to the specified parameters. |
protected void |
parse()
Parse the skeleton. |
protected void |
preprocessGraph(SkeletonGraph graph)
In case that the skeleton is not continous, throw out skeleton parts that are not connected to the "main skeleton" |
protected abstract java.util.Map<SkeletonNode,java.util.List<SkeletonBranch>> |
sampleParts()
sample all SkeletonBranches emanating from each critical node. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected SkeletonObject skeletonObject
protected java.util.List<SkeletonNode> allEndnodes
protected java.util.List<SkeletonNode> allJunctionNodes
protected Config config
protected org.apache.log4j.Logger logger
| Constructor Detail |
|---|
public SkeletonParser(Config config)
| Method Detail |
|---|
protected abstract void getDistanceTransform()
throws java.io.IOException
java.io.IOException - if the shape file could not be found
protected abstract java.util.Map<SkeletonNode,java.util.List<SkeletonBranch>> sampleParts()
throws InvalidSkeletonException
SkeletonBranches emanating from each critical node.
For each critical node, a list of all emanating parts is stored. The key
in the map is the critical node, the value is the list of all skeleton
branches emanating from the node that is the key.
InvalidSkeletonException
protected abstract void getCriticalNodes()
throws InvalidSkeletonException
InvalidSkeletonException
public SkeletonObject getSkeleton()
throws InvalidSkeletonException,
java.io.IOException
InvalidSkeletonException - - if the skeleton seems to be broken
java.io.IOException - if one of the input file has not been found
protected void parse()
throws InvalidSkeletonException,
java.io.IOException
InvalidSkeletonException - if the skeleton seems to be broken
java.io.IOException - if one of the input files was not foundprotected void deleteUnconnectedComponents(SkeletonGraph graph)
graph - the skeleton's skeleton graphprotected void deleteUnnecessaryBranches(SkeletonGraph graph)
Preprocessor.deleteSpuriousBranches(SkeletonObject, Config) for
more details.
graph - the skeleton's skeleton graphprotected void preprocessGraph(SkeletonGraph graph)
graph - the graph where the unconnected components will be deleted
protected void extractPaths(SkeletonGraph graph)
throws InvalidSkeletonException
graph - the skeleton graph
InvalidSkeletonException - - if the skeleton seems to be broken
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||