Package sc.fiji.snt.tracing
Class AbstractSearch
java.lang.Object
sc.fiji.snt.tracing.AbstractSearch
- All Implemented Interfaces:
Runnable,SearchInterface
- Direct Known Subclasses:
BiSearch,SearchThread
Abstract class for path-finding over
RandomAccessibleIntervals- Author:
- Cameron Arshadi
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.numeric.RealType<?>> protected final net.imglib2.RandomAccess<? extends net.imglib2.type.numeric.RealType<?>> final intThe depth (number of slices) of the search image.final intThe height of the search image in pixels.final intThe width of the search image in pixels.protected double[][][]protected ArrayList<SearchProgressCallback> protected longprotected final Stringprotected intprotected final booleanprotected final longprotected final longprotected final doubleprotected final longprotected final longprotected final doubleprotected final longprotected final longprotected final double -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractSearch(ij.ImagePlus imagePlus, int timeoutSeconds, long reportEveryMilliseconds) protectedAbstractSearch(net.imagej.Dataset image, int timeoutSeconds, long reportEveryMilliseconds) protectedAbstractSearch(net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.numeric.RealType<?>> image, ij.measure.Calibration calibration, int timeoutSeconds, long reportEveryMilliseconds) protectedAbstractSearch(SNT snt, ij.ImagePlus imagePlus) protectedAbstractSearch(SNT snt, net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.numeric.RealType<?>> image) -
Method Summary
Modifier and TypeMethodDescriptionabstract voidaddProgressListener(SearchProgressCallback callback) Registers a callback to receive progress updates during the search.abstract longReturns the total number of points evaluated so far during the search.protected voidPrecompute distances to all 27 neighbors (including self at 0,0,0).abstract voidPrints the current search status to the log.protected abstract voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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 imgWidthThe width of the search image in pixels. -
imgHeight
public final int imgHeightThe height of the search image in pixels. -
imgDepth
public final int imgDepthThe 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
-
timeoutSeconds
protected int timeoutSeconds -
reportEveryMilliseconds
protected long reportEveryMilliseconds -
progressListeners
-
neighborDistances
protected double[][][] neighborDistances -
verbose
protected 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
-
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
Registers a callback to receive progress updates during the search. -
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.
-