Package sc.fiji.snt.tracing
package sc.fiji.snt.tracing
Path-finding algorithms for interactive neuron tracing.
This package provides A*-based search algorithms for finding optimal paths between user-specified points in neuronal images. These are the core tracing engines used by SNT's interactive tracing mode.
Package Organization
sc.fiji.snt.tracing- Core search algorithms and interfaces (this package)sc.fiji.snt.tracing.cost- Cost functions for edge weightssc.fiji.snt.tracing.heuristic- Heuristic functions for A* searchsc.fiji.snt.tracing.image- Search image data structuressc.fiji.snt.tracing.artist- Real-time visualization of search progresssc.fiji.snt.tracing.auto- Automatic whole-neuron tracing algorithms
Core Classes
TracerThread- The primary A* path finder. Computes optimal paths between two points using intensity-based cost functions and configurable heuristics.
BiSearch- Bidirectional A* search that explores from both endpoints simultaneously, often faster for long paths.
FillerThread- Region-growing algorithm for filling/segmenting neuronal volumes. Used for distance-based analysis and volume rendering.
TubularGeodesicsTracer- Geodesic path finder optimized for tubular structures using orientation-enhanced cost functions.
ManualTracerThread- Lightweight tracer for manual point-to-point connections without automated path optimization.
Search Infrastructure
SearchInterface- Common interface for all search algorithms, defining lifecycle methods and result retrieval.
AbstractSearch- Base implementation with shared functionality: priority queue management, neighbor iteration, path reconstruction.
SearchNode/DefaultSearchNode- Graph nodes storing position, costs (g, h, f), and parent pointers for path reconstruction.
PathResult- Encapsulates search results: the found path, search statistics, and success/failure status.
Algorithm Overview
The A* algorithm finds the optimal path by minimizing f(n) = g(n) + h(n), where:
g(n)- Actual cost from start to node n (computed viaCost)h(n)- Estimated cost from n to goal (computed viaHeuristic)
Cost functions typically use image intensity (brighter = lower cost for neurites), while heuristics use Euclidean distance or Dijkstra (h=0) for guaranteed optimality.
Usage Example
// Create tracer with reciprocal cost (bright = low cost)
TracerThread tracer = new TracerThread(
searchImage,
startX, startY, startZ,
endX, endY, endZ,
new Reciprocal(minCost, maxCost),
new Euclidean()
);
// Run search (blocks until complete)
tracer.run();
// Get result
Path path = tracer.getResult();
- Author:
- Mark Longair, Tiago Ferreira, Cameron Arshadi
- See Also:
-
ClassDescriptionAbstract class for path-finding over
RandomAccessibleIntervalsA flexible implementation of the bidirectional heuristic search algorithm described in Pijls, W.H.L.M., Post, H., 2009.ASearchNodewhich can maintain both a from-start and from-goal search state.Static utilities for computing cross-sectional planes perpendicular to a path tangent.ASearchNodewhich can maintain both a from-start and from-goal search state.Seeded-volume segmentation via single-source shortest paths.A tracer thread for manual tracing.Tracer classes implementing searches between two points should implement this interface.Interface representing a node in 3D space that can be used in pathfinding and search algorithms.Implements a common thread that explores the image using a variety of strategies, e.g., to trace tubular structures or surfaces.SNT's default tracer thread: explores between two points in an image, doing an A* search with a choice of distance measures.A tracer thread forFijiITKInterface.TubularGeodesics(assumes the tubularity add-on to be installed)