Package sc.fiji.snt.tracing
Class BiSearch
java.lang.Object
sc.fiji.snt.tracing.AbstractSearch
sc.fiji.snt.tracing.BiSearch
- All Implemented Interfaces:
Runnable,SearchInterface
A flexible implementation of the bidirectional heuristic search algorithm described in
Pijls, W.H.L.M., Post, H., 2009. "Yet another bidirectional algorithm for shortest paths,"
Econometric Institute Research Papers EI 2009-10,
Erasmus University Rotterdam, Erasmus School of Economics (ESE), Econometric Institute.
The search distance function (Cost) and heuristic estimate (Heuristic) are
supplied by the caller.
- Author:
- Cameron Arshadi
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected longprotected longprotected final Costprotected final intprotected final intprotected final intprotected final Heuristicprotected final SearchImageStack<BiSearchNode> protected org.jheaps.AddressableHeap<BiSearchNode, Void> protected org.jheaps.AddressableHeap<BiSearchNode, Void> protected Pathprotected final intprotected final intprotected final intFields inherited from class sc.fiji.snt.tracing.AbstractSearch
img, imgAccess, imgDepth, imgHeight, imgWidth, neighborDistances, progressListeners, reportEveryMilliseconds, spacing_units, timeoutSeconds, verbose, xMax, xMin, xSep, yMax, yMin, ySep, zMax, zMin, zSep -
Constructor Summary
ConstructorsConstructorDescriptionBiSearch(net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.numeric.RealType<?>> image, ij.measure.Calibration calibration, int start_x, int start_y, int start_z, int goal_x, int goal_y, int goal_z, int timeoutSeconds, long reportEveryMilliseconds, SNT.SearchImageType searchImageType, Cost costFunction, Heuristic heuristic) BiSearch(SNT snt, int start_x, int start_y, int start_z, int goal_x, int goal_y, int goal_z, Cost costFunction, Heuristic heuristic) BiSearch(SNT snt, net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.numeric.RealType<?>> image, int start_x, int start_y, int start_z, int goal_x, int goal_y, int goal_z, Cost costFunction, Heuristic heuristic) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProgressListener(SearchProgressCallback callback) Registers a callback to receive progress updates during the search.protected booleanprotected voidexpandNeighbors(BiSearchNode p, boolean fromStart) longReturns the total number of points evaluated so far during the search.voidPrints the current search status to the log.protected PathreconstructPath(double x_spacing, double y_spacing, double z_spacing, String spacing_units) voidreportFinished(boolean success) protected voidvoidrun()Methods inherited from class sc.fiji.snt.tracing.AbstractSearch
precomputeNeighborDistances
-
Field Details
-
start_x
protected final int start_x -
start_y
protected final int start_y -
start_z
protected final int start_z -
goal_x
protected final int goal_x -
goal_y
protected final int goal_y -
goal_z
protected final int goal_z -
costFunction
-
heuristic
-
open_from_start
-
open_from_goal
-
closed_from_start_count
protected long closed_from_start_count -
closed_from_goal_count
protected long closed_from_goal_count -
nodes_as_image
-
result
-
-
Constructor Details
-
BiSearch
public BiSearch(net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.numeric.RealType<?>> image, ij.measure.Calibration calibration, int start_x, int start_y, int start_z, int goal_x, int goal_y, int goal_z, int timeoutSeconds, long reportEveryMilliseconds, SNT.SearchImageType searchImageType, Cost costFunction, Heuristic heuristic) -
BiSearch
-
BiSearch
-
BiSearch
-
-
Method Details
-
run
public void run() -
expandNeighbors
-
reconstructPath
-
addProgressListener
Description copied from class:AbstractSearchRegisters a callback to receive progress updates during the search.- Specified by:
addProgressListenerin classAbstractSearch
-
reportFinished
public void reportFinished(boolean success) -
pointsConsideredInSearch
public long pointsConsideredInSearch()Description copied from class:AbstractSearchReturns the total number of points evaluated so far during the search.- Specified by:
pointsConsideredInSearchin classAbstractSearch
-
checkStatus
protected boolean checkStatus() -
getResult
-
printStatus
public void printStatus()Description copied from class:AbstractSearchPrints the current search status to the log.- Specified by:
printStatusin classAbstractSearch
-
reportPointsInSearch
protected void reportPointsInSearch()- Specified by:
reportPointsInSearchin classAbstractSearch
-
getNodesAsImage
-