Package sc.fiji.snt

Class Fill

java.lang.Object
sc.fiji.snt.Fill

public class Fill extends Object
Defines a filled structure.
Author:
Mark Longair, Tiago Ferreira, Cameron Arshadi
  • Field Details

    • distanceThreshold

      public double distanceThreshold
    • metric

      public SNT.CostType metric
    • x_spacing

      public double x_spacing
    • y_spacing

      public double y_spacing
    • z_spacing

      public double z_spacing
    • spacing_units

      public String spacing_units
  • Constructor Details

    • Fill

      public Fill()
  • Method Details

    • getNodeList

      public List<Fill.Node> 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 node
      y - the y-coordinate of the node
      z - the z-coordinate of the node
      distance - the distance value of the node
      previous - the index of the previous node
      open - the status of the node (open or closed)
    • getSourcePaths

      public Set<Path> getSourcePaths()
      Returns the set of source paths for the filled structure.
      Returns:
      the set of source paths
    • setSourcePaths

      public void setSourcePaths(Path[] newSourcePaths)
      Sets the source paths for the filled structure using an array of paths.
      Parameters:
      newSourcePaths - the array of new source paths
    • setSourcePaths

      public void setSourcePaths(Set<Path> newSourcePaths)
      Sets the source paths for the filled structure using a set of paths.
      Parameters:
      newSourcePaths - the set of new source paths
    • setMetric

      public void setMetric(SNT.CostType cost)
      Sets the cost metric for the filled structure.
      Parameters:
      cost - the cost type to set
    • getMetric

      public SNT.CostType getMetric()
    • setSpacing

      public void setSpacing(double x_spacing, double y_spacing, double z_spacing, String units)
    • 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

      public void writeNodesXML(PrintWriter pw)
    • writeXML

      public void writeXML(PrintWriter pw, int fillIndex)
    • 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

      public String getSourcePathsStringMachine()
    • getSourcePathsStringHuman

      public String getSourcePathsStringHuman()
    • toString

      public String toString()
      Overrides:
      toString in class Object