Class SparseGWDTTracer<T extends net.imglib2.type.numeric.RealType<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.

Trade-offs:
  • 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
Example: A 1024×1024×100 16-bit image:
  • 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:
  • Constructor Details

    • SparseGWDTTracer

      public SparseGWDTTracer(net.imglib2.RandomAccessibleInterval<T> source, double[] spacing)
      Creates a new SparseGWDTTracer.
      Parameters:
      source - the grayscale image to trace
      spacing - voxel dimensions [x, y, z] in physical units
    • SparseGWDTTracer

      public SparseGWDTTracer(net.imagej.ImgPlus<T> source)
      Creates a new SparseGWDTTracer from an ImgPlus.
      Parameters:
      source - the grayscale image to trace
    • SparseGWDTTracer

      public SparseGWDTTracer(net.imglib2.RandomAccessibleInterval<T> source)
      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