T
- image typeS
- coefficient typepublic class BSplineDecomposition<T extends RealType<T>,S extends RealType<S>> extends Object implements Consumer<RandomAccessibleInterval<S>>
Modifier and Type | Field and Description |
---|---|
protected double[] |
Ci |
protected RandomAccessible<T> |
img |
protected int |
initHorizon |
protected boolean |
isPadded |
protected int |
numberOfPoles |
protected int |
order |
protected Interval |
originalInterval |
protected double[] |
padding |
protected int |
paddingWidth |
protected double[] |
poles |
protected RandomAccessibleInterval<S> |
tmpCoefStorage |
protected double |
tolerance |
Constructor and Description |
---|
BSplineDecomposition(int order,
RandomAccessible<T> img) |
BSplineDecomposition(RandomAccessible<T> img) |
Modifier and Type | Method and Description |
---|---|
void |
accept(RandomAccessibleInterval<S> coefficients) |
void |
acceptUnpadded(RandomAccessibleInterval<S> coefficients)
Compute coefficients.
|
static double |
gainFromPoles(double[] poles) |
RandomAccessible<T> |
getImage() |
static IntervalIterator |
getIterator(Interval interval,
int dim) |
static IntervalIterator |
getIterator(Interval paddedInterval,
Interval originalInterval,
int dim) |
protected static <T extends RealType<T>> |
initializeAntiCausalCoefficients(double z,
double c,
T previous,
RandomAccess<T> coefs) |
protected static <T extends RealType<T>> |
initializeCausalCoefficients(double z,
double tolerance,
int dimension,
RandomAccess<T> dataAccess)
Data must be 1d or permuted such that the first dimension
is the dimension to be iterated over.
|
static double[] |
poles(int splineOrder)
Returns the poles for the filter for a spline of a given order.
|
static double[] |
polesCi(double[] poles) |
<S extends RealType<S>,T extends RealType<T>> |
recursion1d(RandomAccess<T> srcAccess,
RandomAccess<S> destAccess,
double z,
double Ci,
S previous,
long N,
int dimension)
Compute a 1d forward-backward recursion to compute bspline coefficients.
|
static <S extends RealType<S>,T extends RealType<T>> |
recursion1dUnpadded(RandomAccess<T> srcAccess,
RandomAccess<S> destAccess,
S previous,
long N,
int dimension,
double tolerance,
int numberOfPoles,
double[] poles,
double[] Ci)
Compute a 1d forward-backward recursion to compute bspline coefficients.
|
void |
setPadded(boolean isPadded) |
String |
toString() |
protected final int order
protected final int numberOfPoles
protected final double[] poles
protected final double[] Ci
protected final RandomAccessible<T extends RealType<T>> img
protected double tolerance
protected int paddingWidth
protected int initHorizon
protected double[] padding
protected RandomAccessibleInterval<S extends RealType<S>> tmpCoefStorage
protected Interval originalInterval
protected boolean isPadded
public BSplineDecomposition(int order, RandomAccessible<T> img)
public BSplineDecomposition(RandomAccessible<T> img)
public void setPadded(boolean isPadded)
public RandomAccessible<T> getImage()
public static double[] polesCi(double[] poles)
public static double gainFromPoles(double[] poles)
public void accept(RandomAccessibleInterval<S> coefficients)
public void acceptUnpadded(RandomAccessibleInterval<S> coefficients)
coefficients
- the interval and destination in which to store coefficients.public static IntervalIterator getIterator(Interval paddedInterval, Interval originalInterval, int dim)
public static IntervalIterator getIterator(Interval interval, int dim)
public static <S extends RealType<S>,T extends RealType<T>> void recursion1dUnpadded(RandomAccess<T> srcAccess, RandomAccess<S> destAccess, S previous, long N, int dimension, double tolerance, int numberOfPoles, double[] poles, double[] Ci)
srcAccess
- access for the datadestAccess
- access to write results intoprevious
- a temporary variableN
- width of the recursiondimension
- the dimension along which to operatetolerance
- tolerance for initializing coefficientsnumberOfPoles
- number of polespoles
- the polesCi
- Cipublic <S extends RealType<S>,T extends RealType<T>> void recursion1d(RandomAccess<T> srcAccess, RandomAccess<S> destAccess, double z, double Ci, S previous, long N, int dimension)
srcAccess
- access for the datadestAccess
- access to write results intoprevious
- a temporary variableN
- width of the recursiondimension
- the dimension along which to operateprotected static <T extends RealType<T>> void initializeAntiCausalCoefficients(double z, double c, T previous, RandomAccess<T> coefs)
protected static <T extends RealType<T>> double initializeCausalCoefficients(double z, double tolerance, int dimension, RandomAccess<T> dataAccess)
public static double[] poles(int splineOrder)
splineOrder
- the order of the bsplineCopyright © 2015–2022 ImgLib2. All rights reserved.