Package sc.fiji.snt.tracing
Class ManualTracerThread
java.lang.Object
java.lang.Thread
sc.fiji.snt.tracing.ManualTracerThread
- All Implemented Interfaces:
Runnable,SearchInterface
A tracer thread for manual tracing.
- Author:
- Tiago Ferreira
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionManualTracerThread(SNT plugin, double start_x, double start_y, double start_z, double goal_x, double goal_y, double goal_z) ManualTracerThread(SNT plugin, double start_x, double start_y, double start_z, double goal_x, double goal_y, double goal_z, long boundsWidth, long boundsHeight, long boundsDepth) Variant that checks the goal against explicit bounds instead ofplugin's own currentgetWidth()/getHeight()/getDepth(). -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProgressListener(SearchProgressCallback callback) Registers a callback to receive progress updates (pointsInSearch,finished,threadStatus) while this search runs.voidrun()Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, suspend, threadId, toString, yield
-
Constructor Details
-
ManualTracerThread
public ManualTracerThread(SNT plugin, double start_x, double start_y, double start_z, double goal_x, double goal_y, double goal_z) -
ManualTracerThread
public ManualTracerThread(SNT plugin, double start_x, double start_y, double start_z, double goal_x, double goal_y, double goal_z, long boundsWidth, long boundsHeight, long boundsDepth) Variant that checks the goal against explicit bounds instead ofplugin's own currentgetWidth()/getHeight()/getDepth(). Needed by headless, crop-independent callers (seeSNT#manualTraceHeadless, used by BDV/BVV's manual-trace toggle) whose pixel indices are expressed in a grid that is not necessarilyplugin's own current canvas grid (e.g. the full streamed source, while a smaller crop is materialized on the classic canvas) - checking againstplugin's own, possibly smaller, current dimensions would then wrongly reject a perfectly valid goal.- Parameters:
boundsWidth- the width of the grid start_x/goal_x are expressed in, or 0 if unknownboundsHeight- the height of the grid start_y/goal_y are expressed in, or 0 if unknownboundsDepth- the depth of the grid start_z/goal_z are expressed in, or 0 if unknown
-
-
Method Details
-
run
public void run() -
getResult
- Specified by:
getResultin interfaceSearchInterface
-
addProgressListener
Description copied from interface:SearchInterfaceRegisters a callback to receive progress updates (pointsInSearch,finished,threadStatus) while this search runs.- Specified by:
addProgressListenerin interfaceSearchInterface- Parameters:
callback- the callback to register
-