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
_______________________________________________ ImageJ-devel mailing list ImageJ-devel@imagej.net http://imagej.net/mailman/listinfo/imagej-devel