I - input primitive array type, e.g., float[]O - output primitive array type, e.g., float[]public abstract class AbstractBlockProcessor<I,O> extends Object implements BlockProcessor<I,O>
BlockProcessor to simplify implementations.
This is intented as a base class for BlockProcessor that have source
dimensionality fixed at construction. For BlockProcessor with
adaptable number of dimensions (such as converters), see AbstractDimensionlessBlockProcessor.
getSourcePos(), getSourceSize(), and getSourceInterval() are implemented to
return the protected fields long[] sourcePos and int[] sourceSize}. The protected} method int sourceLength()}
can be used to get the number of elements in the source interval.
getSourceBuffer() is implemented
according to the sourcePrimitiveType specified at construction.
| Modifier and Type | Field and Description |
|---|---|
protected long[] |
sourcePos |
protected int[] |
sourceSize |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractBlockProcessor(AbstractBlockProcessor<I,O> proc) |
protected |
AbstractBlockProcessor(PrimitiveType sourcePrimitiveType,
int numSourceDimensions) |
| Modifier and Type | Method and Description |
|---|---|
I |
getSourceBuffer()
Get a
src array of sufficient size. |
Interval |
getSourceInterval() |
long[] |
getSourcePos() |
int[] |
getSourceSize() |
void |
setTargetInterval(Interval interval) |
protected int |
sourceLength() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitandThen, compute, independentCopy, setTargetIntervalprotected AbstractBlockProcessor(PrimitiveType sourcePrimitiveType, int numSourceDimensions)
protected AbstractBlockProcessor(AbstractBlockProcessor<I,O> proc)
protected int sourceLength()
public void setTargetInterval(Interval interval)
setTargetInterval in interface BlockProcessor<I,O>public long[] getSourcePos()
getSourcePos in interface BlockProcessor<I,O>public int[] getSourceSize()
getSourceSize in interface BlockProcessor<I,O>public Interval getSourceInterval()
getSourceInterval in interface BlockProcessor<I,O>public I getSourceBuffer()
BlockProcessorsrc array of sufficient size.
Consecutive calls may return the same array, but don't have to.
getSourceBuffer in interface BlockProcessor<I,O>Copyright © 2009–2024 ImgLib2. All rights reserved.