Package sc.fiji.snt.tracing
Class FillerThread
java.lang.Object
sc.fiji.snt.tracing.AbstractSearch
sc.fiji.snt.tracing.SearchThread
sc.fiji.snt.tracing.FillerThread
- All Implemented Interfaces:
Runnable,SearchInterface
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
-
Field Summary
Fields inherited from class sc.fiji.snt.tracing.SearchThread
CANCELLED, CLOSED_FROM_GOAL, closed_from_goal_count, CLOSED_FROM_START, closed_from_start_count, costFunction, EXIT_REASONS_STRINGS, exitReason, FREE, lastReportMilliseconds, loops, loops_at_last_report, nodes_as_image_from_goal, nodes_as_image_from_start, OPEN_FROM_GOAL, open_from_start, OPEN_FROM_START, OUT_OF_MEMORY, POINTS_EXHAUSTED, started_at, SUCCESS, TIMED_OUT, verboseFields inherited from class sc.fiji.snt.tracing.AbstractSearch
img, imgAccess, imgDepth, imgHeight, imgWidth, progressListeners, reportEveryMilliseconds, spacing_units, timeoutSeconds, xMax, xMin, xSep, yMax, yMin, ySep, zMax, zMin, zSep -
Constructor Summary
ConstructorsConstructorDescriptionFillerThread(net.imagej.Dataset dataset, double initialThreshold, int timeoutSeconds, long reportEveryMilliseconds, Cost costFunction) FillerThread(net.imagej.Dataset dataset, double initialThreshold, int timeoutSeconds, long reportEveryMilliseconds, Cost costFunction, SNT.SearchImageType searchImageType) FillerThread(net.imagej.Dataset dataset, double initialThreshold, Cost costFunction) FillerThread(net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.numeric.RealType<?>> image, ij.measure.Calibration calibration, double initialThreshold, int timeoutSeconds, long reportEveryMilliseconds, Cost costFunction) 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(net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.numeric.RealType<?>> image, ij.measure.Calibration calibration, double initialThreshold, long reportEveryMilliseconds, Cost costFunction) FillerThread(net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.numeric.RealType<?>> image, ij.measure.Calibration calibration, double initialThreshold, Cost costFunction) -
Method Summary
Modifier and TypeMethodDescriptionstatic FillerThreadstatic FillerThreadfromFill(net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.numeric.RealType<?>> image, ij.measure.Calibration calibration, ij.process.ImageStatistics stats, Fill fill) doublegetDistanceAtPoint(double xd, double yd, double zd) getFill()doubleprotected voidPrecompute distances to all 27 neighbors (including self at 0,0,0).voidreportFinished(boolean success) protected voidvoidrun()voidsetSourcePaths(Collection<Path> newSourcePaths) voidsetStopAtThreshold(boolean stopAtThreshold) Whether to terminate the fill operation once all nodes less than or equal to the distance threshold have been explored.voidsetStoreExtraNodes(boolean storeExtraNodes) Whether to store above-threshold nodes in theFillobject.voidsetThreshold(double threshold) Methods inherited from class sc.fiji.snt.tracing.SearchThread
addNode, addProgressListener, atGoal, checkStatus, createNewNode, foundGoal, getExitReason, getNodesAsImageFromGoal, getNodesAsImageFromStart, pointsConsideredInSearch, printStatus
-
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
-
-
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 theFillobject. 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
-
getThreshold
public double getThreshold() -
setThreshold
public void setThreshold(double threshold) -
setSourcePaths
-
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:
precomputeNeighborDistancesin classAbstractSearch
-
run
public void run()- Specified by:
runin interfaceRunnable- Overrides:
runin classSearchThread
-
getNodesAsImage
-
reportPointsInSearch
protected void reportPointsInSearch()- Overrides:
reportPointsInSearchin classSearchThread
-
getResult
-
reportFinished
public void reportFinished(boolean success) - Overrides:
reportFinishedin classSearchThread
-