Package sc.fiji.snt.tracing.auto
Class SparseGWDTTracer<T extends net.imglib2.type.numeric.RealType<T>>
java.lang.Object
sc.fiji.snt.tracing.auto.AbstractAutoTracer
sc.fiji.snt.tracing.auto.AbstractGWDTTracer<T>
sc.fiji.snt.tracing.auto.SparseGWDTTracer<T>
- Type Parameters:
T- pixel type
- All Implemented Interfaces:
AutoTracer
public class SparseGWDTTracer<T extends net.imglib2.type.numeric.RealType<T>>
extends AbstractGWDTTracer<T>
Sparse GWDT tracer using hash map storage for memory efficiency.
Uses hash maps to store only non-default values, achieving 10-100× memory
reduction compared to GWDTTracer for sparse neuronal structures.
- Memory: 10-100× less than array storage
- Speed: ~1.5-2× slower due to hash lookups
- Best for: Thin structures, lots of background, limited RAM
- GWDTTracer (array): ~2.5GB RAM
- SparseGWDTTracer: ~100-500MB RAM for sparse structures (5-10% foreground), up to ~4GB for dense structures (>40% foreground)
- DiskBackedGWDTTracer: ~500MB RAM + ~100GB temporary disk
- Author:
- Tiago Ferreira
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class sc.fiji.snt.tracing.auto.AbstractGWDTTracer
AbstractGWDTTracer.HierarchySegment, AbstractGWDTTracer.WaypointBiasSourceNested classes/interfaces inherited from interface sc.fiji.snt.tracing.auto.AutoTracer
AutoTracer.SeedRole -
Field Summary
Fields inherited from class sc.fiji.snt.tracing.auto.AbstractGWDTTracer
ALIVE, backgroundThreshold, branchTuneMaxAngle, cnnType, dims, FAR, jointLeafPruneEnabled, leafPruneEnabled, leafPruneOverlap, maxBounds, maxIntensity, minBounds, minBranchIntensityLength, minIntensity, overshootRemovalEnabled, parallelBranchPruneEnabled, resampleEnabled, resampleStep, scoreMap, scoreMapEnabled, scoreMapFilterType, scoreMapPruneThreshold, scoreMapScales, seedVoxel, smoothEnabled, smoothWindowSize, source, spacing, sphereOverlapThreshold, srRatio, storage, TRIAL, zigzagRemovalEnabledFields inherited from class sc.fiji.snt.tracing.auto.AbstractAutoTracer
logger, rootStrategy, somaRoi, somaRoiZPosition, verboseFields inherited from interface sc.fiji.snt.tracing.auto.AutoTracer
ROI_CENTROID, ROI_CENTROID_WEIGHTED, ROI_CONTAINED, ROI_EDGE, ROI_UNSET -
Constructor Summary
ConstructorsConstructorDescriptionSparseGWDTTracer(ij.ImagePlus source) Creates a new SparseGWDTTracer from an ImagePlus.SparseGWDTTracer(net.imagej.ImgPlus<T> source) Creates a new SparseGWDTTracer from an ImgPlus.SparseGWDTTracer(net.imglib2.RandomAccessibleInterval<T> source) Creates a new SparseGWDTTracer with isotropic spacing (1.0 for each dimension).SparseGWDTTracer(net.imglib2.RandomAccessibleInterval<T> source, double[] spacing) Creates a new SparseGWDTTracer. -
Method Summary
Modifier and TypeMethodDescriptionstatic SparseGWDTTracer<?> create(ij.ImagePlus source) static SparseGWDTTracer<?> create(net.imagej.ImgPlus<?> source) protected StorageBackendCreate the storage backend for this tracer.Methods inherited from class sc.fiji.snt.tracing.auto.AbstractGWDTTracer
addNeighborsToHeap, computeAndApplyScoreMap, computeAverageSpacing, computeIntensityRange, computeIntensityWeightedJointCoverage, createIsotropicSpacing, darkNodeAndSegmentPruning, getCaliperFraction, getDimensions, getEffectiveThreshold, getMaxGapVoxels, getMinSomaDistance, getNSomas, getScoreMap, getSpacing, getSpacing, getTipExtensionDistance, getTracedRegionBuffer, hierarchicalPrune, honoredSeedRoles, indexToPos, isAllowVoxelGap, isAutoFilter, isInBounds, isParallelBranchPruneEnabled, isPathFittingEnabled, iterateNeighbors, nodeToVoxelPos, posToIndex, posToIndex, pruneParallelBranches, recalculateRadiiFromImage, removeOvershoots, removeZigzags, resampleCurve, runFastMarching, setAllowVoxelGap, setAutoFilter, setBackgroundThreshold, setBranchTuneMaxAngle, setCaliperFraction, setConnectivityType, setJointLeafPruneEnabled, setLeafPruneOverlap, setMaxGapVoxels, setMinBranchIntensityLength, setMinSegmentLength, setMinSegmentLengthVoxels, setMinSomaDistance, setNSomas, setOvershootRemovalEnabled, setParallelBranchPruneEnabled, setPathFittingEnabled, setResampleStep, setRoots, setScoreMap, setScoreMapEnabled, setScoreMapFilterType, setScoreMapPruneThreshold, setScoreMapScales, setSeed, setSeedPhysical, setSmoothWindowSize, setSphereOverlapThreshold, setSrRatio, setTipExtensionDistance, setTips, setTracedRegionBuffer, setWaypointBiasFixedFactor, setWaypointBiasRadiusVoxels, setWaypointBiasSource, setWaypointBiasStrength, setWaypoints, setZigzagRemovalEnabled, smoothCurve, trace, traceMultiSoma, traceToGraph, traceTrees, tuneBranchesMethods inherited from class sc.fiji.snt.tracing.auto.AbstractAutoTracer
collapseSomaNodes, collapseSomaToRoiCentroid, collapseSomaToWeightedCentroid, computeAverageRadius, estimateBackgroundThreshold, findGraphRoot, findRoot, findRoot, findRootPhysical, findRootPhysical, findThickestPoint, findThickestPointPhysical, getRootStrategy, getSomaRoi, isInsideSomaRoi, isVerbose, log, removeDisconnectedComponents, setSomaRoi, setSomaRoi, setSomaRoiZPosition, setStatusListener, setVerbose, splitAtSomaBoundary, status
-
Constructor Details
-
SparseGWDTTracer
Creates a new SparseGWDTTracer.- Parameters:
source- the grayscale image to tracespacing- voxel dimensions [x, y, z] in physical units
-
SparseGWDTTracer
Creates a new SparseGWDTTracer from an ImgPlus.- Parameters:
source- the grayscale image to trace
-
SparseGWDTTracer
Creates a new SparseGWDTTracer with isotropic spacing (1.0 for each dimension). -
SparseGWDTTracer
public SparseGWDTTracer(ij.ImagePlus source) Creates a new SparseGWDTTracer from an ImagePlus.- Parameters:
source- the grayscale image to trace
-
-
Method Details
-
createStorageBackend
Description copied from class:AbstractGWDTTracerCreate the storage backend for this tracer. Subclasses override to specify array, sparse, or disk-backed storage.- Specified by:
createStorageBackendin classAbstractGWDTTracer<T extends net.imglib2.type.numeric.RealType<T>>
-
create
-
create
-