Package sc.fiji.snt.analysis.curation
Class PlausibilityCheck.UncertainTerminal
java.lang.Object
sc.fiji.snt.analysis.curation.PlausibilityCheck.DeepCheck
sc.fiji.snt.analysis.curation.PlausibilityCheck.UncertainTerminal
- Enclosing class:
PlausibilityCheck
Flags terminal branches whose final few nodes have low signal/background
contrast: the tip's spatial location is poorly determined because the
neurite faded into the background before the trace stopped. Distinct
from
PlausibilityCheck.SignalQuality (whole-path contrast) and PlausibilityCheck.BoundaryProximity
(FOV truncation) -- this check is tip-specific and image-based.
The check reuses the same contrast machinery as SignalQuality
via PlausibilityCheck.contrastOverNodeRange(net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.numeric.RealType<?>>, sc.fiji.snt.Path, int, int), restricted to the
last tailNodes of each terminal. A naturally tapering ending
with bright signal scores high contrast; a tip that fades into noise
scores low.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleSentinel value indicating the threshold should be auto-resolved. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublegetName()doubleintbooleanhasImage()Declares how this check's errors propagate.measure(Collection<Path> paths) Computes the full distribution of this check's metric acrosspaths, without applying the warning threshold.voidprepareImage(net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.numeric.RealType<?>> rai) Sets the image and, if no peer can supply equivalent stats, scans the full volume to populate min/max.scan(Collection<Path> paths) Scans a collection of paths for plausibility issues.voidsetImage(net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.numeric.RealType<?>> image) Sets the image whose intensities define signal vs background.voidsetImageStats(double min, double max) Sets image-level statistics used to auto-compute the contrast threshold whengetMinTipContrast()==AUTO_THRESHOLDand the peer cannot supply a value.voidsetMinTipContrast(double v) voidWires a peerPlausibilityCheck.SignalQuality.voidsetTailNodes(int n) Methods inherited from class sc.fiji.snt.analysis.curation.PlausibilityCheck.DeepCheck
isEnabled, setEnabled
-
Field Details
-
AUTO_THRESHOLD
public static final double AUTO_THRESHOLDSentinel value indicating the threshold should be auto-resolved.- See Also:
-
-
Constructor Details
-
UncertainTerminal
public UncertainTerminal()
-
-
Method Details
-
getName
- Specified by:
getNamein classPlausibilityCheck.DeepCheck- Returns:
- a short human-readable name for this check
-
impactKind
Description copied from class:PlausibilityCheck.DeepCheckDeclares how this check's errors propagate. DefaultLOCALfor deep checks because most deep checks (radius jumps, monotonicity, signal quality) measure intrinsic per-path properties that don't propagate to descendants. Topology-class checks (e.g.,Crossovers) override toPlausibilityCheck.ImpactKind.SUBTREE.- Overrides:
impactKindin classPlausibilityCheck.DeepCheck
-
setMinTipContrast
public void setMinTipContrast(double v) -
getMinTipContrast
public double getMinTipContrast() -
setTailNodes
public void setTailNodes(int n) -
getTailNodes
public int getTailNodes() -
setImage
public void setImage(net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.numeric.RealType<?>> image) Sets the image whose intensities define signal vs background. -
hasImage
public boolean hasImage() -
setSignalQualityPeer
Wires a peerPlausibilityCheck.SignalQuality. When set,resolveThreshold()prefers the peer's resolved threshold (provided the peer is enabled and has runPlausibilityCheck.SignalQuality.prepareImage(net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.numeric.RealType<?>>)). This avoids a duplicate full-volume scan and keeps the two checks numerically in sync. Passnullto disable peer borrowing. -
setImageStats
public void setImageStats(double min, double max) Sets image-level statistics used to auto-compute the contrast threshold whengetMinTipContrast()==AUTO_THRESHOLDand the peer cannot supply a value. -
prepareImage
public void prepareImage(net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.numeric.RealType<?>> rai) Sets the image and, if no peer can supply equivalent stats, scans the full volume to populate min/max. MirrorsPlausibilityCheck.SignalQuality.prepareImage(net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.numeric.RealType<?>>). Skips the scan when a wired, enabled peer already has valid stats: in that case the peer's resolved threshold is reused, so rescanning would be wasted work.Should always be called from a worker thread.
-
getResolvedThreshold
public double getResolvedThreshold()- Returns:
- the resolved threshold (adopted from peer or derived from own stats).
-
scan
Description copied from class:PlausibilityCheck.DeepCheckScans a collection of paths for plausibility issues.- Specified by:
scanin classPlausibilityCheck.DeepCheck- Parameters:
paths- the paths to scan- Returns:
- list of warnings (empty if no issues found)
-
measure
Description copied from class:PlausibilityCheck.DeepCheckComputes the full distribution of this check's metric acrosspaths, without applying the warning threshold. Default implementation returnsPlausibilityCheck.Measurements.EMPTY; subclasses override to enable per-check histogram popups in the Curation Assistant.- Overrides:
measurein classPlausibilityCheck.DeepCheck- Parameters:
paths- the paths to evaluate;nullor empty yieldsPlausibilityCheck.Measurements.EMPTY.- Returns:
- a
PlausibilityCheck.Measurementsrecord; nevernull.
-