public class DistanceTransform extends Object
D( p ) = min_q f(q) + d(p,q) where p,q are points on a grid/image.
The implemented algorithm has complexity O(dn) where d is the number of dimensions of the image, and n is the total number of pixels/voxels.
| Modifier and Type | Class and Description |
|---|---|
static class |
DistanceTransform.DISTANCE_TYPE
Switch for calling convenience method with pre-defined distances.
|
| Constructor and Description |
|---|
DistanceTransform() |
public static <T extends net.imglib2.type.numeric.RealType<T>> void transform(net.imglib2.RandomAccessibleInterval<T> source, DistanceTransform.DISTANCE_TYPE distanceType, double... weights)
source using squared
Euclidian (L2) or L1 distance. Intermediate and final results will be
stored in source (DoubleType recommended). The distance
can be weighted (individually for each dimension, if desired) against the
image values via the weights parameter.T - RealType inputsource - Input function on which distance transform should be computed.distanceType - Defines distance to be used: squared Euclidian or L1weights - Individual weights for each dimension, balancing image values
and distance (when using squared Euclidian distance, weights
should be squared, too).public static <T extends net.imglib2.type.numeric.RealType<T>> void transform(net.imglib2.RandomAccessibleInterval<T> source, DistanceTransform.DISTANCE_TYPE distanceType, ExecutorService es, int nTasks, double... weights) throws InterruptedException, ExecutionException
source using squared
Euclidian (L2) or L1 distance. Intermediate and final results will be
stored in source (DoubleType recommended). The distance
can be weighted (individually for each dimension, if desired) against the
image values via the weights parameter.T - RealType inputsource - Input function on which distance transform should be computed.distanceType - Defines distance to be used: squared Euclidian or L1es - ExecutorService for parallel execution.nTasks - Number of tasks/parallelismweights - Individual weights for each dimension, balancing image values
and distance (when using squared Euclidian distance, weights
should be squared, too).InterruptedException - if interrupted while waiting, in which case unfinished tasks
are cancelled (distance transform may be computed only
partially)ExecutionException - if the computation threw an exception (distance transform may
be computed only partially)public static <T extends net.imglib2.type.numeric.RealType<T>,U extends net.imglib2.type.numeric.RealType<U>> void transform(net.imglib2.RandomAccessible<T> source, net.imglib2.RandomAccessibleInterval<U> target, DistanceTransform.DISTANCE_TYPE distanceType, double... weights)
source using squared
Euclidian (L2) or L1 distance. Intermediate results will be stored in
target (DoubleType recommended). The distance can be
weighted (individually for each dimension, if desired) against the image
values via the weights parameter.T - RealType inputU - RealType intermediate resultssource - Input function on which distance transform should be computed.target - Intermediate and final results of distance transform.distanceType - Defines distance to be used: squared Euclidian or L1weights - Individual weights for each dimension, balancing image values
and distance (when using squared Euclidian distance, weights
should be squared, too).public static <T extends net.imglib2.type.numeric.RealType<T>,U extends net.imglib2.type.numeric.RealType<U>> void transform(net.imglib2.RandomAccessible<T> source, net.imglib2.RandomAccessibleInterval<U> target, DistanceTransform.DISTANCE_TYPE distanceType, ExecutorService es, int nTasks, double... weights) throws InterruptedException, ExecutionException
source using squared
Euclidian (L2) or L1 distance. Intermediate results will be stored in
target (DoubleType recommended). The distance can be
weighted (individually for each dimension, if desired) against the image
values via the weights parameter.T - RealType inputU - RealType intermediate resultssource - Input function on which distance transform should be computed.target - Intermediate and final results of distance transform.distanceType - Defines distance to be used: squared Euclidian or L1es - ExecutorService for parallel execution.nTasks - Number of tasks/parallelismweights - Individual weights for each dimension, balancing image values
and distance (when using squared Euclidian distance, weights
should be squared, too).InterruptedException - if interrupted while waiting, in which case unfinished tasks
are cancelled (distance transform may be computed only
partially)ExecutionException - if the computation threw an exception (distance transform may
be computed only partially)public static <T extends net.imglib2.type.numeric.RealType<T>,U extends net.imglib2.type.numeric.RealType<U>,V extends net.imglib2.type.numeric.RealType<V>> void transform(net.imglib2.RandomAccessible<T> source, net.imglib2.RandomAccessibleInterval<U> tmp, net.imglib2.RandomAccessibleInterval<V> target, DistanceTransform.DISTANCE_TYPE distanceType, double... weights)
source using squared
Euclidian (L2) or L1 distance. Intermediate results will be stored in
tmp (DoubleType recommended). The output will be written
into target. The distance can be weighted (individually for each
dimension, if desired) against the image values via the weights
parameter.T - RealType inputU - RealType intermediate resultsV - RealType outputsource - Input function on which distance transform should be computed.tmp - Storage for intermediate results.target - Final result of distance transform.distanceType - Defines distance to be used: squared Euclidian or L1weights - Individual weights for each dimension, balancing image values
and distance (when using squared Euclidian distance, weights
should be squared, too).public static <T extends net.imglib2.type.numeric.RealType<T>,U extends net.imglib2.type.numeric.RealType<U>,V extends net.imglib2.type.numeric.RealType<V>> void transform(net.imglib2.RandomAccessible<T> source, net.imglib2.RandomAccessibleInterval<U> tmp, net.imglib2.RandomAccessibleInterval<V> target, DistanceTransform.DISTANCE_TYPE distanceType, ExecutorService es, int nTasks, double... weights) throws InterruptedException, ExecutionException
source using squared
Euclidian (L2) or L1 distance. Intermediate results will be stored in
tmp (DoubleType recommended). The output will be written
into target. The distance can be weighted (individually for each
dimension, if desired) against the image values via the weights
parameter.T - RealType inputU - RealType intermediate resultsV - RealType outputsource - Input function on which distance transform should be computed.tmp - Storage for intermediate results.target - Final result of distance transform.distanceType - Defines distance to be used: squared Euclidian or L1es - ExecutorService for parallel execution.nTasks - Number of tasks/parallelismweights - Individual weights for each dimension, balancing image values
and distance (when using squared Euclidian distance, weights
should be squared, too).InterruptedException - if interrupted while waiting, in which case unfinished tasks
are cancelled (distance transform may be computed only
partially)ExecutionException - if the computation threw an exception (distance transform may
be computed only partially)public static <T extends net.imglib2.type.numeric.RealType<T>> void transform(net.imglib2.RandomAccessibleInterval<T> source, Distance d)
source using arbitrary
Distance d. Intermediate and final results will be stored in
source (DoubleType recommended).T - RealType inputsource - Input function on which distance transform should be computed.d - Distance between two points.public static <T extends net.imglib2.type.numeric.RealType<T>> void transform(net.imglib2.RandomAccessibleInterval<T> source, Distance d, ExecutorService es, int nTasks) throws InterruptedException, ExecutionException
source using arbitrary
Distance d. Intermediate and final results will be stored in
source (DoubleType recommended).T - RealType inputsource - Input function on which distance transform should be computed.d - Distance between two points.es - ExecutorService for parallel execution.nTasks - Number of tasks/parallelismInterruptedException - if interrupted while waiting, in which case unfinished tasks
are cancelled (distance transform may be computed only
partially)ExecutionException - if the computation threw an exception (distance transform may
be computed only partially)public static <T extends net.imglib2.type.numeric.RealType<T>,U extends net.imglib2.type.numeric.RealType<U>> void transform(net.imglib2.RandomAccessible<T> source, net.imglib2.RandomAccessibleInterval<U> target, Distance d)
source using arbitrary
Distance d. Intermediate and final results will be stored in
target (DoubleType recommended).T - RealType inputU - RealType intermediate resultssource - Input function on which distance transform should be computed.target - Final result of distance transform.d - Distance between two points.public static <T extends net.imglib2.type.numeric.RealType<T>,U extends net.imglib2.type.numeric.RealType<U>> void transform(net.imglib2.RandomAccessible<T> source, net.imglib2.RandomAccessibleInterval<U> target, Distance d, ExecutorService es, int nTasks) throws InterruptedException, ExecutionException
source using arbitrary
Distance d. Intermediate and final results will be stored in
target (DoubleType recommended).T - RealType inputU - RealType intermediate resultssource - Input function on which distance transform should be computed.target - Final result of distance transform.d - Distance between two points.es - ExecutorService for parallel execution.nTasks - Number of tasks/parallelismInterruptedException - if interrupted while waiting, in which case unfinished tasks
are cancelled (distance transform may be computed only
partially)ExecutionException - if the computation threw an exception (distance transform may
be computed only partially)public static <T extends net.imglib2.type.numeric.RealType<T>,U extends net.imglib2.type.numeric.RealType<U>,V extends net.imglib2.type.numeric.RealType<V>> void transform(net.imglib2.RandomAccessible<T> source, net.imglib2.RandomAccessibleInterval<U> tmp, net.imglib2.RandomAccessibleInterval<V> target, Distance d)
source using arbitrary
Distance d. Intermediate results will be stored in tmp
(DoubleType recommended). The output will be written into
target.T - RealType inputU - RealType intermediate resultsV - RealType outputsource - Input function on which distance transform should be computed.tmp - Storage for intermediate results.target - Final result of distance transform.d - Distance between two points.public static <T extends net.imglib2.type.numeric.RealType<T>,U extends net.imglib2.type.numeric.RealType<U>,V extends net.imglib2.type.numeric.RealType<V>> void transform(net.imglib2.RandomAccessible<T> source, net.imglib2.RandomAccessibleInterval<U> tmp, net.imglib2.RandomAccessibleInterval<V> target, Distance d, ExecutorService es, int nTasks) throws InterruptedException, ExecutionException
source using arbitrary
Distance d. Intermediate results will be stored in tmp
(DoubleType recommended). The output will be written into
target.T - RealType inputU - RealType intermediate resultsV - RealType outputsource - Input function on which distance transform should be computed.tmp - Storage for intermediate results.target - Final result of distance transform.d - Distance between two points.es - ExecutorService for parallel execution.nTasks - Number of tasks/parallelismInterruptedException - if interrupted while waiting, in which case unfinished tasks
are cancelled (distance transform may be computed only
partially)ExecutionException - if the computation threw an exception (distance transform may
be computed only partially)public static <B extends net.imglib2.type.BooleanType<B>,U extends net.imglib2.type.numeric.RealType<U>> void binaryTransform(net.imglib2.RandomAccessible<B> source, net.imglib2.RandomAccessibleInterval<U> target, DistanceTransform.DISTANCE_TYPE distanceType, double... weights)
source using squared
Euclidian (L2) or L1 distance. Intermediate results will be stored in
target (DoubleType recommended). The distance can be
weighted (individually for each dimension, if desired) against the image
values via the weights parameter.B - BooleanType binary mask inputU - RealType intermediate resultssource - Input function on which distance transform should be computed.target - Intermediate and final results of distance transform.distanceType - Defines distance to be used: squared Euclidian or L1weights - Individual weights for each dimension, balancing image values
and distance (when using squared Euclidian distance, weights
should be squared, too).public static <B extends net.imglib2.type.BooleanType<B>,U extends net.imglib2.type.numeric.RealType<U>> void binaryTransform(net.imglib2.RandomAccessible<B> source, net.imglib2.RandomAccessibleInterval<U> target, DistanceTransform.DISTANCE_TYPE distanceType, ExecutorService es, int nTasks, double... weights) throws InterruptedException, ExecutionException
source using squared
Euclidian (L2) or L1 distance. Intermediate results will be stored in
target (DoubleType recommended). The distance can be
weighted (individually for each dimension, if desired) against the image
values via the weights parameter.B - BooleanType binary mask inputU - RealType intermediate resultssource - Input function on which distance transform should be computed.target - Intermediate and final results of distance transform.distanceType - Defines distance to be used: squared Euclidian or L1es - ExecutorService for parallel execution.nTasks - Number of tasks/parallelismweights - Individual weights for each dimension, balancing image values
and distance (when using squared Euclidian distance, weights
should be squared, too).InterruptedException - if interrupted while waiting, in which case unfinished tasks
are cancelled (distance transform may be computed only
partially)ExecutionException - if the computation threw an exception (distance transform may
be computed only partially)public static <B extends net.imglib2.type.BooleanType<B>,U extends net.imglib2.type.numeric.RealType<U>,V extends net.imglib2.type.numeric.RealType<V>> void binaryTransform(net.imglib2.RandomAccessible<B> source, net.imglib2.RandomAccessibleInterval<U> tmp, net.imglib2.RandomAccessibleInterval<V> target, DistanceTransform.DISTANCE_TYPE distanceType, double... weights)
source using squared
Euclidian (L2) or L1 distance. Intermediate results will be stored in
tmp (DoubleType recommended). The output will be written
into target. The distance can be weighted (individually for each
dimension, if desired) against the image values via the weights
parameter.B - BooleanType binary mask inputU - RealType intermediate resultsV - RealType outputsource - Input function on which distance transform should be computed.tmp - Storage for intermediate results.target - Final result of distance transform.distanceType - Defines distance to be used: squared Euclidian or L1weights - Individual weights for each dimension, balancing image values
and distance (when using squared Euclidian distance, weights
should be squared, too).public static <B extends net.imglib2.type.BooleanType<B>,U extends net.imglib2.type.numeric.RealType<U>,V extends net.imglib2.type.numeric.RealType<V>> void binaryTransform(net.imglib2.RandomAccessible<B> source, net.imglib2.RandomAccessibleInterval<U> tmp, net.imglib2.RandomAccessibleInterval<V> target, DistanceTransform.DISTANCE_TYPE distanceType, ExecutorService es, int nTasks, double... weights) throws InterruptedException, ExecutionException
source using squared
Euclidian (L2) or L1 distance. Intermediate results will be stored in
tmp (DoubleType recommended). The output will be written
into target. The distance can be weighted (individually for each
dimension, if desired) against the image values via the weights
parameter.B - BooleanType binary mask inputU - RealType intermediate resultsV - RealType outputsource - Input function on which distance transform should be computed.tmp - Storage for intermediate results.target - Final result of distance transform.distanceType - Defines distance to be used: squared Euclidian or L1es - ExecutorService for parallel execution.nTasks - Number of tasks/parallelismweights - Individual weights for each dimension, balancing image values
and distance (when using squared Euclidian distance, weights
should be squared, too).InterruptedException - if interrupted while waiting, in which case unfinished tasks
are cancelled (distance transform may be computed only
partially)ExecutionException - if the computation threw an exception (distance transform may
be computed only partially)public static <B extends net.imglib2.type.BooleanType<B>> void binaryTransform(net.imglib2.RandomAccessibleInterval<B> source, Distance d, ExecutorService es, int nTasks) throws InterruptedException, ExecutionException
source using arbitrary
Distance d. Intermediate and final results will be stored in
source (DoubleType recommended).B - BooleanType binary mask inputsource - Input function on which distance transform should be computed.d - Distance between two points.es - ExecutorService for parallel execution.nTasks - Number of tasks/parallelismInterruptedException - if interrupted while waiting, in which case unfinished tasks
are cancelled (distance transform may be computed only
partially)ExecutionException - if the computation threw an exception (distance transform may
be computed only partially)public static <B extends net.imglib2.type.BooleanType<B>,U extends net.imglib2.type.numeric.RealType<U>> void binaryTransform(net.imglib2.RandomAccessible<B> source, net.imglib2.RandomAccessibleInterval<U> target, Distance d)
source using arbitrary
Distance d. Intermediate and final results will be stored in
target (DoubleType recommended).B - BooleanType binary mask inputU - RealType intermediate resultssource - Input function on which distance transform should be computed.target - Final result of distance transform.d - Distance between two points.public static <B extends net.imglib2.type.BooleanType<B>,U extends net.imglib2.type.numeric.RealType<U>> void binaryTransform(net.imglib2.RandomAccessible<B> source, net.imglib2.RandomAccessibleInterval<U> target, Distance d, ExecutorService es, int nTasks) throws InterruptedException, ExecutionException
source using arbitrary
Distance d. Intermediate and final results will be stored in
target (DoubleType recommended).B - BooleanType binary mask inputU - RealType intermediate resultssource - Input function on which distance transform should be computed.target - Final result of distance transform.d - Distance between two points.es - ExecutorService for parallel execution.nTasks - Number of tasks/parallelismInterruptedException - if interrupted while waiting, in which case unfinished tasks
are cancelled (distance transform may be computed only
partially)ExecutionException - if the computation threw an exception (distance transform may
be computed only partially)public static <B extends net.imglib2.type.BooleanType<B>,U extends net.imglib2.type.numeric.RealType<U>,V extends net.imglib2.type.numeric.RealType<V>> void binaryTransform(net.imglib2.RandomAccessible<B> source, net.imglib2.RandomAccessibleInterval<U> tmp, net.imglib2.RandomAccessibleInterval<V> target, Distance d)
source using arbitrary
Distance d. Intermediate results will be stored in tmp
(DoubleType recommended). The output will be written into
target.B - BooleanType binary mask inputU - RealType intermediate resultsV - RealType outputsource - Input function on which distance transform should be computed.tmp - Storage for intermediate results.target - Final result of distance transform.d - Distance between two points.public static <B extends net.imglib2.type.BooleanType<B>,U extends net.imglib2.type.numeric.RealType<U>,V extends net.imglib2.type.numeric.RealType<V>> void binaryTransform(net.imglib2.RandomAccessible<B> source, net.imglib2.RandomAccessibleInterval<U> tmp, net.imglib2.RandomAccessibleInterval<V> target, Distance d, ExecutorService es, int nTasks) throws InterruptedException, ExecutionException
source using arbitrary
Distance d. Intermediate results will be stored in tmp
(DoubleType recommended). The output will be written into
target.B - BooleanType binary mask inputU - RealType intermediate resultsV - RealType outputsource - Input function on which distance transform should be computed.tmp - Storage for intermediate results.target - Final result of distance transform.d - Distance between two points.es - ExecutorService for parallel execution.nTasks - Number of tasks/parallelismInterruptedException - if interrupted while waiting, in which case unfinished tasks
are cancelled (distance transform may be computed only
partially)ExecutionException - if the computation threw an exception (distance transform may
be computed only partially)public static <L extends net.imglib2.type.numeric.IntegerType<L>> net.imglib2.RandomAccessibleInterval<net.imglib2.type.numeric.real.DoubleType> voronoiDistanceTransform(net.imglib2.RandomAccessibleInterval<L> labels, double... weights)
Returns the joint distance transform of all non-background labels in the
labels image. This distance transform will be the distance to the
nearest non-background label at every point.
Simultaneously, modifies the labels image so that the label at
every point is the closest label, where initial distances are given by
the values in the distance argument.
This method uses 0 (zero) as the background label.
L - the label typelabels - the label imageweights - for distance computation per dimensionpublic static <L extends net.imglib2.type.numeric.IntegerType<L>> net.imglib2.RandomAccessibleInterval<net.imglib2.type.numeric.real.DoubleType> voronoiDistanceTransform(net.imglib2.RandomAccessibleInterval<L> labels, long backgroundLabel, double... weights)
Returns the joint distance transform of all non-background labels in the
labels image. This distance transform will be the distance to the
nearest non-background label at every point.
Simultaneously, modifies the labels image so that the label at
every point is the closest label, where initial distances are given by
the values in the distance argument.
L - the label typelabels - the label imagebackgroundLabel - the background labelweights - for distance computation per dimensionpublic static <L extends net.imglib2.type.numeric.IntegerType<L>> net.imglib2.RandomAccessibleInterval<net.imglib2.type.numeric.real.DoubleType> voronoiDistanceTransform(net.imglib2.RandomAccessibleInterval<L> labels, long backgroundLabel, ExecutorService es, int nTasks, double... weights) throws InterruptedException, ExecutionException
Returns the joint distance transform of all non-background labels in the
labels image. This distance transform will be the distance to the
nearest non-background label at every point.
Simultaneously, modifies the labels image so that the label at
every point is the closest label, where initial distances are given by
the values in the distance argument.
L - the label typelabels - the label imagebackgroundLabel - the background labeles - the ExecutorServicenTasks - the number of tasks in which to split the computationweights - for distance computation per dimensionExecutionExceptionInterruptedExceptionpublic static <L extends net.imglib2.type.numeric.IntegerType<L>,T extends net.imglib2.type.numeric.RealType<T>> void voronoiDistanceTransform(net.imglib2.RandomAccessibleInterval<L> labels, net.imglib2.RandomAccessibleInterval<T> distance, double... weights)
L - label typeT - distance typelabels - the label imagedistance - the distance imageweights - for distance computation per dimensionpublic static <L extends net.imglib2.type.numeric.IntegerType<L>,T extends net.imglib2.type.numeric.RealType<T>> void labelTransform(net.imglib2.RandomAccessibleInterval<L> labels, net.imglib2.RandomAccessibleInterval<T> distance, ExecutorService es, int nTasks, double... weights) throws InterruptedException, ExecutionException
Returns the joint distance transform of all non-background labels in the
labels image. This distance transform will be the distance to the
nearest non-background label at every point.
Simultaneously, modifies the labels image so that the label at
every point is the closest label, where initial distances are given by
the values in the distance argument.
L - the label typelabels - the label imagees - the ExecutorServicenTasks - the number of tasks in which to split the computationweights - for distance computation per dimensionExecutionExceptionInterruptedExceptionpublic static <T extends net.imglib2.type.numeric.RealType<T>,L extends net.imglib2.type.numeric.IntegerType<L>> void transformPropagateLabels(net.imglib2.RandomAccessibleInterval<T> distance, net.imglib2.RandomAccessibleInterval<L> labels)
distance
and simultaneously propagate a set of corresponding labels.
Distance results are stored in the input targetDistance image.
Simultaneously, propagates labels stored in the labels image so
that the label at every point is the closest label, where initial
distances are given by the values in the distance argument. Results of
label propagation are stored in labelsResult
This implementation operates in-place for both the distance and
labels images. It uses an isotropic distance function with distance 1
between samples.
T - RealType inputL - IntegerType the label typedistance - Input function on which distance transform should be computed.labels - Labels to be propagated.public static <T extends net.imglib2.type.numeric.RealType<T>,U extends net.imglib2.type.numeric.RealType<U>,L extends net.imglib2.type.numeric.IntegerType<L>,M extends net.imglib2.type.numeric.IntegerType<M>> void transformPropagateLabels(net.imglib2.RandomAccessible<T> distance, net.imglib2.RandomAccessibleInterval<U> targetDistance, net.imglib2.RandomAccessible<L> labels, net.imglib2.RandomAccessibleInterval<M> labelsResult, Distance d)
distance
and simultaneously propagate a set of corresponding labels.
Distance results are stored in the input targetDistance image.
Simultaneously, propagates labels stored in the labels image so
that the label at every point is the closest label, where initial
distances are given by the values in the distance argument. Results of
label propagation are stored in labelsResult
This implementation uses the targetDistance for temporary storage.
T - input distance RealTypeU - output distance RealTypeL - input label IntegerTypeM - output label IntegerTypedistance - Input distance function from which distance transform should
be computed.targetDistance - Final result of distance transform. May be the same instance
as distance.labels - the image of labels to be propagatedlabelsResult - the image in which to store the result of label propagation.
May be the same instance as labelsd - the Distance functionpublic static <T extends net.imglib2.type.numeric.RealType<T>,U extends net.imglib2.type.numeric.RealType<U>,V extends net.imglib2.type.numeric.RealType<V>,L extends net.imglib2.type.numeric.IntegerType<L>,M extends net.imglib2.type.numeric.IntegerType<M>> void transformPropagateLabels(net.imglib2.RandomAccessible<T> distance, net.imglib2.RandomAccessibleInterval<U> tmpDistance, net.imglib2.RandomAccessibleInterval<V> targetDistance, net.imglib2.RandomAccessible<L> labels, net.imglib2.RandomAccessibleInterval<M> labelsResult, Distance d)
distance
and simultaneously propagate a set of corresponding labels.
Distance results are stored in the input targetDistance image.
Simultaneously, propagates labels stored in the labels image so
that the label at every point is the closest label, where initial
distances are given by the values in the distance argument. Results of
label propagation are stored in labelsResult
T - input distance RealTypeU - intermediate distance result RealTypeV - output distance RealTypeL - input label IntegerTypeM - output label IntegerTypedistance - Input distance function from which distance transform should
be computed.tmpDistance - Storage for intermediate distance results.targetDistance - Final result of distance transform. May be the same instance
as distance.labels - the image of labels to be propagatedlabelsResult - the image in which to store the result of label propagation.
May be the same instance as labelsd - Distance between two points.public static <T extends net.imglib2.type.numeric.RealType<T>,U extends net.imglib2.type.numeric.RealType<U>,V extends net.imglib2.type.numeric.RealType<V>,L extends net.imglib2.type.numeric.IntegerType<L>,M extends net.imglib2.type.numeric.IntegerType<M>> void transformPropagateLabels(net.imglib2.RandomAccessible<T> distance, net.imglib2.RandomAccessibleInterval<U> tmpDistance, net.imglib2.RandomAccessibleInterval<V> targetDistance, net.imglib2.RandomAccessible<L> labels, net.imglib2.RandomAccessibleInterval<M> labelsResult, Distance d, ExecutorService es, int nTasks) throws InterruptedException, ExecutionException
distance
and simultaneously propagate a set of corresponding labels.
Distance results are stored in the input targetDistance image.
Simultaneously, propagates labels stored in the labels image so
that the label at every point is the closest label, where initial
distances are given by the values in the distance argument. Results of
label propagation are stored in labelsResult
T - input distance RealTypeU - intermediate distance result RealTypeV - output distance RealTypeL - input label IntegerTypeM - output label IntegerTypedistance - Input distance function from which distance transform should
be computed.tmpDistance - Storage for intermediate distance results.targetDistance - Final result of distance transform. May be the same instance
as distance.labels - the image of labels to be propagatedlabelsResult - the image in which to store the result of label propagation.
May be the same instance as labelsd - Distance between two points.es - the ExecutorServicenTasks - the number of tasks in which to split the computationExecutionExceptionInterruptedExceptionpublic static int getLargestDimension(net.imglib2.Interval interval)
Interval
interval.interval - inputinterval (not the size of
that dimension).Copyright © 2009–2026 ImgLib2. All rights reserved.