R
- The type of the input image.T
- The type of the integral image.public class IntegralImg<R extends NumericType<R>,T extends NumericType<T> & NativeType<T>> extends Object implements OutputAlgorithm<Img<T>>
<T>
. Care
must be taken that sums do not overflow the capacity of type <T>
.
The integral image will be one pixel larger in each dimension as for easy
computation of sums it has to contain "zeros" at the beginning of each
dimension
The Converter
defines howto convert from Type <R>
to <T>
.
Sums are done with the precision of <T>
and then set to the integral
image type, which may crop the values according to the type's capabilities.Modifier and Type | Field and Description |
---|---|
protected Converter<R,T> |
converter |
protected RandomAccessibleInterval<R> |
img |
protected Img<T> |
integral |
protected int |
order |
protected T |
type |
Constructor and Description |
---|
IntegralImg(RandomAccessibleInterval<R> img,
T type,
Converter<R,T> converter) |
IntegralImg(RandomAccessibleInterval<R> img,
T type,
Converter<R,T> converter,
int order) |
Modifier and Type | Method and Description |
---|---|
boolean |
checkInput() |
String |
getErrorMessage() |
Img<T> |
getResult() |
protected void |
integrateLine(int d,
RandomAccess<T> cursor,
T sum,
long size) |
protected void |
integrateLineDim0(Converter<R,T> converter,
RandomAccess<R> cursorIn,
RandomAccess<T> cursorOut,
T sum,
T tmpVar,
long size) |
boolean |
process() |
protected final RandomAccessibleInterval<R extends NumericType<R>> img
protected final T extends NumericType<T> & NativeType<T> type
protected Img<T extends NumericType<T> & NativeType<T>> integral
protected final Converter<R extends NumericType<R>,T extends NumericType<T> & NativeType<T>> converter
protected final int order
protected void integrateLineDim0(Converter<R,T> converter, RandomAccess<R> cursorIn, RandomAccess<T> cursorOut, T sum, T tmpVar, long size)
protected void integrateLine(int d, RandomAccess<T> cursor, T sum, long size)
public boolean checkInput()
checkInput
in interface Algorithm
public String getErrorMessage()
getErrorMessage
in interface Algorithm
public Img<T> getResult()
getResult
in interface OutputAlgorithm<Img<T extends NumericType<T> & NativeType<T>>>
Copyright © 2015–2022 ImgLib2. All rights reserved.