Class AbstractSearch

java.lang.Object
sc.fiji.snt.tracing.AbstractSearch
All Implemented Interfaces:
Runnable, SearchInterface
Direct Known Subclasses:
BiSearch, SearchThread

public abstract class AbstractSearch extends Object implements SearchInterface, Runnable
Abstract class for path-finding over RandomAccessibleIntervals
Author:
Cameron Arshadi
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.numeric.RealType<?>>
     
    protected final net.imglib2.RandomAccess<? extends net.imglib2.type.numeric.RealType<?>>
     
    final int
    The depth (number of slices) of the search image.
    final int
    The height of the search image in pixels.
    final int
    The width of the search image in pixels.
    protected double[][][]
     
     
    protected long
     
    protected final String
     
    protected int
     
    protected static final boolean
     
    protected final long
     
    protected final long
     
    protected final double
     
    protected final long
     
    protected final long
     
    protected final double
     
    protected final long
     
    protected final long
     
    protected final double
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    AbstractSearch(ij.ImagePlus imagePlus, int timeoutSeconds, long reportEveryMilliseconds)
     
    protected
    AbstractSearch(net.imagej.Dataset image, int timeoutSeconds, long reportEveryMilliseconds)
     
    protected
    AbstractSearch(net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.numeric.RealType<?>> image, ij.measure.Calibration calibration, int timeoutSeconds, long reportEveryMilliseconds)
     
    protected
    AbstractSearch(SNT snt, ij.ImagePlus imagePlus)
     
    protected
    AbstractSearch(SNT snt, net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.numeric.RealType<?>> image)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract void
    Registers a callback to receive progress updates during the search.
    abstract long
    Returns the total number of points evaluated so far during the search.
    protected void
    Precompute distances to all 27 neighbors (including self at 0,0,0).
    abstract void
    Prints the current search status to the log.
    protected abstract void
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.lang.Runnable

    run

    Methods inherited from interface sc.fiji.snt.tracing.SearchInterface

    getResult
  • Field Details

    • img

      protected final net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.numeric.RealType<?>> img
    • imgAccess

      protected final net.imglib2.RandomAccess<? extends net.imglib2.type.numeric.RealType<?>> imgAccess
    • imgWidth

      public final int imgWidth
      The width of the search image in pixels.
    • imgHeight

      public final int imgHeight
      The height of the search image in pixels.
    • imgDepth

      public final int imgDepth
      The depth (number of slices) of the search image.
    • xMin

      protected final long xMin
    • yMin

      protected final long yMin
    • zMin

      protected final long zMin
    • xMax

      protected final long xMax
    • yMax

      protected final long yMax
    • zMax

      protected final long zMax
    • xSep

      protected final double xSep
    • ySep

      protected final double ySep
    • zSep

      protected final double zSep
    • spacing_units

      protected final String spacing_units
    • timeoutSeconds

      protected int timeoutSeconds
    • reportEveryMilliseconds

      protected long reportEveryMilliseconds
    • progressListeners

      protected List<SearchProgressCallback> progressListeners
    • neighborDistances

      protected double[][][] neighborDistances
    • verbose

      protected static final boolean verbose
  • Constructor Details

    • AbstractSearch

      protected AbstractSearch(ij.ImagePlus imagePlus, int timeoutSeconds, long reportEveryMilliseconds)
    • AbstractSearch

      protected AbstractSearch(net.imagej.Dataset image, int timeoutSeconds, long reportEveryMilliseconds)
    • AbstractSearch

      protected AbstractSearch(net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.numeric.RealType<?>> image, ij.measure.Calibration calibration, int timeoutSeconds, long reportEveryMilliseconds)
    • AbstractSearch

      protected AbstractSearch(SNT snt, ij.ImagePlus imagePlus)
    • AbstractSearch

      protected AbstractSearch(SNT snt, net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.numeric.RealType<?>> image)
  • Method Details

    • 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 in the search loop. Call this method once before starting the search.
    • addProgressListener

      public abstract void addProgressListener(SearchProgressCallback callback)
      Registers a callback to receive progress updates during the search.
      Specified by:
      addProgressListener in interface SearchInterface
      Parameters:
      callback - the callback to register
    • printStatus

      public abstract void printStatus()
      Prints the current search status to the log.
    • reportPointsInSearch

      protected abstract void reportPointsInSearch()
    • pointsConsideredInSearch

      public abstract long pointsConsideredInSearch()
      Returns the total number of points evaluated so far during the search.