Package sc.fiji.snt
Class Fill
java.lang.Object
sc.fiji.snt.Fill
Defines a filled structure.
- Author:
- Mark Longair, Tiago Ferreira, Cameron Arshadi
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptiondoubledoubledoubledouble -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(int x, int y, int z, double distance, int previous, boolean open) Adds a node to the filled structure.doubleReturns the estimated mean radius of the fill, assuming a cylindric shapeReturns the list of nodes in the filled structure.Returns the set of source paths for the filled structure.doubledoubleReturns the Fill volume.voidsetMetric(SNT.CostType cost) Sets the cost metric for the filled structure.voidsetSourcePaths(Set<Path> newSourcePaths) Sets the source paths for the filled structure using a set of paths.voidsetSourcePaths(Path[] newSourcePaths) Sets the source paths for the filled structure using an array of paths.voidsetSpacing(double x_spacing, double y_spacing, double z_spacing, String units) voidsetThreshold(double threshold) Sets the distance threshold for the filled structure.toString()voidvoidwriteXML(PrintWriter pw, int fillIndex)
-
Field Details
-
distanceThreshold
public double distanceThreshold -
metric
-
x_spacing
public double x_spacing -
y_spacing
public double y_spacing -
z_spacing
public double z_spacing -
spacing_units
-
-
Constructor Details
-
Fill
public Fill()
-
-
Method Details
-
getNodeList
Returns the list of nodes in the filled structure.- Returns:
- the list of nodes
-
add
public void add(int x, int y, int z, double distance, int previous, boolean open) Adds a node to the filled structure.- Parameters:
x- the x-coordinate of the nodey- the y-coordinate of the nodez- the z-coordinate of the nodedistance- the distance value of the nodeprevious- the index of the previous nodeopen- the status of the node (open or closed)
-
getSourcePaths
Returns the set of source paths for the filled structure.- Returns:
- the set of source paths
-
setSourcePaths
Sets the source paths for the filled structure using an array of paths.- Parameters:
newSourcePaths- the array of new source paths
-
setSourcePaths
Sets the source paths for the filled structure using a set of paths.- Parameters:
newSourcePaths- the set of new source paths
-
setMetric
Sets the cost metric for the filled structure.- Parameters:
cost- the cost type to set
-
getMetric
-
setSpacing
-
setThreshold
public void setThreshold(double threshold) Sets the distance threshold for the filled structure.- Parameters:
threshold- the threshold value to set
-
getThreshold
public double getThreshold() -
writeNodesXML
-
writeXML
-
getVolume
public double getVolume()Returns the Fill volume. It assumes that the volume is just the number of sub-threshold nodes multiplied by x_spacing * y_spacing * z_spacing.- Returns:
- the volume
-
getEstimatedMeanRadius
public double getEstimatedMeanRadius()Returns the estimated mean radius of the fill, assuming a cylindric shape- Returns:
- the estimated mean radius
-
getSourcePathsStringMachine
-
getSourcePathsStringHuman
-
toString
-