|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectio.loader.shared.SkeletonParser
io.loader.load3D.SkeletonParser3D
public class SkeletonParser3D
Load a skeleton from the input data.
To load one 3D skeleton, 4 input files are needed:
Width 123
Height 95
Depth 379
WidthDim 1.46875
HeightDim 1.46875
DepthDim 1.00134
MinVal ^@
MaxVal ^@
BitsUsed 16
| Field Summary | |
|---|---|
private double |
depthDim
the voxelsÄ z dimension |
private double |
heightDim
the voxels' y dimension |
private org.apache.log4j.Logger |
logger
the logger instance |
private int[][][] |
segmentationcube
the cube containing the volume information |
private java.lang.String |
shapeinfoPath
the path to the volume meta information file |
private java.lang.String |
shapePath
the path to the volume data |
private int[][][] |
thinningcube
the cube containing the skeleton information |
private java.lang.String |
thinninginfoPath
the path tp the skeleton meta information file |
private java.lang.String |
thinningPath
the path to the skeleton data |
private double |
widthDim
the voxels' x dimension |
| Fields inherited from class io.loader.shared.SkeletonParser |
|---|
allEndnodes, allJunctionNodes, config, skeletonObject |
| Constructor Summary | |
|---|---|
SkeletonParser3D(java.lang.String thinningPath,
java.lang.String thinninginfoPath,
java.lang.String shapePath,
java.lang.String shapeinfoPath,
Config config)
Constructor. |
|
| Method Summary | |
|---|---|
private void |
cleanJunctionNodes(java.util.List<SkeletonNode> junctionnodes,
int[][][] thinningcube)
Clean the list of junction nodes. |
protected void |
getCriticalNodes()
extract all critical nodes, that is, end nodes and junction nodes |
void |
getDistanceTransform()
compute and set the shape's distance transform |
int[][][] |
getSegmentationcube()
Get the 3D cube containing the volume data (0 = background, 255 = foreground) |
int[][][] |
getThinningCube()
Read the thinning cube. |
private int[][][] |
readBin(java.lang.String file,
int width,
int height,
int depth)
read raw data and save it to 1D-array |
private void |
readThinningInfo()
read thinning info file |
protected java.util.Map<SkeletonNode,java.util.List<SkeletonBranch>> |
sampleParts()
sample all SkeletonBranches emanating from each critical node. |
void |
setSegmentationcube(int[][][] segmentationcube)
Set the volume data. |
| Methods inherited from class io.loader.shared.SkeletonParser |
|---|
deleteUnconnectedComponents, deleteUnnecessaryBranches, extractPaths, getSkeleton, parse, preprocessGraph |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private double widthDim
private double heightDim
private double depthDim
private final java.lang.String thinningPath
private final java.lang.String thinninginfoPath
private final java.lang.String shapePath
private final java.lang.String shapeinfoPath
private final int[][][] thinningcube
private int[][][] segmentationcube
private final org.apache.log4j.Logger logger
| Constructor Detail |
|---|
public SkeletonParser3D(java.lang.String thinningPath,
java.lang.String thinninginfoPath,
java.lang.String shapePath,
java.lang.String shapeinfoPath,
Config config)
throws java.io.IOException
thinningPath - - path to the skeleton data filethinninginfoPath - - path to the skeleton meta data file (like width, height)shapePath - - path to the shape data fileshapeinfoPath - - path to the meta data shape file (like width, height)
java.io.IOException| Method Detail |
|---|
public void getDistanceTransform()
throws java.io.IOException
SkeletonParser
getDistanceTransform in class SkeletonParserjava.io.IOException - if the shape file could not be found
public int[][][] getSegmentationcube()
throws java.io.IOException
java.io.IOException - if the shape path could not be foundpublic void setSegmentationcube(int[][][] segmentationcube)
segmentationcube - the segmentationcube to set
protected void getCriticalNodes()
throws InvalidSkeletonException
SkeletonParser
getCriticalNodes in class SkeletonParserInvalidSkeletonException
protected java.util.Map<SkeletonNode,java.util.List<SkeletonBranch>> sampleParts()
throws InvalidSkeletonException
SkeletonParserSkeletonBranches 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.
sampleParts in class SkeletonParserInvalidSkeletonException
private void cleanJunctionNodes(java.util.List<SkeletonNode> junctionnodes,
int[][][] thinningcube)
throws InvalidSkeletonException
In some constellations, it might happen that "wrong" junction nodes are recognized as juncion nodes, such that multiple junction nodes are directly adjacent. This is information we have no use for, so one of the adjacent junction nodes has to be selected as "real" junction nodes. In this function, the junction node with the most surface neighbors is selected as the real junction node.
The class member SkeletonParser.allJunctionNodes is manipulated
directly, so no return type is needed.
junctionnodes - - list of all junction nodes - probably containing "wrong"
junction nodesthinningcube - - 3D array containing skeleton information
InvalidSkeletonException - - if skeleton seems to be broken
public int[][][] getThinningCube()
throws java.io.IOException
thinningPath
java.io.IOException - if the file was not found
private int[][][] readBin(java.lang.String file,
int width,
int height,
int depth)
throws java.io.IOException
file - - path to file
java.io.IOException - - if file could not be found
private void readThinningInfo()
throws java.io.IOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||