mathcomp.gui.cfd
Class Skeleton
java.lang.Object
mathcomp.gui.cfd.Skeleton
public class Skeleton
- extends java.lang.Object
- Author:
- chwust
Skeleton Object contains the data from the skeleton files.
Data Structure
--------------
numbranches
emptyline
numnodes per branch seperated by whitespace
emptyline
branches nodes X Y diameter is_branching_node
---------------
see skeletons folder for examples
Method Summary |
void |
addPoint(Node n,
double diam)
|
static Skeleton |
createFromFile(java.lang.String filename)
|
static Skeleton |
createFromReader(java.io.BufferedReader in)
|
java.awt.geom.Rectangle2D |
getBounds()
|
Branch |
getBranchAt(int i)
|
java.util.Vector |
getBranches()
|
int |
getNumBranches()
|
int |
getTotalNodes()
|
double |
getYEND()
|
void |
newBranch()
|
void |
printData()
|
void |
recalcBounds()
|
void |
removeBranch(int selectedBranch)
|
void |
scaleAllBranches(double factor)
scales all branches with respect to branch branchings |
void |
scaleBranch(int num,
double factor)
|
void |
scaleDiams(java.lang.String input)
|
void |
setBounds(java.awt.geom.Rectangle2D bounds)
|
void |
setBranches(java.util.Vector branches)
|
void |
setDiams(java.lang.String input)
|
void |
updateDiameter(double diam,
int selectedBranch,
int selectedID)
|
void |
updateNode(Node n,
double diam,
int selectedBranch,
int selectedID)
|
void |
updateNode(Node n,
int selectedBranch,
int selectedID)
|
void |
writeToFile(java.io.File file)
Writes this grid to file . |
void |
writeToWriter(java.io.PrintWriter out)
Writes this grid to out , with an Matlab compatible format,
if matlab is true . |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Skeleton
public Skeleton()
Skeleton
public Skeleton(java.util.Vector branches)
createFromFile
public static Skeleton createFromFile(java.lang.String filename)
createFromReader
public static Skeleton createFromReader(java.io.BufferedReader in)
throws java.io.IOException
- Throws:
java.io.IOException
writeToFile
public void writeToFile(java.io.File file)
- Writes this grid to
file
.
- Parameters:
file
- - See Also:
writeToWriter(PrintWriter)
writeToWriter
public void writeToWriter(java.io.PrintWriter out)
throws java.io.IOException
- Writes this grid to
out
, with an Matlab compatible format,
if matlab
is true
.
- Parameters:
out
- matlab
- matlab compatible output
- Throws:
java.io.IOException
recalcBounds
public void recalcBounds()
addPoint
public void addPoint(Node n,
double diam)
getBranches
public java.util.Vector getBranches()
- Returns:
- Returns the branches.
getBranchAt
public Branch getBranchAt(int i)
setBranches
public void setBranches(java.util.Vector branches)
- Parameters:
branches
- The branches to set.
getBounds
public java.awt.geom.Rectangle2D getBounds()
- Returns:
- Returns the bounds.
setBounds
public void setBounds(java.awt.geom.Rectangle2D bounds)
- Parameters:
bounds
- The bounds to set.
printData
public void printData()
getTotalNodes
public int getTotalNodes()
- Returns:
- Returns the totalNodes.
setDiams
public void setDiams(java.lang.String input)
scaleDiams
public void scaleDiams(java.lang.String input)
scaleAllBranches
public void scaleAllBranches(double factor)
- scales all branches with respect to branch branchings
- Parameters:
factor
-
scaleBranch
public void scaleBranch(int num,
double factor)
getNumBranches
public int getNumBranches()
- Returns:
- Returns the numBranches.
newBranch
public void newBranch()
updateNode
public void updateNode(Node n,
double diam,
int selectedBranch,
int selectedID)
- Parameters:
selectedBranch
- selectedID
-
updateNode
public void updateNode(Node n,
int selectedBranch,
int selectedID)
updateDiameter
public void updateDiameter(double diam,
int selectedBranch,
int selectedID)
removeBranch
public void removeBranch(int selectedBranch)
getYEND
public double getYEND()