T - the type of the source pixels. Must extends RealType.public class DefaultTubeness<T extends RealType<T>> extends AbstractUnaryHybridCF<RandomAccessibleInterval<T>,IterableInterval<DoubleType>> implements Cancelable, Ops.Filter.Tubeness
This filter works on 2D and 3D image exclusively and produces a score for how "tube-like" each point in the image is. This is useful as a preprocessing step for tracing neurons or blood vessels, for example. For 3D image stacks, the filter uses the eigenvalues of the Hessian matrix to calculate this measure of "tubeness", using one of the simpler metrics me mentioned in Sato et al 1997: if the larger two eigenvalues (λ₂ and λ₃) are both negative then value is √(λ₂λ₃), otherwise the value is 0. For 2D images, if the large eigenvalue is negative, we return its absolute value and otherwise return 0.
λ₂ is the largest eigenvalue:
out = 𝜎 × 𝜎 × |λ₂| if λ₂ is negative, 0
otherwise.
λ₂ and λ₃ are the largest
eigenvalues:, out = 𝜎 × 𝜎 × sqrt( λ₂ * λ₃ ) if λ₂
and λ₃ are negative, 0 otherwise.
𝜎 / sqrt(d)
thickness.
Port of the tubeness filter of the VIB package, with original authors Mark Longair and Stephan Preibisch, to ImageJ-ops.
SpecialOp.FlavorNAME| Constructor and Description |
|---|
DefaultTubeness() |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel(String reason)
Cancels the command execution, with the given reason for doing so.
|
void |
compute(RandomAccessibleInterval<T> input,
IterableInterval<DoubleType> tubeness)
Computes the output given some input.
|
Img<DoubleType> |
createOutput(RandomAccessibleInterval<T> input)
Create an output object given some input.
|
String |
getCancelReason() |
boolean |
isCanceled() |
in, out, setInput, setOutputops, setEnvironmentclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitops, setEnvironmentcalculate, calculate, createOutput, getIndependentInstance, run, runcomputein, setInputrunsetOutputcandidates, filterArity, opinitializepublic Img<DoubleType> createOutput(RandomAccessibleInterval<T> input)
UnaryOutputFactorycreateOutput in interface UnaryOutputFactory<RandomAccessibleInterval<T extends RealType<T>>,IterableInterval<DoubleType>>input - which determines how to create the outputpublic void compute(RandomAccessibleInterval<T> input, IterableInterval<DoubleType> tubeness)
UnaryComputerOpcompute in interface UnaryComputerOp<RandomAccessibleInterval<T extends RealType<T>>,IterableInterval<DoubleType>>input - Argument to the computation, which must be non-nulltubeness - Object where the computation's result will be stored, which
must be non-null and a different object than inputpublic boolean isCanceled()
isCanceled in interface Cancelablepublic void cancel(String reason)
cancel in interface Cancelablepublic String getCancelReason()
getCancelReason in interface CancelableCopyright © 2014–2022 ImageJ. All rights reserved.