[ImageJ-devel] Imglib2 Cubic spline interpolator (1 of 2)
Lee Kamentsky
leek at broadinstitute.org
Tue Jun 18 09:45:57 CDT 2013
Hi all,
I'm planning to write a cubic spline Interpolant as part of an upcoming
project. The class would be backed by a RandomAccessible which would supply
two pixel values on either side of the real coordinate to be sampled, per
dimension. One of the neat features of cubic splines is that you can take
their first derivative (gradient) and second derivative (Hessian) with the
same efficiency as calculating the interpolation, so it makes sense to have
methods that return separate RealRandomAccess instances for both the
gradient and Hessian.
The natural type for a gradient is a vector and the type for a Hessian is a
tensor (NxN matrix, roughly), so there are some interesting choices to be
made for the type for the corresponding RealRandomAccess classes. Does it
make sense to have a VectorType<T> and TensorType<T>? I could be
over-thinking this - it would be easier to replace the gradient and tensor
RealRandomAccess classes with methods:
T gradient(int dimension);
T hessian(int dimension, int dimension);
and maybe the JIT has an easier time optimizing too. Also, implementing
VectorType ... extends NumericType ... is probably starting to turn into
more work than I can justify for the project but the utility of that is
obvious.
I'll turn this into an issue on github.com/imagej/imglib after it becomes
clear what needs to be done.
--Lee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-devel/attachments/20130618/10ca9c17/attachment.html>
More information about the ImageJ-devel
mailing list