public interface LineConvolverFactory<T>
LineConvolverFactory
needs to do
exactly this: Convolve one line of the image.
All the "boring" stuff is done by LineConvolution
, which takes care
of applying LineConvolverFactory
in a multi threaded fashion on an
complete image.
Modifier and Type | Method and Description |
---|---|
long |
getBorderAfter()
When doing a convolution, a neighborhood of a pixel needs to be known.
|
long |
getBorderBefore()
When doing a convolution, a neighborhood of a pixel needs to be known.
|
Runnable |
getConvolver(RandomAccess<? extends T> in,
RandomAccess<? extends T> out,
int d,
long lineLength)
The
Runnable returned by this method is responsible for
convolving on line of the image. |
T |
preferredSourceType(T targetType) |
long getBorderBefore()
long getBorderAfter()
Runnable getConvolver(RandomAccess<? extends T> in, RandomAccess<? extends T> out, int d, long lineLength)
Runnable
returned by this method is responsible for
convolving on line of the image. But it will be reused. After the first
line is convolved. The RandomAccess
es are moved to the start of
the next line. And the Runnable is executed again.
LineConvolution
works with multiple threads.
getConvolver(net.imglib2.RandomAccess<? extends T>, net.imglib2.RandomAccess<? extends T>, int, long)
is called once per thread, and the returned
Runnable
is exclusively used in one thread.in
- RandomAccess
, that is positioned on the start of the
line of the input image.out
- RandomAccess
, that is positioned on the start of the
line of the output image.d
- Dimension in which the line should go.lineLength
- Length of the output line in pixels.Runnable
that will read a line of the input image,
convolve it, and write the result to the output image. (Input
line length should be getBorderBefore() + lineLength +
getBorderAfter())Copyright © 2015–2022 ImgLib2. All rights reserved.