Class FillerThread

All Implemented Interfaces:
Runnable, SearchInterface

public class FillerThread extends SearchThread
Seeded-volume segmentation via single-source shortest paths. Path nodes are used as seed points in an open-ended variant of Dijkstra's algorithm. The threshold sets the maximum allowable distance for a node to be included in the Fill. This distance is represented in the g-score of a node, which is the length of the shortest path from a seed point to that node. The magnitudes of these distances are heavily dependent on the supplied cost function Cost, so the threshold should be set with a particular cost function in mind. It often helps to adjust the threshold interactively.
Author:
Cameron Arshadi, Tiago Ferreira, Mark Longair
  • Constructor Details

    • FillerThread

      public FillerThread(net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.numeric.RealType<?>> image, ij.measure.Calibration calibration, double initialThreshold, Cost costFunction)
    • FillerThread

      public FillerThread(net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.numeric.RealType<?>> image, ij.measure.Calibration calibration, double initialThreshold, long reportEveryMilliseconds, Cost costFunction)
    • FillerThread

      public FillerThread(net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.numeric.RealType<?>> image, ij.measure.Calibration calibration, double initialThreshold, int timeoutSeconds, long reportEveryMilliseconds, Cost costFunction)
    • FillerThread

      public FillerThread(net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.numeric.RealType<?>> image, ij.measure.Calibration calibration, double initialThreshold, int timeoutSeconds, long reportEveryMilliseconds, Cost costFunction, SNT.SearchImageType searchImageType)
    • FillerThread

      public FillerThread(net.imagej.Dataset dataset, double initialThreshold, int timeoutSeconds, long reportEveryMilliseconds, Cost costFunction, SNT.SearchImageType searchImageType)
    • FillerThread

      public FillerThread(net.imagej.Dataset dataset, double initialThreshold, int timeoutSeconds, long reportEveryMilliseconds, Cost costFunction)
    • FillerThread

      public FillerThread(net.imagej.Dataset dataset, double initialThreshold, Cost costFunction)
  • Method Details

    • setStopAtThreshold

      public void setStopAtThreshold(boolean stopAtThreshold)
      Whether to terminate the fill operation once all nodes less than or equal to the distance threshold have been explored. If false, the search will run until it has explored the entire image. The default is false.
      Parameters:
      stopAtThreshold -
    • setStoreExtraNodes

      public void setStoreExtraNodes(boolean storeExtraNodes)
      Whether to store above-threshold nodes in the Fill object. The default is true.
      Parameters:
      storeExtraNodes -
      See Also:
    • fromFill

      public static FillerThread fromFill(net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.numeric.RealType<?>> image, ij.measure.Calibration calibration, ij.process.ImageStatistics stats, Fill fill)
    • fromFill

      public static FillerThread fromFill(ij.ImagePlus imagePlus, ij.process.ImageStatistics stats, Fill fill)
    • getDistanceAtPoint

      public double getDistanceAtPoint(double xd, double yd, double zd)
    • getFill

      public Fill getFill()
    • getThreshold

      public double getThreshold()
    • setThreshold

      public void setThreshold(double threshold)
    • setSourcePaths

      public void setSourcePaths(Collection<Path> newSourcePaths)
    • precomputeNeighborDistances

      protected void precomputeNeighborDistances()
      Precompute distances to all 27 neighbors (including self at 0,0,0). Since xdiff, ydiff, zdiff ∈ {-1, 0, 1} and spacing is fixed, we can compute these once instead of per-neighbor.
      Overrides:
      precomputeNeighborDistances in class AbstractSearch
    • run

      public void run()
      Specified by:
      run in interface Runnable
      Overrides:
      run in class SearchThread
    • getNodesAsImage

      public SearchImageStack<DefaultSearchNode> getNodesAsImage()
    • reportPointsInSearch

      protected void reportPointsInSearch()
      Overrides:
      reportPointsInSearch in class SearchThread
    • getResult

      public Path getResult()
    • reportFinished

      public void reportFinished(boolean success)
      Overrides:
      reportFinished in class SearchThread